Closed GioviQ closed 2 years ago
GeoJSON feature object doesn't allow "interpolated" property as a "root" property, so I assume that the map box return message is not a valid GeoJSON? Nope, the return is a geoJSON feature collection, so I will do a check ASAP to see what happens
Root property? The above is only the Json part to present the issue, not the full response. To MapBox interpolated is a property of Point and maybe all other geometries.
What I meant is that a feature object in GeoJSON should have "geometry", "properties", "type" and "id" properties only. So the "interpolated" property is a bit unexpected at this level.
foreign members are allowed, so the geojson code should be deserialized. Ok, now I understand the problem: the "interpolated" property is part of the geometry, not the "root object". Sorry, yesterday I answered from the phone and I totally missed this. Anyway... Can you post the complete data that throws the exception and some details about the error itself (i.e.: the exception type)? A unit test code should be fantastic.
look for feature[3] in the response tab
To discover the error I had to debug this repository because the exception is not clear. Newtonsoft: Expected token '}' not found Stj: StjGeometryConverter read too much or not enough
So the problem lies in both NetTopologySuite.IO.GeoJSON4
and NetTopologySuite.IO.GeoJSON4STJ
libraries.
I discovered the problem, basically (and for NetTopologySuite.IO.GeoJSON4
) the serializer is not advanced after that the additional properties is read.
Working on it.
Using https://docs.mapbox.com/api/search/geocoding/#forward-geocoding
I have GeoJSON with
"geometry": { "type": "Point", "coordinates": [ -117.267131, 32.959175 ], "interpolated": true }
Parsing "interpolated" gives exception.
"interpolated" seems not a proper GeoJSON property.
Am I right?