2

I need to get features by following URL: http://services.land.vic.gov.au/catalogue/publicproxy/guest/dv_geoserver/wfs?service=WFS&request=GetFeature&typeName=datavic:CROWNLAND_PLMGEN&

I tried: http://services.land.vic.gov.au/catalogue/publicproxy/guest/dv_geoserver/wfs?service=WFS&request=GetFeature&typeName=datavic:CROWNLAND_PLMGEN&FILTER= SHAPE -37.2315356,142.8193248 -37.2302536,142.8195475 -37.2300784,142.8179702 -37.2313604,142.8177474 -37.2314496,142.8185509 -37.2315356,142.8193248

Which gives Java error java.lang.NullPointerException. Can someone help with this one?

It works if I use point:

<Filter xmlns="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"><Intersects><PropertyName>SHAPE</PropertyName><gml:Point srsName="urn:ogc:def:crs:EPSG::4283"><gml:coordinates>-37.2976946,143.7812069</gml:coordinates></gml:Point></Intersects></Filter>
1
  • It might be just a typo in the inserted code, but I cannot see a comma between coordinate pairs in <gml:coordinates>. Commented Jul 30, 2016 at 11:54

2 Answers 2

0

I bumped in to same problem. Then I found https://gis.stackexchange.com/a/243490/173422 and realized with Intersects-filter, there is a requirement of ValueReference (see: https://docs.geoserver.org/stable/en/user/filter/filter_reference.html).

Example, the GeoServer I'm working with will return geometry in WFS-response field <geom> and I need to match that with my filter:

<fes:Filter
    xmlns:fes="http://www.opengis.net/fes/2.0">
    <fes:Intersects>
        <fes:ValueReference>geom</fes:ValueReference>
        <gml:Polygon

Now intersect-operator will have something to match against and will work as expected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.