[Geoserver-devel] [jira] Created: (GEOS-2453) BBOX filter does not work on ArcSDE

BBOX filter does not work on ArcSDE
-----------------------------------

                 Key: GEOS-2453
                 URL: http://jira.codehaus.org/browse/GEOS-2453
             Project: GeoServer
          Issue Type: Bug
          Components: ArcSDE
    Affects Versions: 1.7.0-beta1
            Reporter: Bart van den Eijnden
            Assignee: Andrea Aime
             Fix For: 1.7.x

Original e-mail by Bart:
-----------------------------
when using a WFS layer in OpenLayers, I am running into the following:

query = [net.opengis.wfs.impl.QueryTypeImpl@anonymised.com (group: null,
propertyName: null, function: null, filter: [ bbox POLYGON
((-662636.524822695 130000, -662636.524822695 790000, 949136.524822695
790000, 949136.524822695 130000, -662636.524822695 130000)) ], sortBy:
null, featureVersion: null, handle: null, srsName: null, typeName:
[{http://www.openplans.org/topp\}KGNAT_DID.KGNAT_SCHETSLAAG_PUNT])]
maxFeatures = null
outputFormat = GML2
resultType = results
traverseXlinkDepth = null
traverseXlinkExpiry = null
10 Jun 15:02:54 ERROR [arcsde.pool] - Command execution failed for Session
3 in thread 25
java.lang.IllegalArgumentException: When querying against a spatial column,
your property name must match the spatial column name.You used ', but the
DB's spatial column name is 'SHAPE'

Why does Geoserver require the name of the spatial attribute on a WFS
GetGeature GET request with a BBOX? I can't find this requirement in the
OGC spec.

Answer from Andrea:
-----------------------------
I kind of remember something similar for GetFeature GET requests.
The spec does not forces you to specify the geometry, we build a filter
without specifying the geometry letting the datastores handle that,
and probably shapefiles and jdbc datastores are querying the default
geometry, whilst ArcSDE is failing on it...

Yeah, at GetFeatureKvpRequestReader.bboxFilter one can find the
following code:

BBOX bboxFilter(QName typeName, Envelope bbox) throws Exception {
FeatureTypeInfo featureTypeInfo =
catalog.getFeatureTypeInfo(typeName);
SimpleFeatureType featureType = featureTypeInfo.getFeatureType();

//JD: should this be applied to all geometries?
//String name = featureType.getDefaultGeometry().getLocalName();
//JD: changing to "" so it is
String name = "";

//get the epsg code
String epsgCode = null;
if ( bbox instanceof ReferencedEnvelope ) {
CoordinateReferenceSystem crs =
((ReferencedEnvelope)bbox).getCoordinateReferenceS ystem();
if ( crs != null ) {
epsgCode = GML2EncodingUtils.crs(crs);
}
}

return filterFactory.bbox(name, bbox.getMinX(), bbox.getMinY(),
bbox.getMaxX(),
bbox.getMaxY(), epsgCode);
}

So yeah, we're building a filter with an empty property name,
the other datastores are copying, ArcSDE is not.
Maybe we should just default to use the default geometry?
Wondering what the datastores are doing inside (using the default
geometry or building a filter that works on all of them
when there is more than one?).

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira