[postgis-devel] [PostGIS] #497: [raster] Start testing displaying PostGIS raster with Mapserver
PostGIS
trac at osgeo.org
Wed Feb 16 08:16:24 PST 2011
#497: [raster] Start testing displaying PostGIS raster with Mapserver
----------------------------+-----------------------------------------------
Reporter: robe | Owner: robe
Type: task | Status: new
Priority: medium | Milestone: PostGIS 2.0.0
Component: postgis raster | Version: trunk
Keywords: |
----------------------------+-----------------------------------------------
Comment(by jorgearevalo):
We're mixing 2 different queries here:
The metadata query is only used when creating the GDALDataset object,
before querying for any data block. Just to inform GDAL about the
properties of the raster. With "mode = 2", the driver expect 1 table = 1
raster coverage = 1 GDALDataset object, and it needs to know some things
about the raster, like georreference (of the WHOLE coverage, not only 1
row), extent, srid (again, of the whole coverage). For this reason, I
execute a query to fetch the metadata of all rows. I could limit the query
to 1 result, like you said, but we have a problem here:
> If I use mode='2' I was assuming that meant to create one GDALRaster
dataset and
> assume that by saying mode='2' I'm basically saying its evenly blocked,
it has the
> same srid and there are no overlapping tiles.
The driver expects that, but if the raster is not evenly blocked, if
there're rows with different srid... it must do something. For example:
warn the user and exit, or resample all the rows to the grid of the first
one, or ask for a new grid alingment.
Of course, the first option is the easiest one, but the point is the
driver still needs to know it. It must check if everything is just like
expected (raster evenly blocked, all tiles with same srid, no overlapping
tiles). It must get the metadata of all tiles, to check it. Or am I wrong
with my approach?
Apart from this, a different query is the query executed when the driver
really asks for data. No metadata involved in this query. Only x,y offsets
that must be converted to a specific data block (using georeference
information and a spatial operator, like &&, or ~). I argue the query I'm
using is too slow, because implies one server round per readblock call.
{{{
SELECT rid, rast FROM aerials.o_2_boston WHERE rast ~
ST_SETSRID(ST_makebox2d(st_point(225866,892151),
st_point(225926,892211)),26986);
}}}
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/497#comment:13>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list