I have tried this code at my end, but I end up getting the frame level lat, lon locations.
def get_detections(image_id, access_token):
url = f"https://graph.mapillary.com/{image_id}/detections"
params = {
“access_token”: access_token,
“fields”: “image,value,geometry”
}
try:
response = requests.get(url, params=params)
if response.status_code == 200:
detections_data = response.json()
# Process the detections_data as needed
return detections_data
else:
print(f"Request failed with status code {response.status_code}")
return None
except Exception as e:
print(f"An error occurred: {e}")
return None
output is :
"data": [
{
"image": {
"geometry": {
"type": "Point",
"**coordinates**": [
13.197576922826,
52.524302296058
]
},
"id": "152962823391426"
},
"value": "information--general-directions--g1",
"geometry": "GjgKBm1weS1vchIYEgIAABgDIhAJ3CqYERroAQAAyALnAQAPGgR0eXBlIgkKB3BvbHlnb24ogCB4AQ==",
"id": "154808976540144"
},
{
"image": {
"geometry": {
"type": "Point",
"**coordinates**": [
13.197576922826,
52.524302296058
]
},
"id": "152962823391426"
},
"value": "regulatory--maximum-speed-limit-30--g1",
"geometry": "GjgKBm1weS1vchIYEgIAABgDIhAJ/g7+BxrMAwAAjAbLAwAPGgR0eXBlIgkKB3BvbHlnb24ogCB4AQ==",
"id": "155536716467370"
},
{
"image": {
"geometry": {
"type": "Point",
"**coordinates**": [
13.197576922826,
52.524302296058
]
},
"id": "152962823391426"
},
"value": "object--sign--store",
"geometry": "GmB4AgoGbXB5LW9yKIAgElEIARgDIksJtDzeDooCBAMaAA4SAiwFJgQIATAGPgJCBA4DHgUEDQQlAB0EAwY/Bg8IMQgFBg8FBxUBqwEDMwMNACcSDyIDDgkWAw4HMAMSCw8=",
"id": "155638969790478"
},
{
"image": {
"geometry": {
"type": "Point",
"**coordinates**": [
13.197576922826,
52.524302296058
]
},
"id": "152962823391426"
},
"value": "object--sign--advertisement",
"geometry": "Gkd4AgoGbXB5LW9yKIAgEjgIARgDIjIJnB+kF6oBCQRPACUBAwUEHQgHFAUGBwQACBUABwQBAhsLEQALBgU0AQ4QCAQICgIQDw==",
"id": "155657346455307"
}
Please help!