[gdal-dev] "fixing" CRS for a read-only raster

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] "fixing" CRS for a read-only raster

Idan Miara
Hi,

I have an ECW raster with a wrong CRS (which I believe can't change because I don't have the ECW writer license).
Is there an option to add an aux/prj file next to it so that GDAL will read the correct CRS from the aux file instead of from the ECW file ( i.e. from GeoServer/QGIS) ?
I know I can workaround it with a VRT file but I think it might degrade the performance.

Kind Regards,
Idan

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: "fixing" CRS for a read-only raster

Even Rouault-2
Idan,

>
> I have an ECW raster with a wrong CRS (which I believe can't change because
> I don't have the ECW writer license).

Changes in the header don't require a write license

So gdal_edit.py -a_srs EPSG:xxxx your.ecw

should work and modify in place the ECW

Otherwise you can add the -ro flag to the above, and it will generate a
.ecw.aux.xml file with the overriden projection info.

> Is there an option to add an aux/prj file next to it so that GDAL will read
> the correct CRS from the aux file instead of from the ECW file ( i.e. from
> GeoServer/QGIS) ?
> I know I can workaround it with a VRT file but I think it might degrade the
> performance.

For "simple VRT" generated with "gdal_translate your.ecw your.vrt -a_srs
EPSG:xxxx -of VRT", the VRT driver has optimizations to directly forward pixel
requests to the underlying driver with minimal overhead.

Even

--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev