Closed harksin closed 8 years ago
Could be an issue as we currently always export as LineString
ok, you can fix just by patch class MatchResultToJson with :
if(pointList.size() >=2) {
geometry.put("coordinates", pointList.toGeoJson());
geometry.put("type", "LineString");
}
if(pointList.size() < 2) {
geometry.put("coordinates", pointList.toGeoJson().get(0));
geometry.put("type", "Point");
}
Hi , when i use extanded_json as output with webServer, MapMatching create invalid GeoJson Object with only one point in LineString.
could you confirm this is an issue ?
{ "geometry": "{\"coordinates\":[[3.89894,43.609859]],\"type\":\"LineString\"}", "id": 78938, "wpts": [] }, { "geometry": "{\"coordinates\":[[3.898914,43.609945]],\"type\":\"LineString\"}", "id": 471587, "wpts": [] }, { "geometry": "{\"coordinates\":[[3.898889,43.61003],[3.898851,43.610155],[3.898824,43.610272]],\"type\":\"LineString\"}", "id": 471588, "wpts": [] }