SK
Signal K•7mo ago
jetkit

freeboard-SK offline charts

I need offline charts in my system. Using Openplotter4 w/ SignalK 2.13.2 I followed the instructions here (https://pysselilivet.blogspot.com/2021/09/signal-k-charts-offline-online.html) but clearly I am missing something. The chart I downloaded ( OSM-OpenCPN2-Baltic.mbtiles) is in ~/.signalk/charts I added the path /charts into the charts plugin but still can't find it in freeboard. Please help me learn this thing. Thanks
No description
No description
30 Replies
AdrianP
AdrianP•7mo ago
The charts plugin needs to be restarted to pickup new files. Disable/ enable will do it
jetkit
jetkitOP•7mo ago
I tried that, still no luck
AdrianP
AdrianP•7mo ago
The first chart path doesn't look right... If you turn on "Enable Debug" are there any errors being logged by the plugin? What do you see if your type http://<your_server_address>:3000/signalk/v2/api/resources/charts in your browser?
FailStix
FailStix•7mo ago
if you move your chart files to the default folder "~/.signalk/charts" you don't need to set any paths in case you moved them to a folder (i.e FOLDER_NAME) within the charts folder you need to specify the whole path "/home/pi/.signalk/charts/FOLDER_NAME"
jetkit
jetkitOP•7mo ago
Thanks. I will try that tonight
Feadur
Feadur•7mo ago
I had similar issues too, and ended up restarting signalk everytime I upsdated a chart. Them check with http://<your_server_address>:3000/signalk/v2/api/resources/charts As @AdrianP suggested Test both v1 and v2, and let us know if you se any differences
jetkit
jetkitOP•7mo ago
Thank you all. @AdrianP was right, the first path was incorrect. I had to do few restart/reboots, but it is working fine now.
No description
jetkit
jetkitOP•7mo ago
Works even inside KIP now. That was a handicap of opencpn that now I don't care anymore.
No description
Tore Dahl
Tore Dahl•2mo ago
Hi, I have downloaded the same charts for off-line usage. They work fine as long as I have internet and hence DNS resolution to my Pi on the boat. When off-line is really needed i.e. no Internet and the Pi is accessed using IP and not name I get no charts. (due to my simple router that cannot handle static names) . Trying the API call http://<your_server_address>:3000/signalk/v2/api/resources/chart with IP lists the off-line charts available but the do not show up in Freeboard. Not using https on the boat if that might be relevant... Could this be a cache issue? where the name is held in a variable and not refreshed?. Tried cleaning browser history, restart browser, restart SignalK. Not sure if this is me beeing stupid somewhere, or if it's a misshit in plugin or Freeboard... Anyone else sharing this experience?
AdrianP
AdrianP•2mo ago
Do the charts appear in the Freeboard-SK chart list? If so, click on the info button for a chart and see what the chart url is. That is the url used to retrieve chart tiles.
Tore Dahl
Tore Dahl•2mo ago
They do but nothing is displayed when off-line. In my home env it looks like this. Will be on the boat on monday....
No description
Tore Dahl
Tore Dahl•2mo ago
Another check question, the plugin config states path relative to /home/tore/.signalk/charts But the screenshot is confusing... My charts are in the default location but I do not see them until the full path is entered in the config... 1st picture Charts plugin readme. 2nd picture my config It's simply a bit confusing....
No description
No description
Tore Dahl
Tore Dahl•2mo ago
And same screenshot when using IP:
No description
AdrianP
AdrianP•2mo ago
That's what I'd expect to see.
Tore Dahl
Tore Dahl•2mo ago
Indeed 🙂 Will make the corresponding screenshots on the boat next week....
AdrianP
AdrianP•2mo ago
I would suggest that you look in the browser console (network tab) to see what the results of the tile requests are. Are they erroring and with what message A screen shot of that would help
Tore Dahl
Tore Dahl•2mo ago
Yep, have been staring at that here at home, but here it works better. Will investigate that next week. I'm starting to suspect I have made stupid mistake on the boat, like chart instead och charts..... But in that case I'm a serial offender since I have had this issue on both boats for a few seasons. With the new boat we are more off-shore --> more off-line.....
Tore Dahl
Tore Dahl•2mo ago
Or maybe the file I have created is somehow corrupt..... The log is from my home instance. It comes up with no map, and changing zoom brings the map back. Can a tiles file be partially correct and partially corrupted?
AdrianP
AdrianP•2mo ago
The map will only show tiles within the maxzoom / minzoom settings. A map can only have tiles for a particular zoom range... so it is normal for tiles to appear at some zoom levels and not others.
Tore Dahl
Tore Dahl•2mo ago
Yes I'm aware of that even if I think the min/max values for the files I downloaded are somehat very strange 🙂 For example I downloaded a Europe chart with bot min and max set to 16.... I guess you can specify min/max when creating the file but not change it afterwards, correct? Also maybe you know all the 404:s in the log would that be when zooming outside the range, if so the log makes a lot more sense 🙂
AdrianP
AdrianP•2mo ago
For the 404's ... yes that is correct. For mbtiles in the chart-plugin the min max zoom is retrieved from the file metadata.
Teppo Kurki
Teppo Kurki•2mo ago
mbtiles files are actually sqlite database files and modifiable with very little sql skills
Tore Dahl
Tore Dahl•2mo ago
Yep, read that and I have some SQL skills, but arent the actual contents of the DB i.e tiles adapted to min and max zoom? Tried reading up in the specs but I guess I'll just take a file and open in a SQL lite tool 🙂 Any pointers to usable documentation?
Teppo Kurki
Teppo Kurki•2mo ago
Ask an ai? Point is to modify the metadata to reflect what tiles are in the file
Tore Dahl
Tore Dahl•2mo ago
Like suspected the DB records themselves carries the zoom_level and I guess fiddling with that is not a very good plan 🙂 My file ony contains zoom from 8 to 16... se second screenshot.
No description
No description
Tore Dahl
Tore Dahl•2mo ago
Metadata is only five records 🙂
No description
Tore Dahl
Tore Dahl•2mo ago
Any knowledge about where or how one could create another mdtiles file from opensea/street map? Asking AI lead to intersesting excursions using a software called QGIS and trying to generate MBTiles from on-line sources. I guess I made a too large selection since my computer died after chewing on that for about four hours 🙂 But there is light in that tunnel, will pursue that in about a weeks time when back on-land...
Teppo Kurki
Teppo Kurki•2mo ago
You could add minZoom and maxZoom to metadata, see https://github.com/mapbox/mbtiles-spec/blob/master/1.3/spec.md. 0 as left bound looks also suspicious
Tore Dahl
Tore Dahl•2mo ago
OK, thanks for that tip, I will check the specs closer and see how metadata relates to actual tiles in the DB. Meanwhile the generation using QGIS is painfully slow, left it this morning with an area in the south of sweden, it is now 3% done after 12 hours.... Will report back when I return from the boat mid week 🙂 Nice sail from Karlskrona to Landskrona via Christiansö in Denmark, if you are in the Baltic Christiansö should be on your bucket list. Amazing place near Bornholm in the southeren Baltic. Three full days on the boat and long off-shore legs with no internet, and this time no issues with off-line charts at all. Updated server and all plugins before departure, maybe something has changed. Anyhow from my point of view it all works now. Will continue the quest to create off-line charts from on-line resources and report back any usable progress. Update regarding generation of off-line charts. I have learned to generate mbtiles off-line charts from basically any source. I have mostly experimented with OpenSeaMap. I guess any source that QGIS (open source GIS software) can read can be turned into mbtiles. Not complicated at all, I just struggled with the parameters and tried with too large areas at start. If you search youtube for QGIS MBTILES you will find lot's of instructional videos --> I will not write down a guide here. An example of a video I used is https://youtu.be/d7eBl2f0kL8?si=GmN7Bv0MxPmnCOJX If you try generate be careful with max zoom, I have use zoom level 10-15 and that makes it useable in my opinion. I made one sample with max level 18 and layer 18 is like 90% of the tiles --> time to generate and file size explodes. I also tried manipulating the metadata of an existing mbtiles DB, did not really make any difference.
Tika
Tika•4w ago
I have the same issue with the maps you mentioned, but not with some other maps. I have same issue with these maps in Grafana using SignalK as map server. But, these maps do work in OpenCPN. Based on this, there’s something wrong either with these maps or how they are processed by SignalK. Or both😀

Did you find this page helpful?