1. GeoServer
  2. GEOS-2453

BBOX filter does not work on ArcSDE


    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.0-beta1
    • Fix Version/s: 1.7.1, 2.0.x
    • Component/s: ArcSDE
    • Labels:
    • Number of attachments :


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

      query = [net.opengis.wfs.impl.QueryTypeImpl@17c42d4 (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:


      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 =
      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 =;

      return filterFactory.bbox(name, bbox.getMinX(), bbox.getMinY(),
      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?).

        Issue Links


          Gabriel Roldan added a comment -

          fixed as per the related geotools issue.

          Gabriel Roldan added a comment - fixed as per the related geotools issue.


            • Assignee:
              Gabriel Roldan
              Bart van den Eijnden


              • Created: