[postgis-devel] Some thoughts about PostGIS Raster I'd like to share

Jorge Arévalo jorgearevalo at libregis.org
Tue Jun 4 13:20:17 PDT 2013


El martes 4 de junio de 2013 a las 19:27, dustymugs escribió:
> On 06/04/2013 10:00 AM, Jorge Arévalo wrote:
> >  
> >  
> > El martes 4 de junio de 2013 a las 18:40, Sandro Santilli escribió:
> >  
> > > On Tue, Jun 04, 2013 at 06:19:46PM +0200, Jorge Arévalo wrote:
> > >  
> > > > For example, about scale_x: "This is only available if all tiles in the raster column have the same scale_x and this constraint is applied.". What about allowing the user to specify an strategy to calculate this, even when all tiles have different scale_x values? Same applies to scale_y. And pixel height and width. Something like the '-resolution' flag in gdalbuildvrt.
> > >  
> > >  
> > > What do you mean by "strategy to calculate" ? Can you make an example ?
> > > If all tiles have the same scale a constraint would be appropriate and
> > > expose that information in the raster_table already, no ?
> >  
> >  
> >  
> >  
> > Ok, check this http://trac.osgeo.org/gdal/browser/branches/1.10/gdal/apps/gdalbuildvrt.cpp#L1086
> >  
> > As resolution of all input tiles is not the same, user can provide a flag to tell gdalbuildvrt how to calculate the output resolution for the raster (average, in the example).  
> >  
> > In PostGIS Raster, you can have all tiles with different width, height and pixel size. Even different SRID. If you want to use them to form a dataset, you can do it in the same way VRT does. The driver can calculate this. Or the user could provide it when loading the raster data in PostGIS Raster (like gdalvrtbuild does with VRT).
> >  
> > I know this would mean to adapt PostGIS Raster to a particular use case. I only consider it as an option.
>  
> For me, what you're describing here is similar to a user wanting to use
> a text column to add integer data and expect something like the
> following to be fast:
>  
> mytextcolumn < 100
>  
> I just don't see something like this being appropriate for
> raster_columns or embedded within a raster object. As in my analogy
> above, this just seems like bad practice and violating all the best
> practices when building a database model.
>  
> I could see a custom PostgreSQL background worker process that could
> create a cache somewhere for consumption by clients.


Yes, not the best practice. I'm just trying to solve a practical use case: bunch of rasters stored in PostGIS Raster table. All with different dimensions and scale. They form a complete coverage. GDAL driver can show the coverage. It uses VRT driver under the hood. But it's not faster enough (MapServer serving data).  

GDAL driver is being improved to make a smarter use of the cache, but still needs to fetch all the data from db, anyway.

  
>  
> -bborie
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org (mailto:postgis-devel at lists.osgeo.org)
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel






More information about the postgis-devel mailing list