Hi Jukka,
Thanks for your swift reply!
The GML dialects were mixed up simply due to my ignorance. I started with a WFS 1.0.0 request (which was sent by OpenLayers), but because I didn't manage to get it working I switched to WFS 1.1.0 and give that one a try.
When I use WFS 1.1.0 together with gml:posList the request is executed successfully. But when I switch back to WFS 1.0.0 and use gml:coordinates with commas I get a NullPointerException when parsing the Polygon.
Error:
java.lang.RuntimeException: Parsing failed for Polygon: java.lang.NullPointerException
Parsing failed for Polygon: java.lang.NullPointerException
Null
Request:
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.0.0" outputFormat="GML2" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<wfs:Query typeName="feature:ViewRWZI" xmlns:feature="JAGIS">
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:And>
<ogc:BBOX>
<ogc:PropertyName>GeoNode</ogc:PropertyName>
<gml:Box xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:31370">
<gml:coordinates decimal="." cs="," ts=" ">-284279.94433594,-12078.599121097 592280.94433594,424076.8491211</gml:coordinates>
</gml:Box>
</ogc:BBOX>
<ogc:Within>
<ogc:PropertyName>GeoNode</ogc:PropertyName>
<gml:Polygon xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:31370">
<gml:exterior>
<gml:LinearRing>
<gml:coordinates decimal="." cs="," ts=" ">139400.25104111,203697.60407176 139400.25104111,229770.11674822 159022.6686784,229770.11674822 159022.6686784,203697.60407176 139400.25104111,203697.60407176</gml:coordinates>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</ogc:Within>
</ogc:And>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
Any ideas?
Kind regards,
Roel
-----Oorspronkelijk bericht-----
Van: Rahkonen Jukka [mailto:Jukka.Rahkonen@anonymised.com]
Verzonden: vrijdag 26 oktober 2012 13:39
Aan: 'geoserver-users@lists.sourceforge.net'
Onderwerp: Re: [Geoserver-users] Points of LinearRing do not form a closed linestring
Hi,
GML coordinates tend to include commas
<gml:coordinates>0,0 100,0 100,100 0,100 0,0</gml:coordinates>
In addition, you are using WFS 1.1.0 which defaults to GML3 which considers coordinates as deprecated. Is is not strictly forbidden, I believe, but it would be better not to mix GML2 and GML3 dialects. Thus, use gml:posList.
-Jukka Rahkonen-
Roel De Nijs wrote:
Hello,
I'm trying to send a GetFeature (post) request using a Filter. But I keep
getting the above error and I have no clue about the cause of the issue
(because it's closed). If I create a LinearRing using JTS and the same
coordinates the Geometry is created without any errors.
The request I try to send:
<wfs:GetFeature service="WFS" version="1.1.0"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:gml="http://www.opengis.net/gml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
<wfs:Query typeName="feature:ViewRWZI"
xmlns:feature="JAGIS">
<ogc:Filter
xmlns:ogc="http://www.opengis.net/ogc">
<ogc:And>
<ogc:BBOX>
<ogc:PropertyName>GeoNode</ogc:PropertyName>
<gml:Envelope
srsName="http://www.opengis.net/gml/srs/epsg.xml#31370">
<gml:lowerCorner>-284279.94433594 -
12078.599121097</gml:lowerCorner>
<gml:upperCorner>592280.94433594
424076.8491211</gml:upperCorner>
</gml:Envelope>
</ogc:BBOX>
<ogc:Within>
<ogc:PropertyName>GeoNode</ogc:PropertyName>
<gml:Polygon xmlns:gml="http://www.opengis.net/gml"
srsName="http://www.opengis.net/gml/srs/epsg.xml#31370">
<gml:exterior>
<gml:LinearRing>
<gml:coordinates>139400 203697
139400 229770 159022 229770 159022
203697 139400 203697</gml:coordinates>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</ogc:Within>
</ogc:And>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
Kind regards,
Roel
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Points-
of-LinearRing-do-not-form-a-closed-linestring-tp5011496.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics Download AppDynamics Lite
for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
________________________________
Volg Aquafin op Facebook<https://www.facebook.com/AquafinNV> | Twitter<https://twitter.com/aquafinnv> | YouTube<http://www.youtube.com/channel/UCk_4P5BJ-MtEEDCkCsR_KqQ?feature=mhee> | LinkedIN<http://www.linkedin.com/company/aquafin/products>
Disclaimer: zie www.aquafin.be<http://www.aquafin.be> P Denk aan het milieu. Druk deze mail niet onnodig af.