Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#21260 closed defect (fixed)

[PATCH] MVT Tiles are not loaded in non-Mercator projections

Reported by: Polarbear-j Owned by: team
Priority: normal Milestone: 21.08
Component: Core imagery Version: latest
Keywords: mvt Cc:

Description (last modified by Polarbear-j)

JOSM/1.5 (18173 en_GB) Mac OS X 10.14.6, Java version: 1.8.0_291-b10, Oracle

v2.0.0-alpha.32 shows "Error: Could not load image from tile server", does not show any tracks,
and the console output shows a 404 error followed by a number of tile loads, when I turn on the mapillary layer:

2021-08-27 19:07:47.144 INFO: GET https://tiles.mapillary.com/maps/vtp/mly1_computed_public/2/{z}/{x}/{y}?access_token=MLY|4223665974375089|d62822dd792b6a823d0794ef26450398 -> HTTP/1.1 404 (546 ms)
2021-08-27 19:07:47.255 INFO: AbstractTileSourceLayer: estimated visible tiles: 54, estimated cache size: 466
2021-08-27 19:07:47.276 INFO: AbstractTileSourceLayer: estimated visible tiles: 54, estimated cache size: 466
2021-08-27 19:07:47.277 INFO: AbstractTileSourceLayer: estimated visible tiles: 54, estimated cache size: 466
2021-08-27 19:07:47.278 INFO: Allocate for tile source layer: 116 MB of memory. Available: 3,591 MB.
2021-08-27 19:07:47.550 INFO: GET https://josm.openstreetmap.de/tested -> HTTP/1.1 200 (120 ms)
2021-08-27 19:07:47.710 INFO: GET https://tiles.mapillary.com/maps/vtp/mly1_computed_public/2/14/8816/5388?access_token=MLY|4223665974375089|d62822dd792b6a823d0794ef26450398 -> HTTP/1.1 200 (422 ms)
(similar GETs follow)

When I click "info" in the layers window, it says:
Mapillary layer: 0 sequences, each containing 0 and 0 images...

(also reported as https://github.com/JOSM/Mapillary/issues/189 )

Attachments (7)

Screen Shot 2021-08-30 at 10.26.45 AM.png (2.6 MB ) - added by taylor.smock 3 years ago.
Screenshot 2021-08-30 at 19.20.32.png (44.4 KB ) - added by Polarbear-j 3 years ago.
Filter dialogue
Screenshot 2021-08-30 full JOSM.png (1.1 MB ) - added by Polarbear-j 3 years ago.
full JOSM window
Screenshot 2021-08-30 reprojection.png (173.9 KB ) - added by Polarbear-j 3 years ago.
reprojection
21260.patch (3.3 KB ) - added by taylor.smock 3 years ago.
21260.2.patch (11.2 KB ) - added by taylor.smock 3 years ago.
Add tests
21260.3.patch (1.6 KB ) - added by taylor.smock 3 years ago.
Use tiles in source control

Change History (33)

comment:1 by taylor.smock, 3 years ago

Would you mind pasting the 404?

comment:2 by Polarbear-j, 3 years ago

Description: modified (diff)

Sorry, the github code block required a newline after the backticks, and I sloppily copied only what github displayed.
Now visible here and there, the first log line with GET verbatim {z}/{x}/{y} placeholders.

comment:3 by taylor.smock, 3 years ago

Resolution: invalid
Status: newclosed
2021-08-27 19:07:47.144 INFO: GET https://tiles.mapillary.com/maps/vtp/mly1_computed_public/2/{z}/{x}/{y}?access_token=MLY|4223665974375089|d62822dd792b6a823d0794ef26450398 -> HTTP/1.1 404 (546 ms)

This is actually JOSM checking to see if the URL returns a json file (i.e., if it has styling). This is not the root cause.

I took a look at the area in both the Mapillary plugin and the Mapillary website:

(This came from the tile in a url in the report, 14/8816/5388)

The reason why nothing is showing up is that the vector tiles don't currently have anything in them. If you have recently uploaded something, please wait a few days after seeing that they have been processed before getting worried over the images not appearing. Based off of past experience on this, it seems that there are two steps:
1) Image injestion finishes on Mapillary's servers (this is when the email was sent out, or at least it was a month or two ago)
2) Regeneration of vector tiles. This seems to happen a few days after (1) finishes. I don't know what the exact schedule on this is, but a week should be more than enough time.

comment:4 by Polarbear-j, 3 years ago

Resolution: invalid
Status: closedreopened
Summary: Mapillary alpha version fails to show anythingMapillary alpha version fails to show anything, anywhere

Hi Taylor,
when the 404 error is unrelated, fine.
But the problem is not that the plugin would not show things in this location,
I do not see any mapillary track nor image anywhere, in particular not even old images in places
where a lot of old tracks exist. It is not about imagery recently uploaded.
And the console log does not show any hint, it shows a large bunch of tiles.mapillary.com requests which are successful (200).

Thus I cannot use any mapillary in my JOSM currently, as the old 'stable' plugin from April frequently freezes JOSM completely
(and does not show recent images, as far as i understood the API change) , and the automatically loaded 'alpha' plugin shows the world empty.

For your example tile https://www.mapillary.com/app/?lat=52.316078574972096&lng=13.719683684608185&z=15.540691298997581
move a bit north, it was the A10/A12 motorway junction I was looking at, with tons of old traces.

Last edited 3 years ago by Polarbear-j (previous) (diff)

in reply to:  4 comment:5 by taylor.smock, 3 years ago

Replying to Polarbear-j:

Hi Taylor,
Thus I cannot use any mapillary in my JOSM currently, as the old 'stable' plugin from April frequently freezes JOSM completely
(and does not show recent images, as far as i understood the API change) , and the automatically loaded 'alpha' plugin shows the world empty.

