I have ECW imagery I want to store in my spatial database. I am using QGIS and a PostGIS database. How do I do it? Everything I have read so far (its actually unreadable to me) seems way too complicated when I was hoping for a drag'n'drop, cut'n'paste or "import to database" kind of solution. I'm a geographer not an IT boffin. Anything out there, or should I buy an Esri license?

  • convert your ecw file to tiff first > gdal.org/frmt_ecw.html example gdal_translate -of ECW -co TARGET=0 -a_srs EPSG:4326 input.ecw output.tif – Mapperz Mar 4 '19 at 3:09
  • OK then....... I have a tiff but still none the wiser how to get it into my PostGIS database, I've read about something called "raster2pgsql" but no idea what that is, where it is or how to use it. Most stuff I've read seems to presume once you know this phrase you know how to use it? Do I type it in somewhere? or download it and run it? "Gdal" also pops up a lot but again no idea what that is, I don't write script or code just reading about that stuff is gobbledygook to me. Whatever happened to tools/ buttons like "import to database". Very Frustrating – Matt D Mar 4 '19 at 23:32

What operating system are you using? I suspect you are using windows. If so you should go to Start Menu>Programs >QGIS>Osgeo shell. This will open a shell where you can use the raster2pgsql command as specified in the tutorials. In order to get the path where your raster is use the file explorer and copy the path. Remember to quote the full path as it might be having spaces eg “C:/users/Documents/test.tif” Alternatively look at this answer Loading a raster using QGIS into a PostGIS2.0 enabled database If the above solutions do not work for you please consider investing the money you were to use for an Esri License to sponsor a QGIS developer to write a GUI for you and the whole community will benefit. Get in touch

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.