Richard Duivenvoorde ( 
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A962dcbb5-105d-4b46-be3a-260ed24e958b
 ) *created* an issue

GeoServer ( 
https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiMTlhMTNiNWEyN2Y0NGZkMDk0NGY5ZWQwYjBlYjZkMWIiLCJwIjoiaiJ9
 ) / Bug ( 
https://osgeo-org.atlassian.net/browse/GEOS-9605?atlOrigin=eyJpIjoiMTlhMTNiNWEyN2Y0NGZkMDk0NGY5ZWQwYjBlYjZkMWIiLCJwIjoiaiJ9
 ) GEOS-9605 ( 
https://osgeo-org.atlassian.net/browse/GEOS-9605?atlOrigin=eyJpIjoiMTlhMTNiNWEyN2Y0NGZkMDk0NGY5ZWQwYjBlYjZkMWIiLCJwIjoiaiJ9
 ) WFS serves deformed data when store is 4D (at least postgis and shp) ( 
https://osgeo-org.atlassian.net/browse/GEOS-9605?atlOrigin=eyJpIjoiMTlhMTNiNWEyN2Y0NGZkMDk0NGY5ZWQwYjBlYjZkMWIiLCJwIjoiaiJ9
 )

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: Richard Duivenvoorde ( 
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A962dcbb5-105d-4b46-be3a-260ed24e958b
 )

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:

( https://osgeo-org.atlassian.net/secure/attachment/33475/33475_strange.png )

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 ( 
https://osgeo-org.atlassian.net/secure/attachment/33476/33476_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:

( https://osgeo-org.atlassian.net/secure/attachment/33474/33474_picture1.png )

purple polygons are real data (prepared shp), the orange ones are deformed ones.

Looking at:

( https://osgeo-org.atlassian.net/secure/attachment/33473/33473_picture2.png )

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:

( https://osgeo-org.atlassian.net/secure/attachment/33472/33472_picture3.png )

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.

( 
https://osgeo-org.atlassian.net/browse/GEOS-9605#add-comment?atlOrigin=eyJpIjoiMTlhMTNiNWEyN2Y0NGZkMDk0NGY5ZWQwYjBlYjZkMWIiLCJwIjoiaiJ9
 ) Add Comment ( 
https://osgeo-org.atlassian.net/browse/GEOS-9605#add-comment?atlOrigin=eyJpIjoiMTlhMTNiNWEyN2Y0NGZkMDk0NGY5ZWQwYjBlYjZkMWIiLCJwIjoiaiJ9
 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( 
https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail
 ) or iOS ( 
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8
 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100126- 
sha1:bfbb988 )
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to