Opened 12 years ago

Closed 12 years ago

#4416 closed defect (fixed)

PostGIS raster driver using obsolete column names and constructs

Reported by: robe Owned by: jorgearevalo
Priority: normal Milestone: 1.9.1
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords: postgis_raster, postgisraster, wktraster
Cc: jorgearevalo, dzwarg

Description (last modified by robe)

I guess its probably too late to get these fixes in for 1.9.0 since you are at rc1 already.

Couple of issues with PostGIS raster driver detailed in http://trac.osgeo.org/postgis/ticket/1422

postgisraserrasterband.cpp is using obsolete column names.

Line 118:

   osCommand.Printf("select o_table_name, overview_factor, o_column, "
                "o_table_schema from raster_overviews where r_table_schema = "
                "'%s' and r_table_name = '%s' and r_column = '%s'",
                poDS->pszSchema, poDS->pszTable, poDS->pszColumn);

should be:

   osCommand.Printf("select o_table_name, overview_factor, o_raster_column, "
                "o_table_schema from raster_overviews where r_table_schema = "
                "'%s' and r_table_name = '%s' and r_raster_column = '%s'",
                poDS->pszSchema, poDS->pszTable, poDS->pszColumn);

New raster meta views are documented in: http://www.postgis.org/documentation/manual-svn/using_raster.xml.html#RT_Raster_Overviews

and http://www.postgis.org/documentation/manual-svn/using_raster.xml.html#RT_Raster_Columns

Also the use of construct:

st_setsrid(st_makebox2d(st_point(%f, %f), st_point(%f,"
                "%f)),%d)

shoudl be replaced with:

st_makeenvelope(%f, %f, %f,%f,%d)

As documented here: http://www.postgis.org/documentation/manual-svn/ST_MakeEnvelope.html

Since we are slowly phasing out the use of box2d

Change History (10)

comment:1 by robe, 12 years ago

Description: modified (diff)
Summary: PostGIS raster driverPostGIS raster driver using obsolete column names and constructs

comment:2 by warmerdam, 12 years ago

Component: defaultGDAL_Raster
Keywords: postgis raster added

Regina,

Yes, I think this is too late for 1.9.0 unless the RC is cancelled. But there is no reason not to have it fixed in 1.9 branch as soon as is practical. I'm not really in a position to test changes though so I'm hesitant to apply them.

comment:3 by Even Rouault, 12 years ago

Cc: jorgearevalo added

comment:4 by pracine, 12 years ago

Owner: changed from warmerdam to jorgearevalo

comment:5 by pracine, 12 years ago

Keywords: postgis_raster added; postgis raster removed

comment:6 by dzwarg, 12 years ago

Cc: dzwarg added

comment:7 by jorgearevalo, 12 years ago

Status: newassigned

comment:8 by jorgearevalo, 12 years ago

Milestone: 1.9.1

comment:9 by Mateusz Łoskot, 12 years ago

Keywords: postgisraster wktraster added

comment:10 by jorgearevalo, 12 years ago

Resolution: fixed
Status: assignedclosed

Fixed in r24815 (Probably was fixed in a previous commit, but I'm sure this include it)

Note: See TracTickets for help on using tickets.