Mapillary Vector Tiles ID and Key are different

Hi there,

I am relatively new to Mapillary, I have access to the vector tiles in QGIS which responds with an ID, when checking this ‘ID’ against the pKey in the webpage, they are two different values.
are these two items related? I am ideally trying to get the point I can click on and then hyperlink to Mapillary for viewing.

1 Like

Tom, can you share the vector tile URL request QGIS makes?

Maybe it is requesting the sequences tile instead of the images tile

Also, maybe it is finding the tile ID (it’s a random number), and it should access “properties”, then “image_key”

Hi Chris,
thanks for the response, I have a screenshot of the area which provides this information as part of the vector tile using this URL in QGIS - * Coverage tiles -{z}/{x}/{y}

I was hoping that the image_id was to match the Mapillary pKey, or that information available but I can’t see it.

actual mapillary image is here

According to Mapillary image_id property in the sequence layer refers to the first image of the sequence. sequence_id property in the image layer refers to id property of the sequence.

Hi Tao,
yes i can see that now, thanks. What I am trying to achieve is to use this information to open up the Mapillary website utilising some of this information, is there a way?
Going through the URL approach the pKey seems to be the only clear identifier for each image location.

@tom.burnett @tao in the screenshot the image ID has a negative value, -838345837.

Is QGIS just interpreting the value wrong, or how is that happening?

once you have the correct image key then Mapillary is the way to open it

@chrisbeddow that’s what i am not sure about.
my process is load the vector tiles through the standard coverage tile with my access token -

Yeah I think the QGIS vector tile parser is reading it wrong or converting the value somehow, because it does not make sense for it to show a negative number which is shows in several fields. Are you familiar with Python? We can do a double check of the same tile and what it parses but I use it in some other functions and it succeeds (like Mapillary Python SDK: Hello from Mapillary Python SDK | Mapillary Python SDK)

It appears QGIS is doing something funny with the Vector Tiles.

JOSM has an implementation (which shares no code with any other implementation) to (a) decode PBF MVT files and (b) convert the MVT data into something that can be displayed in JOSM. It does not have the same problem as QGIS.

I’d say you open JOSM, open up the Mapillary Vector Tile layer (from the built-in JOSM layer list, not from the plugin), and, if you are in expert mode, there is a layer action to convert the vector data into an OSM data layer.

With that said, I believe the id that you have on the object after conversion is the id from the vector tile feature object, which is not the same as the id for the image. The vector tiles really should use the same value for the feature id as the tag id, when the id is numeric (^[0-9]+$). From the vector tile spec,

A feature MAY contain an id field. If a feature has an id field, the value of the id SHOULD be unique among the features of the parent layer.

The id field is distinct from the tags field (the identifier for the id field is 1, and is a uint64 type).