[R-sig-Geo] Revisiting convUL for different projections

Edzer Pebesma edzer.pebesma at uni-muenster.de
Thu Sep 10 22:16:55 CEST 2009


Patrick, you may want to try reading your data with function readOGR in
package rgdal. It's documentation says: It will set the spatial
reference system if the layer has such metadata. The syntax could be
something like:

ice <- readOGR(".", "extent_N_200906_polygon")
--
Edzer

patrick shaw wrote:
> R-geo users,
>
> I am new at posting, please forgive if I err in protocol.  I have searched the archives, but cannot locate the exact fix to this problem:
>
> I am using a shapefile from NSIDC (sea ice data) with a strange projection.  I believe it is in stereographic UTM, so I would like to be able to plot it in lat/lon or alternatively, project existing lat/lon data (e.g. ship tracks) onto the stereographic projection.   I have tried PBSMapping, sp, maptools and gdal, but no single one seems to fix the 'invalid' projection issue. 
>
> ice <- importShapefile("extent_N_200906_polygon.shp", readDBF=TRUE)
> plotMap(ice, projection=TRUE) 
> convUL(ice)
>
>  >> Error in convUL(ice) : Missing or invalid projection attribute.
>
> where the .prj file for the associated .shp file is:
>
> PROJCS["Stereographic_North_Pole",GEOGCS["GCS_WGS_1984",
> DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],
> PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],
> PROJECTION["Stereographic_North_Pole"],PARAMETER["standard_parallel_1",70],
> PARAMETER["central_meridian",-45],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],
> PARAMETER["false_northing",0],UNIT["Meter",1]]
>
>
> Thank you
>
> ~ patrick
>
>
>
>
>
> _________________________________________________________________
>
>
> :ON:WL:en-US:SI_SB_online:082009
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> 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
8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de/
http://www.springer.com/978-0-387-78170-9 e.pebesma at wwu.de



More information about the R-sig-Geo mailing list