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&
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>
Best Answer
You did not specify the &version=x.y parameter, provided like this GeoServer will likely try to parse the filter as a FES 2.0 one, instead of a Filter 1.0 one. Try adding "&version=1.0" in the request.
Also, pretty important to correctly URL encode the filter. This request seems to work fine (added version and URL encoded your filter):
http://services.land.vic.gov.au/catalogue/publicproxy/guest/dv_geoserver/wfs?service=WFS&request=getFeature&typeName=datavic:CROWNLAND_PLMGEN&version=1.0.0&FILTER=%3CFilter%20xmlns%3D%22http%3A%2F%2Fwww.opengis.net%2Fowc%22%20xmlns%3Agml%3D%22http%3A%2F%2Fwww.opengis.net%2Fgml%22%3E%0A%3CIntersects%3E%0A%3CPropertyName%3ESHAPE%3C%2FPropertyName%3E%0A%3Cgml%3APolygon%20srsDimension%3D%222%22%20srsName%3D%22urn%3Aogc%3Adef%3Acrs%3AEPSG%3A%3A4283%22%3E%3Cgml%3AouterBoundaryIs%3E%0A%3Cgml%3ALinearRing%3E%0A%3Cgml%3Acoordinates%3E-37.2315356%2C142.8193248%20-37.2302536%2C142.8195475%20-37.2300784%2C142.8179702%20-37.2313604%2C142.8177474%20-37.2314496%2C142.8185509%20-37.2315356%2C142.8193248%0A%3C%2Fgml%3Acoordinates%3E%0A%3C%2Fgml%3ALinearRing%3E%0A%3C%2Fgml%3AouterBoundaryIs%3E%0A%3C%2Fgml%3APolygon%3E%0A%3C%2FIntersects%3E%0A%3C%2FFilter%3E