Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 15-01-2023, 18:39   #1
Wanderer
 
Tenedos's Avatar

Cruisers Forum Supporter

Join Date: Nov 2012
Location: Used to be San Francisco Bay, now PNW, soon to be the Caribbean
Boat: Jeanneau 43 DS and soon Leopard 45
Posts: 517
Possible to use tile server as chart source?

I searched a bit but couldn't find an answer. Is there a way to use a tile server (e.g. https://tileservice.charts.noaa.gov/tiles/50000_1/{z}/{x}/{y}.png or https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}) in OpenCPN?

It is ok if they work only when there is Internet connectivity. I do a bunch of planning at dock where I have connectivity and being able to use some sources from a tile server would come very handy.
__________________
SV Renaissance
Tenedos is offline   Reply With Quote
Old 17-01-2023, 04:30   #2
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,790
Images: 2
Re: Possible to use tile server as chart source?

These links do not work, so it is probably not possible.
rgleason is offline   Reply With Quote
Old 17-01-2023, 06:29   #3
Registered User

Join Date: Feb 2016
Posts: 143
Re: Possible to use tile server as chart source?

The links as such are not usable in a browser, but describe a map source/server that can be used with the correct x, y and z parameters to load map tiles.
teppokurki is offline   Reply With Quote
Old 17-01-2023, 12:21   #4
Registered User
 
phiggins's Avatar

Join Date: Nov 2004
Location: Davao, Philippines
Posts: 1,776
Send a message via Skype™ to phiggins
Re: Possible to use tile server as chart source?

SasPlanet can access ArcGIS Imagery and many other map sources. You can use Sat2Chart to create the charts in either Kap or Mbtiles. You can download Sat2Chart here: https://www.gdayii.ca/Downloads/Sat2Chart_Install.exe and it has liks to download all the other programs needed including SasPlanet.
__________________
Paul,
" One moment you are running along, the next you are no more." Dean Spanley
phiggins is offline   Reply With Quote
Old 17-01-2023, 22:59   #5
Wanderer
 
Tenedos's Avatar

Cruisers Forum Supporter

Join Date: Nov 2012
Location: Used to be San Francisco Bay, now PNW, soon to be the Caribbean
Boat: Jeanneau 43 DS and soon Leopard 45
Posts: 517
Re: Possible to use tile server as chart source?

Quote:
Originally Posted by phiggins View Post
SasPlanet can access ArcGIS Imagery and many other map sources. You can use Sat2Chart to create the charts in either Kap or Mbtiles. You can download Sat2Chart here: https://www.gdayii.ca/Downloads/Sat2Chart_Install.exe and it has liks to download all the other programs needed including SasPlanet.
Thanks, I saw that. It comes close but not quite the solution (and great utility btw, thanks for developing it!). Is there anything available as a source code we can use to build on?
__________________
SV Renaissance
Tenedos is offline   Reply With Quote
Old 17-01-2023, 23:01   #6
Wanderer
 
Tenedos's Avatar

Cruisers Forum Supporter

Join Date: Nov 2012
Location: Used to be San Francisco Bay, now PNW, soon to be the Caribbean
Boat: Jeanneau 43 DS and soon Leopard 45
Posts: 517
Re: Possible to use tile server as chart source?

Quote:
Originally Posted by rgleason View Post
These links do not work, so it is probably not possible.
As Teppo mentioned, these do require x, y and z populated to be a valid link. An actual working example would be something like this:

https://server.arcgisonline.com/ArcG.../15/11437/5246
__________________
SV Renaissance
Tenedos is offline   Reply With Quote
Old 18-01-2023, 10:04   #7
Registered User
 
phiggins's Avatar

Join Date: Nov 2004
Location: Davao, Philippines
Posts: 1,776
Send a message via Skype™ to phiggins
Re: Possible to use tile server as chart source?

Sasplanet accesses those tiles servers using x,y,z so why would you want to create something else that does the same thing?
__________________
Paul,
" One moment you are running along, the next you are no more." Dean Spanley
phiggins is offline   Reply With Quote
Old 18-01-2023, 10:45   #8
Registered User

Join Date: Oct 2021
Posts: 589
Re: Possible to use tile server as chart source?

Quote:
Originally Posted by phiggins View Post
Sasplanet accesses those tiles servers using x,y,z so why would you want to create something else that does the same thing?
If I understand the question, OP doesn't want to do the same thing. Wants to be able to access the tiles directly from the internet into OpenCPN when internet service is available. Cuts out all the steps of creating "charts" for offline use, with the restriction that they can only be used when online.

I do see a use case for the idea, somewhat intrigued by it.
HeywoodJ is offline   Reply With Quote
Old 18-01-2023, 12:44   #9
Registered User
 
phiggins's Avatar

Join Date: Nov 2004
Location: Davao, Philippines
Posts: 1,776
Send a message via Skype™ to phiggins
Re: Possible to use tile server as chart source?

Tenedos,
One user of Sat2Chart figured out how to add more maps to SasPlanet to access other tile servers. It is documented in the SasPlanet Help User Manual: "zmp format and map generation". This user is a member of the GE2KAP Facebook group. If you join the group and ask your question he may tell you how to do it.
__________________
Paul,
" One moment you are running along, the next you are no more." Dean Spanley
phiggins is offline   Reply With Quote
Old 21-01-2023, 19:49   #10
Wanderer
 
Tenedos's Avatar

