Wednesday 12 June 2019

raster - How to add ECW support to GDAL bundled with PostGIS Windows


I'm currently trying the new raster functionalities of PostGIS 2.0 and I successfully imported some GeoTIFF file into PostGIS (although it only find one band so it's all black and white for some reason). I used raster2pgsql.exe bundled with PostGIS 2 to store it.



Most of the raster data i have is in ECW format and I would like to import them directly with raster2pgsql. I know i can convert my ECW to GeoTIFF but i would like to do it without conversion.


When i list the supported input format of raster2pgsql (raster2pgsql -G), it does not list ECW as it can not be distributed with the install. So i downloaded the ERDAS SDK following these instructions: http://trac.osgeo.org/osgeo4w/wiki/pkg-gdal-ecw


And copied the DLL in my SysWOW64 system folder (i'm using Windows 7 64-bits). But it still won't list ECW as an input format. When looking up online, i found that PostGIS uses a bundled GDAL found in


C:\Program Files (x86)\PostgreSQL\8.4\bin\libgdal-1.dll


I don't know where to copy the DLLs so that the GDAL bundled with PostGIS will grab them and accept ECWs rasters. Or if anyone know how to tell PostGIS to use the GDAL install that comes with FWTools (C:\Program Files (x86)\FWTools2.4.7\bin) which is directly compatible with ECWs (path variables?)


Thanks a lot for your help!


Fabien




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...