Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using GDAL tools to retrieve PostGiS raster. The code(command line) I am using is as follows :

gdal_translate -of AAIGrid "PG:host=localhost dbname='database' user='postgres' password='admin' schema='public' table='rastertable' where='rid=2'" postgis.asc

And it shows error: rastertable doesn't seem to have regular blocking arrangement. Only tables with regular blocking arrangement can be read from now.

I never heard the blocking arrangement before and I am sure the table in my postgis is a raster table. Any ideas? Thanks.

share|improve this question
Until this question showed up, the top Google hit for the error message text was at Section 3.2 looks like the relevant one (although its answer may be unsatisfactory: "the driver is under development, and will work with more raster arrangements ASAP"). – whuber May 24 '13 at 16:53

I'm the developer of the GDAL PostIS Raster driver. I think that message comes from a really old version of GDAL. I think 1.7, or 1.8.

The message means that PostGIS Raster doesn't consider your loaded raster image as regularly blocked image. Let me clarify that:

A PostGIS Raster table is, basically, a bunch of raster tiles, stored in a PostgreSQL table, coming from a raster file from disk.

To load a raster file into PostgreSQL with PostGIS 2.0 extension, you need to use the PostGIS Raster loader. One of the most interesting loader's options is -t flag. It forces the loader to split your image into tiles. So, each resulting tile (plus its metadata) will be a PostgreSQL row. With this method, all the tiles have the same dimensions (width and height), and you can say the resulting PostGIS Raster table has regular blocking.

However, PostGIS Raster extension allows more raster arrangements. The above is the easiest case. The point is not all tiles stored in a PostGIS Raster table are forced to have the same dimensions. Neither the same pixel size. So, at the end, your PostGIS Raster table may be a bunch of unrelated tiles, with totally different dimensions.

The old versions of GDAL PostGIS Raster driver just were able to work with the first easier arrangement: raster with same size tiles. Even raster images without tiles (I mean, all the image in just one row) were considered as non-regularly blocked images. And the reading speed was really low, anyway.

The current version of the driver (packed with GDAL 1.10) is much faster, and allows irregularly blocked images. Could you please give it a try? And don't hesitate to ask me if you have more problems.

share|improve this answer
Thanks a lot. I will try it later. How can contact you directly? Of course in your convenience. – Yu Guo May 28 '13 at 17:48
Your welcome. Just drop me an email: jorgearevalo at – jorgeas80 May 29 '13 at 13:14
Hi Jorge, I sent you an email. – Yu Guo May 30 '13 at 7:23
Hi Jorge, I drop you another email. Do you check that email address frequently ? – Yu Guo Jun 1 '13 at 8:59
Yes. I check it every day. I'll answer you before Monday. – jorgeas80 Jun 1 '13 at 13:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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