Cruisers Forum Supporter

Join Date: Nov 2012
Location: Used to be San Francisco Bay, now PNW, soon to be the Caribbean
Boat: Jeanneau 43 DS and soon Leopard 45
Posts: 517
Re: Possible to use tile server as chart source?

Quote:
Originally Posted by HeywoodJ View Post
If I understand the question, OP doesn't want to do the same thing. Wants to be able to access the tiles directly from the internet into OpenCPN when internet service is available. Cuts out all the steps of creating "charts" for offline use, with the restriction that they can only be used when online.
Yes indeed.

Quote:
Originally Posted by phiggins View Post
One user of Sat2Chart figured out how to add more maps to SasPlanet to access other tile servers. It is documented in the SasPlanet Help User Manual: "zmp format and map generation". This user is a member of the GE2KAP Facebook group. If you join the group and ask your question he may tell you how to do it.
Thanks Paul. I wasn't aware of the group. Will try it there.
__________________
SV Renaissance
Tenedos is offline   Reply With Quote
Old 02-02-2023, 20:36   #11
Wanderer
 
Tenedos's Avatar

Cruisers Forum Supporter

Join Date: Nov 2012
Location: Used to be San Francisco Bay, now PNW, soon to be the Caribbean
Boat: Jeanneau 43 DS and soon Leopard 45
Posts: 517
Re: Possible to use tile server as chart source?

Ok, an update on this. I think I found a way to hack OpenCPN to support online tile servers by tweaking mbtiles loader. But after spending a few hours trying to compile OpenCPN on macOS, I gave up. Instructions for building on macOS seems outdated.

So, I took an easier path and wrote a simple python script to download tiles and convert them to an MBTiles file. OpenCPN happily processes those. See the screenshot. I also built a simple web interface to choose the areas to download in rectangles (see the second screenshot). I think Sat2Chart does something similar but I am a MacOS shop so Windows didn't really work out for me.

I put the source code here: https://github.com/itemir/rpi_boat_u...rts_to_mbtiles

I still want to go back and hack OpenCPN itself when I have some more time but learning curve was a bit steep, so that is for a later date.

If there any active OpenCPN developers who see this thread, I would appreciate some up-to-date instructions on compiling on macOS and maybe a plugin developers guide. Something similar to Signal K Server Plugins doc would go a long way and would be greatly appreciated.
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2023-02-02 at 8.31.21 PM.jpg
Views:	59
Size:	411.0 KB
ID:	271047   Click image for larger version

Name:	Screenshot 2023-02-02 at 8.30.36 PM.jpg
Views:	64
Size:	412.6 KB
ID:	271048  

__________________
SV Renaissance
Tenedos is offline   Reply With Quote
Old 03-02-2023, 02:46   #12
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,235
Re: Possible to use tile server as chart source?

Look at https://github.com/OpenCPN/OpenCPN/b...build-macos.sh
nohal is offline   Reply With Quote
Old 03-02-2023, 06:15   #13
Wanderer
 
Tenedos's Avatar

Cruisers Forum Supporter

Join Date: Nov 2012
Location: Used to be San Francisco Bay, now PNW, soon to be the Caribbean
Boat: Jeanneau 43 DS and soon Leopard 45
Posts: 517
Re: Possible to use tile server as chart source?

Quote:
Originally Posted by nohal View Post
Thanks, this was much easier! Someone should update the build instructions on the web page.

If you also have any pointers for a starter plugin project, it will be great.
__________________
SV Renaissance
Tenedos is offline   Reply With Quote
Old 03-02-2023, 06:18   #14
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,235
Re: Possible to use tile server as chart source?

https://github.com/Rasbats/shipdriver_pi/

Feel free to be that someone, otherwise we will get to it as time allows, probably shortly after 5.8 is out.
nohal is offline   Reply With Quote
Old 04-02-2023, 12:35   #15
Wanderer
 
Tenedos's Avatar

Cruisers Forum Supporter

Join Date: Nov 2012
Location: Used to be San Francisco Bay, now PNW, soon to be the Caribbean
Boat: Jeanneau 43 DS and soon Leopard 45
Posts: 517
Re: Possible to use tile server as chart source?

Closure on this. I could indeed tweak mbtiles.cpp to load tiles dynamically from an online server but performance was poor. Panning was very slow and at times frozen until all tiles were downloaded. I think this needs to be built a bit more intelligently with async loading, maybe multi-threaded downloads and potentially caching. I won't be able to get that far though.

I mostly achieved what I needed with the script I linked above.

@nohal, thanks for the pointers, it was fun to play with OpenCPN's source code, helped me understand the code layout a bit better. Maybe I will come back to contribute something useful at a later time.
__________________
SV Renaissance
Tenedos is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tile server for depth images? mglonnro Navigation 4 29-08-2020 12:23
Is it possible to have a client-server configuration? ptolomeoo OpenCPN 7 10-10-2019 16:25
Server Errors on the Server Errors thread Tom Stormcrowe Forum Tech Support & Site Help 11 24-08-2012 06:51
Tile on a Galley Countertop ? SabreKai Construction, Maintenance & Refit 63 10-08-2011 15:13
diesel heater install: ceramic tile surround? bluewater Construction, Maintenance & Refit 6 26-02-2007 20:16

Advertise Here
  Vendor Spotlight
No Threads to Display.


All times are GMT -7. The time now is 00:55.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.