[mapserver-users] Problem querying SDE layer

Debbie Pagurek pagurekd at agr.gc.ca
Tue Oct 22 09:57:29 EDT 2002


I have an application that is displaying, zooming etc and SDE layer and that's all working fine, but whenever I try to query I'm getting:

Content-type: text/html msSDELayerGetShape(): SDE error. SE_stream_fetch(): Shape or row not found. (-22) 

Can anyone suggest what might be wrong?  Is querying an SDE layer with Mapserver different in some way from querying anything else (shapefile)?

Below is my mapfile and template file (test.html)

Thanks,
D. Pagurek

#
# Start of map file
#
NAME META
SIZE 500 434
EXTENT -2647393 5656194 2892379 10462762
UNITS METERS

IMAGECOLOR 255 255 255

# Start of web interface definition
#
WEB
TEMPLATE 'meta.html'
  IMAGEPATH '/usr/www/httpd/htdocs/mapdata/tmp/'
  IMAGEURL '/mapdata/tmp/'
END

#
# Start of legend
#
LEGEND
  STATUS ON
   OUTLINECOLOR 0 0 0
   KEYSIZE 18 12
   LABEL
     TYPE BITMAP
     SIZE SMALL
     COLOR 0 0 0
    END
  END   #LEGEND

#
# Start of scalebar
#
SCALEBAR
  IMAGECOLOR 255 255 255
  LABEL
    COLOR 255 0 0
    SIZE tiny
  END  #LABEL
  STYLE 1
  SIZE 100 4
  COLOR 153 153 153
  UNITS meters
  INTERVALS 3
END   #SCALEBAR

#
# Start of layer definitions
LAYER
  NAME surveys
  TYPE polygon
  STATUS DEFAULT
  CONNECTIONTYPE sde
  CONNECTION "myserver.gis.agr.ca,esri_sde,ORACLE,meta,mapper"
  DATA "SURVEYINDEX,shape"
TEMPLATE "test.html"
  CLASSITEM 'STATUS'
      CLASS
        EXPRESSION 'NOT SURVEYED'
        NAME 'Not Surveyed'
        COLOR 153 153 153
        OUTLINECOLOR 0 0 0
      END
      CLASS
        EXPRESSION 'NOT DIGITAL'
        NAME 'Not Digital'
        COLOR 153 0 51
        OUTLINECOLOR 0 0 0
      END
      CLASS
        EXPRESSION 'NOT ONLINE'
        NAME 'Not Online'
        COLOR 255 0 0
        OUTLINECOLOR 0 0 0
      END
      CLASS
        EXPRESSION 'INCOMPLETE'
        NAME 'Incomplete'
        COLOR 255 255 0
        OUTLINECOLOR 0 0 0
      END
      CLASS
        EXPRESSION 'COMPLETE'
        NAME 'Complete'
        COLOR 51 255 0
        OUTLINECOLOR 0 0 0
      END
      CLASS
        EXPRESSION 'WATER'
        NAME 'Water'
        COLOR 0 0 255
        OUTLINECOLOR 0 0 0
      END
 TOLERANCEUNITS METERS
 TOLERANCE 3

END  # LAYER

END  # MAPFILE



My template file isn't coming up at all, instead I get the above error message.
But here's what it looks like:

<html>
<body>
<b>SEARCH WINDOW</b>: [imgext]<br>
<b>QUERY POINT</b>: ([img.x], [img.y]) image coordinates or ([mapx], [mapy]) map coordinates<br>
<p>

INDEX_ID=[INDEX_ID]<br>
STATUS=[STATUS]<br>

</body>
</html>








More information about the mapserver-users mailing list