[R-sig-Geo] readOGR loses projection name?
Zev Ross
zev at zevross.com
Mon Sep 11 17:42:45 CEST 2006
Hi All,
I think this is probably a simple one. I'm reading a shapefile, making a
couple of changes and then sending it back out to shapefile. I am making
no changes to the prj information but for some reason it seems that the
projection name is being lost in the process. This is a non-traditional
projection, one used by many California government agencies. It appears
that the actual projection information is being maintained correctly,
but I'd like to keep the name.
Zev
Here's the relevant piece of the code:
myprj<-readOGR("c:/junk/monitors", layer="monitors_all")
showWKT(proj4string(myprj),file="c/junk/monitors_all.prj")
here is the prj that I'm reading in
PROJCS["NAD_1983_California_Teale_Albers",GEOGCS["GCS_North_American_1983",
DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],
PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Albers"],
PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",-4000000.0],
PARAMETER["Central_Meridian",-120.0],PARAMETER["Standard_Parallel_1",34.0],
PARAMETER["Standard_Parallel_2",40.5],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]
here is the output prj
PROJCS["Unknown",GEOGCS["GCS_North_American_1983",
DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],
PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Albers"],
PARAMETER["standard_parallel_1",34],PARAMETER["standard_parallel_2",40.5],
PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-120],
PARAMETER["false_easting",0],PARAMETER["false_northing",-4000000],UNIT["Meter",1]]
--
Zev Ross
ZevRoss Spatial Analysis
303 Fairmount Ave.
Ithaca, NY 14850
(607) 277-0004 (phone)
(866) 877-3690 (fax toll-free)
zev at zevross.com
www.zevross.com
More information about the R-sig-Geo
mailing list