Opened 10 years ago

Closed 10 years ago

#5529 closed defect (fixed)

postgisraster driver confused by multiple raster columns

Reported by: strk Owned by: warmerdam
Priority: normal Milestone: 1.11.1
Component: default Version: 1.11.0
Severity: normal Keywords:
Cc: jorge.arevalo@…, dzwarg@…

Description (last modified by strk)

When the raster_column view has multiple rows for the same table (for multiple columns) GDAL complains:

ERROR 1: Error, the table public.hyp_lr contains tiles with different srid. This feature is not yet supported by the PostGIS Raster driver. Please, specify a table that contains only tiles with the same srid or provide a 'where' constraint to select just the tiles with the same value for srid
GDALOpen failed - 1

Change History (5)

comment:1 by strk, 10 years ago

Sorry, I'm not sure this depends on the presence of a SRID=0 because I got the same message when setting the constraints, and thus getting the real SRID.

Checking the query sent by gdal, I find this:

select srid, nbband, ST_XMin(geom) as xmin, ST_XMax(geom) as xmax, ST_YMin(geom) as ymin, ST_YMax(geom) as ymax, scale_x, scale_y, blocksize_x, blocksize_y, same_alignment, regular_blocking from (select srid, extent geom, num_bands nbband, scale_x, scale_y, blocksize_x, blocksize_y, same_alignment, regular_blocking from raster_columns where r_table_schema = 'public' and r_table_name = 'hyp_lr') foo;

The query returns 2 records for me because the target column has 2 raster columns. But I've specified which column I wanted, using the "column" parameter:

table=hyp_lr column=rastnodata mode=2

comment:2 by strk, 10 years ago

This pull request fixes the problem of multicolumn: https://github.com/OSGeo/gdal/pull/35

comment:3 by strk, 10 years ago

Milestone: 1.11.1
Version: svn-trunk1.11.0

Another pull request is ready for the 1.11 branch: https://github.com/OSGeo/gdal/pull/36 (the previous one is for trunk)

comment:4 by strk, 10 years ago

Description: modified (diff)
Summary: SRID=0 in raster_columns is taken as != from actual data sridpostgisraster driver confused by multiple raster columns

comment:5 by Even Rouault, 10 years ago

Resolution: fixed
Status: newclosed

Patch commited in trunk (r27472) and branches/1.11 (r27473). Only compile tested by myself.

Note: See TracTickets for help on using tickets.