osmeditor4android icon indicating copy to clipboard operation
osmeditor4android copied to clipboard

Mapillary V4 issues

Open simonpoole opened this issue 4 years ago • 5 comments

  • [ ] missing returned geometry in https://www.mapillary.com/developer/api-documentation#sequence API call requires workarounds to center map on displayed image,

  • [ ] user information isn't available at all, making it impossible to show a user only their images,

  • [ ] coverage tiles are far, far, far too large. Example region Cupertino, tiles can be ~10MB (compressed PBF). At zoom level 14 a reasonably high res phone will require around 60 tiles to cover the display. This can require in total more than the complete heap available to an Android app on a reasonably current device (in reality the decoded tiles are larger, the compressed PBF size is simply a lower bound). The size of the tiles is also completely unnecessary as at zoom level 14 the level of detail is useless in any case (we start displaying image markers at zoom 19). Current workaround is to limit display of mapillary data from zoom level 16 on, other ideas:

    • use two layers, overzoom low zoom tiles to zoom 15, then start using zoom 14 tiles at 16 or 17,
    • render VTs to a tile sized bitmap (per zoom level) and cache that (this causes issues with interactive use),
    • Mapillary moves the contents of zoom 14 tiles to 16, or better 17, and provides detail reduced overview tiles at lower zooms.

    Note: with Mapillary turned on iD is crashy in the area in question at zoom 14, and both iD and JOSM essentially come to a standstill even if they don't crash.

@cbeddow @tsmock FYI

simonpoole avatar Aug 08 '21 21:08 simonpoole

user information isn't available at all, making it impossible to show a user only their images,

Yep. I ran into that problem. I did get user login working again, but I can't get the user name anymore, so I have to hope that they know which user they used to log in to Mapillary with. Not that it matters, since I don't get any information that is usable elsewhere anymore anyway. About the only reason I made certain to implement it is due to API rate limiting. Being logged in seems to put you in a different rate bucket as compared to the rest of the people on the same IP address.

render VTs to a tile sized bitmap (per zoom level) and cache that (this causes issues with interactive use),

This was actually my initial implementation for vector tiles. If you do this, don't use the extent for image sizes (4096x4096) -- this turned out to be worse than the method currently used in JOSM (AKA, dataset + mappaint). Limiting it to 256 or 512 tiles would probably work better, but you would still need to do dynamic painting at high zoom levels (4096x4096 still gave a lot of pixelation at high zoom levels, even though JOSM ran out of memory quickly).

TBH, in JOSM and probably iD/Vespucci, the lower zoom levels just give a good idea of where coverage is, so losing interactivity at those zooms probably isn't critical. Detecting zoom level > 14 and then doing dynamic painting would probably work fairly well.

Note: with Mapillary turned on iD is crashy in the area in question at zoom 14, and both iD and JOSM essentially come to a standstill even if they don't crash.

Very good to know. I need to do a perf run on the plugin sometime soon, and now I have a test area. :)

tsmock avatar Aug 09 '21 13:08 tsmock

@simonpoole @tsmock we are looking into user info--essentially by default according to Facebook we can't share it in v4 API, until we get it privacy approved. Hopefully we restore this late in the year.

We have a possibility to try a bbox request now when the coverage tile is too large. Making some final fixes but here is a sample format: https://graph.mapillary.com/images?bbox=-16.91019058227539,32.646891310972805,-16.904525756835938,32.64949300750322

^ this is not documented for the time being

We've had some requests from several users for lower zoom up to 17 to will be reviewing that feature request, not sure on urgency or feasibility in short term.

For sequences and image geometry I've made a feature request as of today exploring a case for why it's widely useful, so will leave that pending review too.

cbeddow avatar Aug 09 '21 13:08 cbeddow

Bbox search is now live. Hopefully this makes it much easier, please let me know!

cbeddow avatar Aug 12 '21 10:08 cbeddow

Bbox search is now live. Hopefully this makes it much easier, please let me know!

Well three months and multiple man weeks of work ago, yes it would have helped. But now you are essentially saying "ha ha" we fooled all of you in to writing MVT support and implementing stuff that you didn't need in the end.

simonpoole avatar Aug 12 '21 11:08 simonpoole

@simonpoole it works for small queries but tile requests are much better still. This has no pagination so it won't load over 2000 points. No "ha ha", hoping to make things easier in response to needs as we go.

cbeddow avatar Aug 12 '21 14:08 cbeddow