SignalK / charts-plugin

Signal K Node server charts plugin
Apache License 2.0
6 stars 8 forks source link

Map loaded, but no data shown #7

Closed pgrawehr closed 4 years ago

pgrawehr commented 4 years ago

I tried using the "Europe" map from https://downloadlayer--onlinechart-ol3.netlify.com/#/download/%5Embtile%24/-719043247?lat=49.1602&lon=10.6979&zoom=5&layers=A1-1&lang=de with this plugin, but it just doesn't work as expected.

Nothing is visible, despite the fact that I'm sure that I'm within the map range. The map does work in OpenCPN.

The server log contains messages of the form

GET /signalk/v1/api/resources/charts/Europa1-20190621/11/1079/653 404 4.241 ms - 9
GET /signalk/v1/api/resources/charts/Europa1-20190621/11/1082/655 404 47.244 ms - 9
GET /signalk/v1/api/resources/charts/Europa1-20190621/11/1082/654 404 48.138 ms - 9
GET /signalk/v1/api/resources/charts/Europa1-20190621/11/1082/653 404 46.008 ms - 9
GET /signalk/v1/api/resources/charts/Europa1-20190621/11/1083/655 404 42.510 ms - 9
GET /signalk/v1/api/resources/charts/Europa1-20190621/11/1083/654 404 33.684 ms - 9

So the map server doesn't find the map it's supposed to have (or cannot properly decode the cell indices)

The world coastline map does work as expected.

tkurki commented 4 years ago

For one thing that file has odd min and maxzoom settings:

    "OSM-OpenCPN2-Europa1-20190621-0730": {
        "identifier": "OSM-OpenCPN2-Europa1-20190621-0730",
        "name": "Europa1",
        "bounds": [
            4.405517578125,
            43.45291889355465,
            16.995849609375,
            54.32613472050531
        ],
        "minzoom": 16,
        "maxzoom": 16,
        "format": "png",
        "type": "tilelayer",
        "tilemapUrl": "/signalk/v1/api/resources/charts/OSM-OpenCPN2-Europa1-20190621-0730/{z}/{x}/{y}",
        "scale": "250000"
    },
tkurki commented 4 years ago

There is only one zoom level in the file:

sqlite> select distinct zoom_level from tiles;
16

and if you zoom in to that level there is detail there, here shown Zellsee by RadolfZell

image

Where did these files come from? The Baltic file has more zoom levels available:

k$ echo "select distinct zoom_level from tiles" | sqlite3  OSM-OpenCPN2-Baltic-20190618-1343.mbtiles
8
10
12
14
16
pgrawehr commented 4 years ago

Oh... It seems I never hit exactly that zoom level. But that explains the problems, and is also consistent with the finding that the KAP file (the other format for the same region on that website) has the same behavior of only consisting of one level. It seems I need to find out how to request an update of the map files.

I found that MOBAC (https://mobac.sourceforge.io/) can create the correct maps (when feed with updated tile sources), but I would prefer not to do that myself, because it requires downloading a huge number of tiles for decently sized maps, which is "discouraged" by the server usage policies.