Hi,
Today I have been playing with the Python SDK. Most functions work, but I have been running into problems when dealing with geojson.
For example mly.map_feature_points_in_bbox(bbox) works perfectly, but mly.map_features_in_geojson(geojson) gives me the error below.
There are no problems with the geojson itself, I have checked this with other apps like geojson.io .
Any ideas on how to fix this? Or maybe someone can share a working example for this function??
Thank you very much!
Yaro
July 13, 2023, 3:16pm
2
cc @chrisbeddow maybe you know?
BR, Yaro
1 Like
Crossing my fingers hoping @chrisbeddow can give us a hand =)
Can you drop the geojson here?
Have you tried with only 1 geojson or multiple?
The list index out of range is where it tries to select the geo coordinates of the geojson, but it finds none, so let me have a look at the data to see where it might hit an error.
Hi, I am using this one:
edit: thanks for your answer btw
{
“type”: “FeatureCollection”,
“features”: [
{
“type”: “Feature”,
“properties”: {},
“geometry”: {
“coordinates”: [
[
[
12.221675476039593,
44.147288965238744
],
[
12.221675476039593,
44.1221408603279
],
[
12.260758147533068,
44.1221408603279
],
[
12.260758147533068,
44.147288965238744
],
[
12.221675476039593,
44.147288965238744
]
]
],
“type”: “Polygon”
}
}
]
}
Have you fond any solution? I’m running in the same problem. I’m trying to integrate Mapillary into a QGIS analysis workflow.
ea94
May 14, 2024, 12:12pm
7
Hi, I’m unfortunately also running into the same problem. Have you found a solution yet? Any help would be very appreciated!
Based on the documentation (mapillary.utils.format | Mapillary Python SDK ) it looks like this method (map_features_in_geojson) expects a FeatureCollection of points while the map_features_in_shape (mapillary.interface | Mapillary Python SDK ) method should work with a geojson containing a Polygon.