I am able to import raster data easily into the database and view it through QGIS. However, I am unable to view the raster layer in Arcgis. Now I want to know how to create a table with a reference to raster files outside the datbaase. However, there isn't much discuss or example with regards to how it can be done. I want to see its benefits given that raster layers can be shared across various applications.

Please share your knowledge on this?

Thanks in advance.


Use the -R flag when using raster2pgsql to add the raster into PostGIS. The -R flag indicates that the raster will be stored out-of-db. All of the raster analysis functions in PostGIS will work but not the write functions, e.g. set pixel values, add bands. In my limited testing, the performance of out-of-db rasters is slower than in-db.


  • Thank you. Is it possible to view the table with arcmap. I could not see it because of the postgis raster data type. I thought since it only maintance a reference to the images outside the database it might be just a geometry type. Any suggestion
    Jul 26 '12 at 16:44
  • If you're using out-of-db rasters, you don't need ArcGIS to call PostGIS. Just point ArcGIS directly to the raster files themselves.
    – dustymugs
    Jul 27 '12 at 22:56

In my work I store raster as a varchar pointing to the raster name, I use Django Framework (python) and as an example the procedure that I use is the following:

1) Have common path for the files ex: RASTER_PATH=/home/rasters
2) In the moment of creation the raster gets a hash name with py's hashlib (ex. 2d9e74148425752af7587c5b419542cb54480c49).
3) Only the name is stored in the DB. The file is stored in the RASTER_PATH.
4) When I need the raster I join the path with the name.
5) That's very versatile, I use the same name to create stores in GeoServer. And to create (hashed) layer names.

  • 1
    Thanks for your information pablo.I need to use ArcGIS. So, I am exploring better way of accessing raster data.
    Jul 26 '12 at 17:44

QGIS uses the GDAL PostGIS Raster driver to display the data. I know it has a problem (I'm the developer of the driver). Actually working on it. Results expected before September.

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.