[postgis-devel] [PostGIS] #1422: [raster] Issues with Mapserver and GDAL
PostGIS
trac at osgeo.org
Sat Dec 31 03:31:11 PST 2011
#1422: [raster] Issues with Mapserver and GDAL
----------------------------+-----------------------------------------------
Reporter: robe | Owner: pracine
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.0.0
Component: postgis raster | Version: trunk
Keywords: |
----------------------------+-----------------------------------------------
Comment(by rouault):
I don't think MapServer is involved at all in that issue. It only relies
on the GDAL PostgisRaster driver, where actually you can find the culprit
request :
{{{
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);
}}}
The same for the other request :
{{{
osCommand.Printf("select rid, %s from %s.%s where %s ~ "
"st_setsrid(st_makebox2d(st_point(%f, %f), st_point(%f,"
"%f)),%d)", pszColumn, pszSchema, pszTable, pszColumn,
dfProjLowerLeftX, dfProjLowerLeftY, dfProjUpperRightX,
dfProjUpperRightY, poPostGISRasterDS->nSrid);
}}}
Once the PostgisRaster driver is optimized, MapServer performance should
improve.
Looking a bit at the driver, I also see things in the
PostGISRasterDataset::IRasterIO() implementation, in particular the
bBlocksCached concept, that lead me to think that only the first call to
IRasterIO() will be properly optimized (and potentially too much
agressively optimized if the query window is larger than the GDAL block
cache size!), but if further calls are made with a different window, they
will fallback to the non-optimized IReadBlock().
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1422#comment:3>
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