[R-sig-Geo] spatialdataframe to spatial.polygon

Edzer Pebesma edzer.pebesma at uni-muenster.de
Fri Jun 7 05:44:37 CEST 2013


Kalbasse,

If you provide a code example that reproduces the error, we can try to
to help you.

On 06/06/2013 03:04 PM, Kalbasse Group wrote:
> Hi to all I am new in R
> I am trying to transform a spatialdataframe into a Spatial.Polygon file using the SptialEpi package with no success. This the code
> 
> 
> library(SpatialEpi)
> library(proj4)
> polygon <- ADpoly$polygon$polygon
> nrepeats <- ADpoly$polygon$nrepeats
> names <- ADpoly$data$ADIDU
> spatial.polygon <- polygon2spatial.polygon(polygon, coordinate.system== "+proj=lcc +lat_1=50 +lat_2=70 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0" ,names, nrepeats)
> 
> ADpoly is my spatialdataframe projected in canada lambert conformal
> 
> and this is the error:
> 
> cannot evaluate the  'obj' when selecting a mthod for the 'coordinates' function
> 
> Please may someone help me?
> 	[[alternative HTML version deleted]]
> 
> 
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 

-- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
83 33081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de



More information about the R-sig-Geo mailing list