[postgis-devel] [PostGIS] #2122: [raster] Real extent feature lost after metadata as views

Sandro Santilli strk at keybit.net
Fri Nov 30 09:07:20 PST 2012

On Fri, Nov 30, 2012 at 05:02:24PM +0000, Mateusz Loskot wrote:

> 1) It simply read extent of the source raster from GDAL, raster2pgsql.py:859
> http://trac.osgeo.org/postgis/browser/trunk/raster/scripts/python/raster2pgsql.py#L859
> 2) Then, it wrote the extent to raster_columns intact, raster2pgsql.py:860
> 3) Finally, for every tiles it read from GDAL, it calculated a) if
> padding is necessary
> and b) how much padding to add, then c) it burned some padding with NODATA,
> and eventually d) wrote padded tiles
> http://trac.osgeo.org/postgis/browser/trunk/raster/scripts/python/raster2pgsql.py#L772
> So, the 1+2 step was independent to 3 step.
> Currently, the step 1+2 is gone, instead the extent is calculated on-fly
> for whatever is written in 3 step.

Ok, so to get backward compatibility back we could to intercept updates to
"extent" in raster_columns and compose the constraint accordingly.

Was raster2pgsql changed already to deal with changes in postgis-2.0 or
does it still do the 3 steps above ? Does it use an INSERT or an UPDATE
to raster_columns ?


More information about the postgis-devel mailing list