[postgis-devel] [PostGIS] #1422: [raster] Issues with Mapserver and GDAL

PostGIS trac at osgeo.org
Fri Dec 30 10:32:33 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:                  |  
----------------------------+-----------------------------------------------
 Bborie,

 I think you are right that gdal is not aware of the new column naming.
 Though I'm not sure if that is coded in GDAL or mapserver.

 I'm seeing two issues.

 In my PostgreSQL logs for mapserver 6.0.1 and 6.1 svn I see this error:



 -- this is the query its executing ---
  select o_table_name, overview_factor, o_column, o_table_schema from
 raster_overviews where r_table_schema = 'aerials' and r_table_name =
 'o_4_boston' and r_column = 'rast';

 --and error:

 column "o_column" does not exist

 }}}


 The more disturbing issue I am seeing is that with my mapserver 6.0.1 my
 aerials load all be-it kind of slow and it seems to transform too.

 Doing queries something of the form:


 {{{
 ST_SetSRID(ST_MakeBox2d(ST_MakePoint(samepoint),
 ST_MakePoint(samepoint)),26986)
 }}}

 My 6.1 is not putting in a spatial filter at all -- its trying to do a
 query like this:


 {{{
 select (foo.md).* from (select distinct st_bandmetadata( rast, 3) as md
 from aerials. o_4_boston) as foo;

 -- and--
 select st_astext(st_setsrid(st_extent(rast::geometry),26986)) from
 aerials.o_4_boston;

 }}}

 Which is repeated for each band. Given I have 9396 records in o_4_boston
 table (and it does a separate for each band 9396*3), its no wonder the
 thing never loads.

 My mapserver layer looks like this:
 {{{
 LAYER
         NAME boston_aerials
         TYPE raster
         STATUS ON
         MINSCALE 1
     MAXSCALE 1000
         DATA "PG:host=localhost port=5433 dbname='dnddts' user='mapuser'
 schema='aerials' table='o_4_boston' column='rast'"
         #PROCESSING "NODATA=0"
 END
 }}}


 I'll have to swap my binaries again to log the 6.01 but it was definitely
 (smarter and correctly transforming and rendering the aerial in the right
 spot) or the syntax has changed between 6.01 and 6.1.

 My OpenLayers query looks something like:


 {{{
 mapserv?LAYERS=boston_aerials&STYLES=&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&BBOX=-7916494.5962898,5208175.3278665,-7916353.5162278,5208332.0834909&WIDTH=945&HEIGHT=1050
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1422>
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