Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am trying to use a cgi script calling mapserver to display a raster layer that is stored in a PostGIS database. However, only a blank white image is returned and I don't know where the problem is.

The request seems to go through, but here is an error in the postgres log that I don't understand and the result is a white image.

My questions are:

  1. What does the error from the postgres server log mean (see below)?
  2. How can I make sure the white image is not due to a misspecification of the map extent?
  3. Is there something obvious that I am doing wrong?

Here is some more detailed info for this problem.

The mapserver request is:

http://someurl.com/mapserv.cgi?map=../../usr/maps/test.map&mode=map&layers=kahoo&

The error from the postgres server log:

ERROR:  column "o_column" does not exist at character 39
STATEMENT:  select o_table_name, overview_factor, o_column, o_table_schema from raster_overviews where r_table_schema = 'public' and r_table_name = 'kahoo' and r_column = 'rast'

From the mapserver log:

.632473 msDrawMap(): rendering using outputformat named png (AGG/PNG).
.632541 msDrawMap(): WMS/WFS set-up and query, 0.000s
.633883 msDrawRasterLayerLow(kahoo): entering.
.859561 msDrawMap(): Layer 0 (kahoo), 0.227s
.859588 msDrawMap(): Drawing Label Cache, 0.000s
.859594 msDrawMap() total time: 0.227s
.862701 msSaveImage(stdout) total time: 0.003s
.862751 mapserv request processing time (loadmap not incl.): 0.231s
.862759 msFreeMap(): freeing map at 0x266bc60.

The mapfile used is:

MAP
 CONFIG "MS_ERRORFILE" "../../tmp/ms_error.txt"
 DEBUG 5

 NAME "test"
 SIZE 218 152
 EXTENT 739335 2268075 7761335 2284075
 UNITS METERS
 STATUS ON
 PROJECTION
  "init=epsg:26704"
 END

 WEB
  METADATA
    "wms_title"           "WMS Demo Server"
    "wms_onlineresource"  "http://someurl.com/mapserv.cgi?map=../../usr/maps/test.map&"
    "wms_enable_reqest"   "*"
  END
 END

 LAYER
    NAME kahoo
    TYPE RASTER
    STATUS ON
    DATA "PG:host=*** port=*** dbname='***' user='***' password='***' schema='public' table='kahoo' mode='2'" 
    PROCESSING "NODATA=0"
    PROJECTION
       "init=epsg:26704"
    END
 END
END

Here are the versions I am using: mapserver-6.0.3, postgresql-9.1.6, postgis-2.0.1

share|improve this question
add comment

1 Answer

It means that MapServer is trying to access a column that no longer exists in raster_overviews. Before PostGIS 2.0 was released, the raster_overviews table was re-implemented as a view and as part of that cleanup, various columns were removed, added or renamed.

If you're not on the latest MapServer, you may want to upgrade. If the latest still causes the same error, you'll want to file a ticket with MapServer.

share|improve this answer
    
I am using the latest stable version. So I will do as you recommended and file a ticket. Thanks. –  yellowcap Oct 3 '12 at 14:47
1  
It seems that its not a mapserver issue after all, but rather a PostGIS raster driver in GDAL. So I updated GDAL but I am still get the same error. So I asked a related question about gdal updates and postgis: gis.stackexchange.com/questions/34917/… –  yellowcap Oct 4 '12 at 8:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.