[R-sig-Geo] towgs snd prj files

Agustin Lobo alobolistas at gmail.com
Wed Nov 7 13:24:33 CET 2012


Just to complement the info I provided, QGIS writes, for the same
proj4 info, the following prj file:
PROJCS["ED50_UTM_zone_31N",GEOGCS["GCS_European_1950",DATUM["D_European_1950",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]

which is a bit different than the prj written by writeOGR() (see former message)

The point is that when QGIS opens a shapefile with the prj written by
writeOGR(), the towgs84 coefficients are not assumed, while
when it reads a shapefile with the prj written by QGIS (above), the
towgs84 coefficients are assumed. And this has implications
in the onthefly reprojection.

I do not know if this is a QGIS idiosyncratic behaviour or it is
generally assumed that ["ED50_UTM_zone_31N" includes the towgs84
coefficients

Agus

On Wed, Nov 7, 2012 at 11:44 AM, Agustin Lobo <alobolistas at gmail.com> wrote:
> This might be a bit off-topic.
> I do:
>> wpBert700 at proj4string
> CRS arguments:
>  +init=epsg:23031 +proj=utm +zone=31 +ellps=intl
> +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs
>> writeOGR(wpBert700,dsn="wpBert700v2",layer="wpBert700v2",driver="ESRI Shapefile",overwrite=T)
>
> But the created prj file:
> PROJCS["UTM_Zone_31_Northern_Hemisphere",GEOGCS["GCS_International
> 1909 (Hayford)",DATUM["D_unknown",SPHEROID["intl",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]
>
> lacks the +towgs84=-87,-98,-121,0,0,0,0 information, which is a
> problem if I do not remember I have to add it for a GIS display
> with reprojection on the fly.
> Is there any vector format that can  be written by rgdal in which the
> CRS info would include the +towgs84=-87,-98,-121,0,0,0,0 ?
>
> Thanks!
>
> Agus



More information about the R-sig-Geo mailing list