The old version from April no longer works because Mapillary shut down the v3 API.

For your example tile https://www.mapillary.com/app/?lat=52.316078574972096&lng=13.719683684608185&z=15.540691298997581
move a bit north, it was the A10/A12 motorway junction I was looking at, with tons of old traces.

It worked when I was testing. I'll attach a screenshot.

Can you try resetting the Mapillary filters (please click on the "Reset" button)?

EDIT: Screenshot

Last edited 3 years ago by taylor.smock (previous) (diff)

by taylor.smock, 3 years ago

comment:6 by taylor.smock, 3 years ago

Owner: changed from taylor.smock to Polarbear-j
Status: reopenedneedinfo

by Polarbear-j, 3 years ago

Filter dialogue

comment:7 by taylor.smock, 3 years ago

Polarbear-j: Some of the filters have been able take an empty input in the past, which is why the Reset button exists. But you should be able to see stuff. Can you paste a screenshot of the intersection with everything up?

EDIT: The full JOSM window please.

Last edited 3 years ago by taylor.smock (previous) (diff)

comment:8 by Polarbear-j, 3 years ago

Filter reset does not help. See attached before/after "reset".
Expert filter is empty as well.
I went to Advanced Preferences and selected mapill* which was a lot, and defaulted all of them. No effect.
Filter dialogue
Full window coming.

by Polarbear-j, 3 years ago

full JOSM window

comment:9 by Polarbear-j, 3 years ago

full JOSM window

Last edited 3 years ago by taylor.smock (previous) (diff)

comment:10 by taylor.smock, 3 years ago

OK. Can you open the Layers window (Windows -> Layers). If the Mapillary layer is underneath a non-overlay layer, that may be the issue.

comment:11 by Polarbear-j, 3 years ago

Not a layer issue.
Reprojection issue.

When I right-clicked on the tile with the "could not load" error, I got the tile info showing it is reprojected.
I normally work in EPSG 25833 which is the native projection for imagery here.
Once I changed to Mercator, the tracks did appear.

So we have a workaround, but the tiles should work in other projections as well.
reprojection

Last edited 3 years ago by taylor.smock (previous) (diff)

by Polarbear-j, 3 years ago

reprojection

comment:12 by taylor.smock, 3 years ago

Component: Plugin mapillaryCore imagery
Keywords: mvt added
Owner: changed from Polarbear-j to taylor.smock
Priority: majornormal
Status: needinfoassigned

OK. This is probably an MVT issue then. This is going to be a bit more involved, since the MVT spec specifies EPSG:3857. I'll probably have to do a deep dive into why it isn't getting reprojected by JOSM. I'll try to get it fixed in September -- I don't think it will make it into the September release (probably out in the next 5 days or so, and probably tomorrow).

comment:13 by taylor.smock, 3 years ago

Summary: Mapillary alpha version fails to show anything, anywhere[PATCH] MVT Tiles are not loaded in non-Mercator projections

by taylor.smock, 3 years ago

Attachment: 21260.patch added

by taylor.smock, 3 years ago

Attachment: 21260.2.patch added

Add tests

comment:15 by taylor.smock, 3 years ago

Owner: changed from taylor.smock to team
Status: assignednew

comment:16 by Don-vip, 3 years ago

Milestone: 21.08

comment:17 by Don-vip, 3 years ago

Resolution: fixed
Status: newclosed

In 18187/josm:

fix #21260 - fix reprojection of MVT tiles (patch by taylor.smock)

comment:18 by Don-vip, 3 years ago

Resolution: fixed
Status: closedreopened

MVTLayerTest is failing:
https://josm.openstreetmap.de/jenkins/job/JOSM/jdk=JDK11/lastCompletedBuild/testReport/
Condition with lambda expression in org.openstreetmap.josm.gui.layer.imagery.MVTLayerTest was not fulfilled within 1 seconds.

comment:19 by taylor.smock, 3 years ago

It looks like this is failing in the CI.

But it didn't fail locally. :(

Best guess, something is going wrong with the finishedLoading. Just as a sanity check, I'm increasing the timeout for the Awaitility call (1s -> 5s).

See https://gitlab.com/smocktaylor/josm/-/merge_requests/12

in reply to:  18 comment:20 by taylor.smock, 3 years ago

Replying to Don-vip:

MVTLayerTest is failing:
https://josm.openstreetmap.de/jenkins/job/JOSM/jdk=JDK11/lastCompletedBuild/testReport/
Condition with lambda expression in org.openstreetmap.josm.gui.layer.imagery.MVTLayerTest was not fulfilled within 1 seconds.

Sorry, I missed your post -- I was already looking into it. It is going to be ~30 minutes before whether or not I know if the tests are passing/failing.

comment:21 by Don-vip, 3 years ago

OK, perfect :)

comment:22 by taylor.smock, 3 years ago

Well, I made a mistake.

It doesn't look like it was the awaitility stuff. It helps to actually have the files in source control.

by taylor.smock, 3 years ago

Attachment: 21260.3.patch added

Use tiles in source control

comment:23 by Don-vip, 3 years ago

Confirmed in local: fails without patch, works with.

comment:24 by Don-vip, 3 years ago

Resolution: fixed
Status: reopenedclosed

In 18189/josm:

fix #21260 - fix unit test (patch by taylor.smock)

comment:25 by Don-vip, 3 years ago

In 18191/josm:

fix #21260 - increase timeout in unit test, seems to cause random failures in CI

comment:26 by Polarbear-j, 3 years ago

josm 18191 / alpha 33 works for me now regarding this issue, thanks

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.