[R-sig-Geo] Technique required: create a new shapefile from polygon vertices list

Rick Reeves reeves at nceas.ucsb.edu
Tue Jun 21 02:46:24 CEST 2005




I have a collection of polygons, expressed as ordered lists 
or line segments defined as x/y coordinate pairs. In the line
set for each polygon, the last coordinate of the last line
connects to the first coordinate of the first line. 

I can plot these using the graphics package method 'polygon'. 

Now, I would like to export them as a shapefile. Seemed like
this would be simple. So far, I have examined the maptools,
shapefiles,sp, geoR packages and found no way to write a 
polygon shapefile that does not require the input data to 
have been in a shapefile (e.g., maptools.write.polylistShape).

Someone suggests using read.table in geoR. But how do you 
specify that you want to create polygons? 

Can anyone suggest a method using R methods or otherwise (e.g. gdal)
for generating a polygon shapefile as I describe? Even
the Arc GIS documentation is sketchy on thiis topic. 

Thanks, Rick Reeves


Scientific Programmer / Quantitative Analyst
National Center for Ecological Analysis and Synthesis
University of California, Santa Barbara
805 892 2534
reeves at nceas.ucsb.edu




More information about the R-sig-Geo mailing list