uDIG
  1. uDIG
  2. UDIG-1589

TableView - Any CQL filter doesn't work.

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: UDIG 1.2.M8
    • Fix Version/s: UDIG 1.2.RC1
    • Component/s: tools and editing
    • Labels:
      None
    • Environment:
      linux_x86, java6

      Description

      Tested environment:
      Udig-trunk, udig-M8

      Using the countries.shp execute the next CQL query: CONTAINS (the_geom, POINT (20 20))

      It doesn't select any feature. If you try to execute any other CQL query, it doesn't matter if it is a spatial relationship query or a text query like "FID like 'cou%'", they won't work.

      Those queries worked on udig-m6 and m7, I have read the code and is the same for all the versions, so the problem relies on the datastore. I think the next code doesn't return the proper values:

      final DefaultQuery query=new DefaultQuery(schema.getName().getLocalPart(), filter, Query.NO_NAMES );

      FeatureCollection<SimpleFeatureType, SimpleFeature> features = source.getFeatures( query );

        Activity

        Hide
        Jody Garnett added a comment -
        GeoTools datastore issue; filter only works for shapefile if the attributes mentioned in the filter are part of those requested by the Query. Solved by getting a list of attributes from the filter and explicitly making a query to request those attributes. We then chew through that feature collection grabbing the FeatureID to form a selection.
        Show
        Jody Garnett added a comment - GeoTools datastore issue; filter only works for shapefile if the attributes mentioned in the filter are part of those requested by the Query. Solved by getting a list of attributes from the filter and explicitly making a query to request those attributes. We then chew through that feature collection grabbing the FeatureID to form a selection.

          People

          • Assignee:
            Jody Garnett
            Reporter:
            Aritz Davila
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: