[gdal-dev] Re: Change the spatial reference of a shapefile

Jean-Claude Repetto jrepetto at free.fr
Mon Jul 11 11:25:02 EDT 2011


Le 11/07/2011 12:12, Solimyr a écrit :
> Thx, I tried to copy the file .prj but didn't work so I moved to use the
> ogr2ogr method using -a_srs but I'm not able to do that...
> I get the spatialRef using ogrinfo, like:
>
>
> GEOGCS["GCS_WGS_1984",
>      DATUM["WGS_1984",
>          SPHEROID["WGS_1984",637813.0,298.252223563]],
>      PRIMEM["Greenwich",0.0],
>      UNIT["Degree",0.0174532925199433]]
>
> But I don't know how use it with the ogr2ogr utility. I think that I must
> just use this spatialRef to the new shapefile but I don't know why I must
> put the source and also the dst....I tried:
>
>
> ogr2ogr -a_srs GEOGCS["GCS_WGS_1984",\n    DATUM["WGS_1984",\n
> SPHEROID["WGS_1984",637813.0,298.252223563]],\n
> PRIMEM["Greenwich",0.0],\n    UNIT["Degree",0.0174532925199433]] shape.shp
>
> But doesn't work...

You can use EPSG codes :
-a_srs EPSG:4326

Jean-Claude


More information about the gdal-dev mailing list