Cruisers Forum
 


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 26-07-2016, 16:36   #1
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
mbtiles in opencpn

I have some success with two basic scripts I have written to put tiled data into opencpn. There are many tiled data available via the web such as osm, google earth, topographic data etc.. If you have used sas planet you can see quite a list of sources.

The first script extracts the coordinates of all of the cm93 tiles into a seed yaml file. mapproxy-seed pulls the tiled data into an mbtiles file with worldwide coverage and good scale without running out of storage, and with reasonable bandwidth. I realize this has limitations as cm93 doesn't cover a lot of areas with good detail, but it's a starting point and covers a large amount of harbors and difficult passes. It's easily possible to add additional coordinates as needed in the future to expand the database.

Making mbtiles a native format in opencpn is a goal of mine, but in the meantime I wrote another script which converts this single mbtiles file into thousands of kap files.

The results are very good initially and there are various minor improvements to make.

I can for example pull google imagery, In fact the current ge2kap which by comparison is not as user friendly (mine can work on any os and just needs an input of bounding boxes, contours or shapefiles to define the areas to scan)

But there is a pressing issue. I know on many sail blogs etc, you can download google imagery kap files. At least, it is ok for a single user to pull but according to google, it is a violation of their tos to redistribute imagery.

Furthermore I would apply various filters to the imagery especially to improve contrast over water, and possibly to reduce detail over land to save disk space.
seandepagnier is offline   Reply With Quote
Old 10-08-2016, 13:10   #2
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: mbtiles in opencpn

Looks like Sean found a helper program and is contributing.
https://github.com/seandepagnier/landez
rgleason is offline   Reply With Quote
Old 08-04-2017, 07:29   #3
Registered User

Join Date: Dec 2011
Boat: Blue Buoy Del Rey 50
Posts: 206
Re: mbtiles in opencpn

@boat_alexandra: Anything we can see or playwith? Are your scripts on github or possilbe to try?

Thanks
deepthought is offline   Reply With Quote
Old 08-04-2017, 09:45   #4
Registered User
 
sailorF54's Avatar

Join Date: Dec 2009
Location: Perros-Guirec, France
Boat: Jeanneau Sunshine 36
Posts: 999
Re: mbtiles in opencpn

I already have mbtiles extracted from some SASPlanet maps/charts.
I hope to be able to use them in OpenCpn in the near future, just as I already can in qtVlm...
Attached Thumbnails
Click image for larger version

Name:	Screen Shot.jpg
Views:	362
Size:	283.5 KB
ID:	144934  
sailorF54 is offline   Reply With Quote
Old 10-04-2017, 16:54   #5
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: mbtiles in opencpn

You can use the scripts on github to convert mbtiles into kap.
seandepagnier is offline   Reply With Quote
Old 10-04-2017, 22:19   #6
Registered User
 
sailorF54's Avatar

Join Date: Dec 2009
Location: Perros-Guirec, France
Boat: Jeanneau Sunshine 36
Posts: 999
Re: mbtiles in opencpn

Quote:
Originally Posted by boat_alexandra View Post
You can use the scripts on github to convert mbtiles into kap.
Yes I personally could, but I was thinking of the 99% for which Linux is a foreign language, as opposed to W...
sailorF54 is offline   Reply With Quote
Old 11-04-2017, 12:07   #7
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: mbtiles in opencpn

The scripts should work on many os
seandepagnier is offline   Reply With Quote
Old 21-09-2017, 13:36   #8
Registered User

Join Date: Jan 2015
Location: PAIMPOL - FRANCE
Boat: FEELING 39 DI
Posts: 28
Re: mbtiles in opencpn

i try to convert mbtiles to KAP for use with open cpn but the convert files kap was very very big compared file format mbtiles
Some software like saigrib can read directly file mbtiles
ploubaz22 is offline   Reply With Quote
Old 21-09-2017, 14:27   #9
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: mbtiles in opencpn

How much bigger?

mbtiles uses png compression which could be half the size of kap. If you have mbtiles using jpg, let me know.

You can compress the kap using xz which gets it back down to nearly the size of mbtiles again, and opencpn can read that.

I cannot find the source code to "sailgrib" so it's impossible for me to even run the program, it can't run on my platform.
seandepagnier is offline   Reply With Quote
Old 21-09-2017, 16:44   #10
Registered User

Join Date: Dec 2011
Boat: Blue Buoy Del Rey 50
Posts: 206
Re: mbtiles in opencpn

Would be nice to make script that can convert raster to vector charts
deepthought is offline   Reply With Quote
Old 21-09-2017, 18:23   #11
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: mbtiles in opencpn

Quote:
Originally Posted by deepthought View Post
Would be nice to make script that can convert raster to vector charts


If I had a computer program that could do that I would own the largest yacht in the world.
transmitterdan is offline   Reply With Quote
Old 21-09-2017, 18:46   #12
Registered User

Join Date: Dec 2011
Boat: Blue Buoy Del Rey 50
Posts: 206
Re: mbtiles in opencpn

I think its possible...
deepthought is offline   Reply With Quote
Old 22-09-2017, 03:26   #13
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: mbtiles in opencpn

Quote:
Originally Posted by deepthought View Post
I think its possible...
Then the world will be your oyster when you do it. There are companies that convert raster technical drawings (architectural, electrical schematic, etc.) to vector. They charge a lot for each drawing as it requires significant human intervention because up to now there is no perfect software that can do it. Raster charts are about 100 times more complex than architectural drawings.
transmitterdan is offline   Reply With Quote
Old 25-09-2017, 03:30   #14
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: mbtiles in opencpn

We can always hope that AI +AI see Mit technology this month and Quantum computing will do it smile.
rgleason is offline   Reply With Quote
Old 30-09-2017, 08:39   #15
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: mbtiles in opencpn

Sean, since png files cannot be compressed as efficiently as jpeg (even considering they are lossey), what about adding to the mbtile spec, the use of jpeg?
Maybe some small program that converts png2jpeg and swaps the image data?

I like your description of what your scripts do. I hope Jon Turgeon venturefarther.com could incorporate that into his server as an efficient scheme, somehow.
rgleason is offline   Reply With Quote
Reply

Tags
enc, opencpn


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
Mbtiles edelvoilier OpenCPN 3 23-05-2016 13:02
OpenCPN, Linux, Web site opencpn.org, user manual and manual wiki ... Gilletarom OpenCPN 26 30-11-2015 15:17
Request that Android OpenCPN.apk Open Source version be put up in the OpenCPN.org Dow yachtmanforfun OpenCPN 18 20-09-2015 06:00
Virtual OpenCPN - 'OpenCPN on a Stick' r.fairman OpenCPN 23 16-10-2011 19:51

Advertise Here


All times are GMT -7. The time now is 06:28.


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.