jumpinjackie / mapguide-rest

REST Extension for MapGuide Open Source
GNU Lesser General Public License v2.1
26 stars 14 forks source link

Geojson features request returns null geometry for CURVESTRING features #172

Closed AlenKelemen closed 7 years ago

AlenKelemen commented 7 years ago

MG REST request for query features: .FeatureSource/features.geojson/ returns null geometry for: CURVESTRING, and CURVESTRING with LINESTRINGSEGMENT, while .FeatureSource/features.xml/ returns regular WKT for all feature types.

For example there is a sdf file with LINESTRING and CURVESTRING geometry attached with corresponding geojson and xml representation: lineFeaturesTest.zip

I would use xml to parse features to ol3 map, but as far as i know there is no ol.format suitable to parse FDO schema xml (which MG REST returns) to ol3 .
Have anybody try to load xml REST response to ol3 vector features ?

jumpinjackie commented 7 years ago

The GeoJSON spec doesn't define curves. Also the MapGuide API proper does not expose tessellation capabilities for curve geometries that would let us approximate curve geometries to their line/polyline/polygon equivalents.

Don't know what we can do here.

AlenKelemen commented 7 years ago

Of course you are right. It seems that solution is to write xml to json parser with curve geometries converter on client side.