Hexagon Geospatial
MENU

Smart M.App

Looking for answers in regards to M.Apps, M.App Exchange or M.App Studio? Smart M.App Tech Discussion board is where you can search, ask your questions and assist others by sharing your knowledge. Join the conversation, connect, contribute and share.
Showing results for 
Search instead for 
Do you mean 
Reply
Staff
Posts: 106
Registered: ‎11-24-2015
Accepted Solution

GeoJSON polygons from WFS not displaying correctly

Hi Community,

 

I have created a WFS from GeoMedia Webmap to use in a Smart M.App BI map. The polygon features in GeoMedia display correctly (see attachment - GeomediaPolygons.jpg).

 

When I put the WFS into a Smart M.App, the polygons display incorrectly (see attachment - geojsonpolygon.jpg). Is there a limitation or a bug?

Technical Evangelist
Posts: 1,060
Registered: ‎09-11-2015

Re: GeoJSON polygons from WFS not displaying correctly

Hi Jonny,

 

Can you check validity and correct connectivity of the data in GeoMedia?

Also, can you try to save the GeoJSON output from WFS and display it here? http://geojson.io/

 

That would clarify if the problem is on WebMap or SMAPP side.

 

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Staff
Posts: 106
Registered: ‎11-24-2015

Re: GeoJSON polygons from WFS not displaying correctly

[ Edited ]

Thanks for the reply Jan,

 

I did both tests:

 

First, got the geojson response from the WFS and put it into geojson.io - result is same/similar to Smart MApps see attached geojson-io.jpg

 

Second, I populated the geoworkspace from the service source metadata - result is good, see attached metadata2geomedia.jpg

Staff
Posts: 106
Registered: ‎11-24-2015

Re: GeoJSON polygons from WFS not displaying correctly

PS: I simplified the geometry also, hoping to eliminate any 'curves', 'arcs' that may not be supported by geojson???

Technical Evangelist
Posts: 1,060
Registered: ‎09-11-2015

Re: GeoJSON polygons from WFS not displaying correctly

GeoJSON standard supports only those geometries and their collections:

 

 

I don't know how is the GeoJSON interpreter made in WebMap. It should try to convert non-supported formats to standard ones but there might be a problem or bug when it comes to specific geometry types. Can you post a screenshot of GeoMedia's Geometry Information for the particular problematic geometry?

 

Jan

 

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Highlighted
Staff
Posts: 294
Registered: ‎11-05-2015

Re: GeoJSON polygons from WFS not displaying correctly

The first give away sign of something wrong is the actual JSON generated:

2016-12-01 17_37_56-JSON Viewer.png

Notice that the coordinates array of the polygon geometry contains multiple arrays with the first being a single segment.

According to the spec the polygon coordinates array may contain one or more linearring arrays, with the first being the exterior boundary, and each subsequent should be interpreted as a hole. Given this representation, it's actually amazing geojson.io showed anything at all.

 

The problem here is a bug in WebMap's GeoJSON exporter mishandling CompositePolygonGeometry that is used to represent the features' geometries. Tips to Jan for pointing out a screenshot of the Geometry Info dialog from GeoMedia would be useful here Smiley Happy

 

Do you need immediate support?
Please submit a Ticket through our
Development Ticket Portal.