[Geoserver-users] INTERSECT CQL_FILTER in feature request

Hi,
I am trying to make a wfs request on a point on a map using the following
CQL filter:
"http://localhost:8080/geoserver/wfs?request=GetFeature&PropertyName=NAME,TYPE&typeName=SCAMBS:united_kingdom_natural&outputFormat=GML2&CQL_FILTER=INTERSECT(the_geom,%20POINT%20(-5.95703125%2056.66796875))".
This returns the following unknown error in the XML:
<gml:boundedBy>
  <gml:null>unknown</gml:null>
</gml:boundedBy>

I have tried other CQL requests like CQL_FILTER=TYPE='forest' and it works
fine. It only seems to be when using the the_geom attribute that I am
getting errors. Does anyone know what might be causing this?
--
View this message in context: http://www.nabble.com/INTERSECT-CQL_FILTER-in-feature-request-tp23171719p23171719.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

dk80 ha scritto:

Hi,
I am trying to make a wfs request on a point on a map using the following
CQL filter:
"http://localhost:8080/geoserver/wfs?request=GetFeature&PropertyName=NAME,TYPE&typeName=SCAMBS:united_kingdom_natural&outputFormat=GML2&CQL_FILTER=INTERSECT(the_geom,%20POINT%20(-5.95703125%2056.66796875))".
This returns the following unknown error in the XML:
<gml:boundedBy>
  <gml:null>unknown</gml:null>
</gml:boundedBy>

I have tried other CQL requests like CQL_FILTER=TYPE='forest' and it works
fine. It only seems to be when using the the_geom attribute that I am
getting errors. Does anyone know what might be causing this?

Strange, just tries this one against the usual topp:states:

http://geo.openplans.org:8080/geoserver/wfs?service=WFS&version=1.0.0&request=GetFeature&typeName=topp:states&cql_filter=INTERSECT(the_geom,POINT(-95%2037))

and it works? That is a 1.7.2, also tried against a local 1.7.3 and it works as well.

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Andrea Aime-4 wrote:

Strange, just tries this one against the usual topp:states:

http://geo.openplans.org:8080/geoserver/wfs?service=WFS&version=1.0.0&request=GetFeature&typeName=topp:states&cql_filter=INTERSECT(the_geom,POINT(-95%2037))

and it works? That is a 1.7.2, also tried against a local 1.7.3 and it
works as well.

Thanks for your response. I tried the wfs request on topp:states on my local
server and it works fine so it looks like its a problem with my uploaded
map. I am using version 1.7.3. It seems strange that the other attributes
are recognised in the wfs requests and not the_geom. Is there anything in
the feature-type that might be causing this?

<featureType>
<name>united_kingdom_natural</name>
<nativeName>united_kingdom_natural</nativeName>

<namespace>
<name>SCAMBS</name>
<atom:link rel="alternate"
href="http://localhost:8080/geoserver/rest/namespaces/SCAMBS.xml&quot;
type="application/xml"/>
</namespace>

<nativeCRS>
GEOGCS["WGS 84",

  DATUM["WGS_1984",

    SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]],

    TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],

    AUTHORITY["EPSG","6326"]],

  PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],

  UNIT["degree", 0.017453292519943295],

  AXIS["Longitude", EAST],

  AXIS["Latitude", NORTH],

  AUTHORITY["EPSG","4326"]]
</nativeCRS>
<srs>EPSG:4326</srs>

<nativeBoundingBox>
<minx>-8.18125</minx>
<maxx>33.8149309</maxx>
<miny>34.5957938</miny>
<maxy>60.8018961</maxy>
<crs>EPSG:4326</crs>
</nativeBoundingBox>

<latLonBoundingBox>
<minx>-9.18125</minx>
<maxx>33.8149309</maxx>
<miny>34.5957938</miny>
<maxy>60.8018961</maxy>
<crs>EPSG:4326</crs>
</latLonBoundingBox>
<projectionPolicy>FORCE_DECLARED</projectionPolicy>
<enabled>true</enabled>

<metadata>

<indexingEnabled>
<boolean>false</boolean>
</indexingEnabled>

<cachingEnabled>
<boolean>false</boolean>
</cachingEnabled>

<gml.schemaSchema>
<string>united_kingdom_natural_Type</string>
</gml.schemaSchema>

<dirName>
<string>Natural_united_kingdom_natural</string>
</dirName>

<kml.regionateFeatureLimit>
<int>-1</int>
</kml.regionateFeatureLimit>
</metadata>

<store class="dataStore">
<name>Natural</name>
<atom:link rel="alternate"
href="http://localhost:8080/geoserver/rest/workspaces/SCAMBS/datastoresNatural.xml&quot;
type="application/xml"/>
</store>

<attributes>

<attribute>
<name>the_geom</name>
<minOccurs>0</minOccurs>
<maxOccurs>1</maxOccurs>
<nillable>false</nillable>
</attribute>

<attribute>
<name>NAME</name>
<minOccurs>0</minOccurs>
<maxOccurs>1</maxOccurs>
<nillable>false</nillable>
</attribute>

<attribute>
<name>TYPE</name>
<minOccurs>0</minOccurs>
<maxOccurs>1</maxOccurs>
<nillable>false</nillable>
</attribute>
</attributes>
<maxFeatures>0</maxFeatures>
<numDecimals>0</numDecimals>
</featureType>

--
View this message in context: http://www.nabble.com/INTERSECT-CQL_FILTER-in-feature-request-tp23171719p23173329.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

dk80 ha scritto:

Andrea Aime-4 wrote:

Strange, just tries this one against the usual topp:states:

http://geo.openplans.org:8080/geoserver/wfs?service=WFS&version=1.0.0&request=GetFeature&typeName=topp:states&cql_filter=INTERSECT(the_geom,POINT(-95%2037))

and it works? That is a 1.7.2, also tried against a local 1.7.3 and it works as well.

Thanks for your response. I tried the wfs request on topp:states on my local
server and it works fine so it looks like its a problem with my uploaded
map. I am using version 1.7.3. It seems strange that the other attributes
are recognised in the wfs requests and not the_geom. Is there anything in
the feature-type that might be causing this?

Not that I can see. It's probably datastore related?
If you can, first try out a nightly 1.7.4 build:
http://gridlock.openplans.org/geoserver/1.7.x/

and if that does not work either, open a bug report
at jira.codehaus.org attaching a sample of your data
and the request that's failing.

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

just wondering, are you sure the geometry attribute in the SCAMBS feature type is called "the_geom"?

dk80 wrote:

Hi,
I am trying to make a wfs request on a point on a map using the following
CQL filter:
"http://localhost:8080/geoserver/wfs?request=GetFeature&PropertyName=NAME,TYPE&typeName=SCAMBS:united_kingdom_natural&outputFormat=GML2&CQL_FILTER=INTERSECT(the_geom,%20POINT%20(-5.95703125%2056.66796875))".
This returns the following unknown error in the XML:
<gml:boundedBy>
  <gml:null>unknown</gml:null>
</gml:boundedBy>

I have tried other CQL requests like CQL_FILTER=TYPE='forest' and it works
fine. It only seems to be when using the the_geom attribute that I am
getting errors. Does anyone know what might be causing this?

--
Gabriel Roldan
OpenGeo - http://opengeo.org
Expert service straight from the developers.