Posted on January 28, 2023 (Updated on July 10, 2025)
Create new polygon files from existing vector layer in R
Hiking & ActivitiesHow do you create a polygon file?
To create a polygon feature, complete the following steps:
- Add your data and configure settings for editing.
- On the ribbon, click the Edit tab.
- In the Create Features pane, click a polygon feature template.
- Click the Polygon tool .
- Click the map to create the first vertex.
How do I save a spatial polygon in R?
We can save our SpatialPolygons object as a shapefile using the raster package. The shapefile function in the raster package is very convenient in that it can both read a shapefile into R but it can also write a SpatialPolygons or other spatial object classes (lines, polygons, etc.) to a shapefile.
How do I write to a shapefile in R?
We can write an R spatial object to a shapefile using the st_write function in sf . To do this we need the following arguments: the name of the spatial object ( plot_locations_sp_HARV ) the directory where we want to save our shapefile (to use current = getwd() or you can specify a different path)
Disclaimer
Our goal is to help you find the best products. When you click on a link to Amazon and make a purchase, we may earn a small commission at no extra cost to you. This helps support our work and allows us to continue creating honest, in-depth reviews. Thank you for your support!
Categories
- Climate & Climate Zones
- Data & Analysis
- Earth Science
- Energy & Resources
- Facts
- General Knowledge & Education
- Geology & Landform
- Hiking & Activities
- Historical Aspects
- Human Impact
- Modeling & Prediction
- Natural Environments
- Outdoor Gear
- Polar & Ice Regions
- Regional Specifics
- Review
- Safety & Hazards
- Software & Programming
- Space & Navigation
- Storage
- Water Bodies
- Weather & Forecasts
- Wildlife & Biology
New Posts
- How Many Rock Climbers Die Each Year? Let’s Talk Real Numbers.
- DJUETRUI Water Shoes: Dive In or Dog Paddle? A Review for the Adventurous (and Slightly Clumsy)
- Under Armour Ignite Pro Slide: Comfort Champion or Just Another Sandal?
- Tackling El Cap: How Long Does This Giant Really Take?
- Chinese Calligraphy Breathable Lightweight Athletic – Honest Review
- ORKDFJ Tactical Sling Backpack: A Compact Companion for Urban and Outdoor Adventures
- Four-Wheel Disc Brakes: What They Really Mean for Your Ride
- Jordan Franchise Slides HF3263 007 Metallic – Review
- JEKYQ Water Shoes: Are These Aqua Socks Worth the Hype? (Hands-On Review)
- Are Tubeless Tires Really Puncture-Proof? Let’s Get Real.
- ASUS ROG Ranger Backpack: Is This the Ultimate Gaming Gear Hauler?
- Durango Men’s Westward Western Boot: A Classic Reimagined? (Review)
- Decoding the Drop: Why Music’s Biggest Thrill Gets You Every Time
- DJUETRUI Water Shoes: My Barefoot Bliss (and a Few Stumbles)