[R-sig-Geo] e00 to SpatialPolygons: how to set the correct projection
Roger Bivand
Roger.Bivand at nhh.no
Mon Jan 26 12:06:23 CET 2009
On Mon, 26 Jan 2009, Hans-Jörg Bibiko wrote:
> Hi,
>
> I was able to convert an e00 file to a SpatialPolygons object (thanks a lot
> to everybody who was involved to set up this functionality!) by using
> 'e00toavc' and 'pal2SpatialPolygons'.
>
> But now I'm a bit lost in conversion. How to set the correct projection which
> is needed for 'pal2SpatialPolygons'?
>
> My prj.adf file says:
>
> Projection LAMBERT
> Zunits NO
> Units METERS
> Spheroid CLARKE1866
> Xshift 0.0000000000
> Yshift 0.0000000000
> Parameters
> 25 0 0.000 /* 1st standard parallel
> 47 0 0.000 /* 2nd standard parallel
> 110 0 0.000 /* central meridian
> 10 0 0.000 /* latitude of projection's origin
> 0.00000 /* false easting (meters)
> 0.00000 /* false northing (meters)
>
> and I want to use the data together with Roger Bivand's
> "http://spatial.nhh.no/R/etc/TM_WORLD_BORDERS_SIMPL-0.2.RData" data whose
> proj4string is set to
>
> "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +towgs84=0,0,0"
>
>
> I tried:
> NMG <- pal2SpatialPolygons(arcs,pal, IDs=IDs, proj4string =
> CRS("+proj=longlat +ellps=clrk66"))
No. Your data are in a Lambert projection, probably lcc, but possibly
laea, with the +lat_*= and +lon_0= arguments given. If 110 is 110E, you
are somewhere in Asia, but knowing how muddled things get, it may be 110W,
so -110, and North or Central America. If you have access to rgdal, try
reading the Arc binary vector data directly, the driver may pick up the
projection automatically.
Roger
>
> but it ended in:
>
> Error in validityMethod(object) :
> Geographical CRS given to non-conformant data
>
>
> If I skip the proj4string in 'pal2SpatialPolygons' I get
> NMG at bbox
> min max
> r1 -1037807 1141001
> r2 3093775 4892464
>
>
> By looking at this bbox and the actual area given in the e00 file I image
> that the bbox should be:
> min max
> r1 103.7807 114.1001
> r2 30.93775 48.92464
>
>
>
> Many thanks for any hint in advance!
>
> Best,
>
> --Hans
>
> **********************************************************
> Hans-Joerg Bibiko
> Max Planck Institute for Evolutionary Anthropology
> Department of Linguistics
> Deutscher Platz 6 phone: +49 (0) 341 3550 341
> D-04103 Leipzig fax: +49 (0) 341 3550 333
> Germany e-mail: bibiko at eva.mpg.de
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the R-sig-Geo
mailing list