[Gdal-dev] OGR - set layer's spatial reference

Frank Warmerdam warmerdam at pobox.com
Fri Nov 3 16:05:40 EST 2006


Martin Dobias wrote:
> Hi,
> 
> I'm searching for a way how to change layer's spatial reference. It
> seems that it can be set only when creating the layer with
> OGRDataSource::CreateLayer(). Then, OGRLayer has function
> GetSpatialRef(), but documentation says that the returned spatial
> reference shouldn't be modified by application. Is there any way how
> to modify it once layer has been created?

Martin,

No, I'm afraid not.

In some cases you can go around OGR to modify it, for instance with direct
SQL against postgis, or modifying the .prj for a shapefile.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list