Opened 17 years ago
Closed 17 years ago
#2072 closed defect (invalid)
getFeatureInfo error with ArcSDE layers
Reported by: | sshim | Owned by: | hobu |
---|---|---|---|
Priority: | highest | Milestone: | 5.0 release |
Component: | Input - Native SDE Support | Version: | 4.10 |
Severity: | critical | Keywords: | |
Cc: |
Description
When we do a getFeatureInfo on an ArcSDE layer. The following error appears (see below):
GetFeatureInfo results:
Layer 'CALM_REGIONS-arcsde' Content-type: application/vnd.ogc.se_xml
<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?> <!DOCTYPE ServiceExceptionReport SYSTEM "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd"> <ServiceExceptionReport version="1.1.1"> <ServiceException> msSDELayerGetShape(): SDE error. SE_stream_fetch_row(): Invalid parameter value passed to function. (-66) </ServiceException> </ServiceExceptionReport>
We have no problems doing getFeatureInfo on either PostGIS or shape based layers. I have traced the relevant source code in mapsde.c (Line 1837 onwards): The version of mapsde.c is v1.144. I then put in a debug line to see what parameters were being passed into the SE_stream_fetch_row function:
if (!sde->join_table) {
status = SE_stream_fetch_row( sde->stream,
sde->table, record, (short)(layer->numitems), (const char )layer->items);
if (status != SE_SUCCESS) {
/* MY DEBUG LINE /
msDebug("SLIP: record:%d numitems:%d items:%s \n",
record, layer->numitems, layer->items);
/* END /
sde_error( status,
"msSDELayerGetShape()", "SE_stream_fetch_row()");
return(MS_FAILURE);
}
The debug returned was:
[Fri Apr 13 13:53:31 2007].864623 SLIP: record:-1 numitems:2 items:
My guess is that record shouldn't be "-1". What do you think? I would greatly appreciate any help on this. The following is the Layer Definition:
LAYER NAME "CALM_REGIONS-arcsde" CONNECTION "sliptest,5151,slip,sde,aslkzxmn" CONNECTIONTYPE SDE DATA "SDE.CALM_REGIONS,SHAPE,sde.DEFAULT" PROCESSING "CLOSE_CONNECTION=DEFER" DUMP true STATUS ON DEBUG ON TEMPLATE "blank.html" TYPE polygon SIZEUNITS PIXELS TOLERANCEUNITS PIXELS UNITS METERS METADATA "wms_title" "CALM - CALM_REGIONS (SDE)" "wms_srs" "epsg:4283 epsg:4326 epsg:28349 epsg:28350 epsg:28351" "ows_include_items" "all" END PROJECTION 'init=epsg:4283' END #PROJECTION CLASS NAME 'CALM_Regions' STYLE COLOR 0 0 255 OUTLINECOLOR 0 0 0 SIZE 5 END #STYLE END #CLASS END #LAYER
getFeatureInfo request:
Change History (3)
comment:1 by , 17 years ago
Status: | new → assigned |
---|
comment:2 by , 17 years ago
Milestone: | → 5.0 release |
---|
comment:3 by , 17 years ago
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
I imported the SDE export file you sent me. None of the columns in that layer are really appropriate to be the FID. WFS (and GetFeatureInfo) requests are not valid without a gml_featureid set. Normally, for an SDE layer, this would default to OBJECTID or you could override it with the PROCESSING option described above. The layer your export file defined renders fine for me, but without some sort of FID, OGC feature services are not going to work.
These links can describe in more detail what is required.
http://trac.osgeo.org/mapserver/search?ticket=on&changeset=on&wiki=on&q=gml_featureid
Stephen,
Revision 1.154 of mapsde.c (the latest in HEAD) now has a PROCESSING option to allow you to override the OBJECTID column.
Use it like so:
Please let me know if this does the trick for you.
Howard