[R-sig-Geo] how to rotate polygon after reading SHP file
Roger Bivand
Roger.Bivand at nhh.no
Sun Jun 7 12:02:25 CEST 2009
On Sat, 6 Jun 2009, Jian Li wrote:
>
>
> Dear Members,
>
> if I am using readShapePoly and spTransform for producing polygons, but the result polygons are not in right position.
> How can I rotate it clockwise for example like 5??
>
> natSHP.sp <- readShapePoly("nro2.shp", proj4string=CRS("+init=epsg:26978") )
> nat2.sp <- spTransform(natSHP.sp, CRS("+proj=longlat +ellps=WGS84"))
>
> Where can I get more detail information about the different options of
> CRS("+init=????")
IIRC, epsg:26978 appeared on analysis to be the correct description for
your e00 file (but possibly with the wrong datum). There is absolutely no
guarantee that this description applies to other files. Knowing the
correct description is like knowing the correct time zone for temporal
data, or which patient which lab slide should be associated with. It is an
absolute requirement for the correct use of spatial data when you need to
integrate the data with other positional information, here to align with
Google Maps.
See:
http://spatialreference.org/
http://www.asprs.org/resources/GRIDS/
for further hints. If the original second zone Gauß-Krũger doesn't work,
find the correct description.
Roger
PS: hint - nro2 is centred in Eastings on 0, while your earlier nat has
its centre on 3600000; the northings differ a lot too. It doesn't feel
like Gauß-Krũger or UTM, I'm afraid. Ask the originators of the file, and
ask why they did not provide adequate metadata, or the nro2.prj file.
>
> Best Regards,
> Jian
>
> _________________________________________________________________
> More than messages?check out the rest of the Windows Live?.
> http://www.microsoft.com/windows/windowslive/
> [[alternative HTML version deleted]]
>
>
--
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