Richard Duivenvoorde created an issue |
WFS serves deformed data when store is 4D (at least postgis and shp) |
Issue Type: |
Bug |
---|---|
Affects Versions: |
2.17.0 |
Assignee: |
Unassigned |
Attachments: |
picture1.png, picture2.png, picture3.png, polygon4d.zip, strange.png |
Components: |
PostGIS, WFS |
Created: |
05/May/20 12:16 PM |
Environment: |
Geoserver bin on linux, Postgis on linux, local shpfile |
Priority: |
Medium |
Reporter: |
A client received some shapefiles, stored those in Postgis (via drag and drop in QGIS) and published in Geoserver.
While the WMS output was right (these were thousands of square buildings), the WFS showed very strange huge polygons:
After some investigation, it appeared that the shapefile was ‘4D’ (you can create a new shapefile in QGIS, and tell it to add Z or M or both, attached is an example set: polygon4d.zip ).
As you can see below the coordinates in the db are 4D:
id_0|geom
----|--------------------------------------------------------------------------------------------------------
1|MULTIPOLYGON(((4.7418850506254 52.973914531383926 0 0,5.3187909469922845 52.664355269918765 0 0,5.431357
2|MULTIPOLYGON(((5.684633710542017 52.959843655862784 0 0,6.036405598570606 53.26940291732794 0 0,6.655524
3|MULTIPOLYGON(((5.079586063132845 51.890457116255874 0 0,5.557995830851724 51.693464858959864 0 0,5.33286
From the WFS the zero’s are taken into account in the preparation of 2D coordinates:
<gml:posList>52.97391453 4.74188505 0 52.66435527 5.31879095 0 52.28444163 5.43135795 0 52.56585914 4.58710542 0 52.97391453 4.74188505 0</gml:posList>
Giving rise to pictures like:
purple polygons are real data (prepared shp), the orange ones are deformed ones.
Looking at:
You see it is using 0 as either x or y of coordinate pairs.
Publishing the attached shp’s OR adding them to postgis gives these results.
BUT: the strange thing is that the WMS output (below in the layer preview) is just right:
If I’m correct OGC-WFS is either 2D or 3D only???
So I understand this is a data issue also, so not sure what a reasonable solution is:
- maybe geoserver/geotools can test a store of layers in the store if they are more then 3D and maybe give a warning?
- maybe the 3D and 4D coordinate could be ignored for WFS (like it is doing for WMS?)
As said: easy reproducable by just using attached shp. Also postgis is doing this.
Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS |
|
This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100126-sha1:bfbb988) |