[Mapserver-users] getShare raises assertion error on PostGIS

Rainer Spittel rasp at tzi.de
Tue Jul 1 10:53:18 EDT 2003


Hi,

     I am using Apache, the MapServer V3.6 and PostGIS as the 
geodatabase. Both is running on Linux Suse 8.0. I have imported my 
shapefiles into the PostGIS database and now I get the following error 
message when I try to query an item:

[...]
   Dump query
   Query layer 0: built-up-area
   Query layer built-up-area: skip this layer
   Query layer 1: vegetation-zone
   field opened
   Inserting results 0
   ShapeIndex:99923
   TileIndex: -1
   ClassIndex:0

Fatal error: Assertion failed, Could not set shape values: 0, 0 in 
/usr/local/apache/htdocs/mapserver/test_map/htdocs/mapserv.php3 on line 737

The php-document look like this:

[...]
   printf("Inserting results %s<BR>\n",$iRes);
   $oRes = $oLayer->getResult($iRes);

   printf("ShapeIndex:%s<BR>",$oRes->shapeindex);
   printf("TileIndex: %s<BR>",$oRes->tileindex);
   printf("ClassIndex:%s<BR>",$oRes->classindex);

   $oShape = $oLayer->getShape($oRes->tileindex,$oRes->shapeindex);

   printf("<TR>\n");	
[...]

This error occures when the "getShape" methode will be processed. When I 
look into the postgis database, I am not able to find an object with 
this id. A dump of the table "vegetation-zone" looks like:

  gid   kn        gn      area         the_geom

    0   04000000  Bremen  578682.171 
SRID=-1;MULTIPOLYGON(((3476450.95, [...])

    1   04000000  Bremen  77603646.804 
SRID=-1;MULTIPOLYGON(((3475408.58, [...])

Is the internal SRID wrong or what am I doing wrong?

R. Spittel
---------------------------------------------------------------




More information about the mapserver-users mailing list