Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 26-07-2016, 17:36   #1
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: chesapeake bay
Boat: bristol 27
Posts: 2,813
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.
__________________

__________________
boat_alexandra is offline   Reply With Quote
Old 10-08-2016, 14:10   #2
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,407
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, 08:29   #3
Registered User

Join Date: Dec 2011
Boat: Catfisher 28
Posts: 149
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, 10:45   #4
Senior Cruiser
 
sailorF54's Avatar

Cruisers Forum Supporter

Join Date: Dec 2009
Location: Perros-Guirec, France
Boat: Jeanneau Sunshine 36
Posts: 833
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:	118
Size:	283.5 KB
ID:	144934  
__________________
sailorF54 is offline   Reply With Quote
Old 10-04-2017, 17:54   #5
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: chesapeake bay
Boat: bristol 27
Posts: 2,813
Re: mbtiles in opencpn

You can use the scripts on github to convert mbtiles into kap.
__________________
boat_alexandra is offline   Reply With Quote
Old 10-04-2017, 23:19   #6
Senior Cruiser
 
sailorF54's Avatar

Cruisers Forum Supporter

Join Date: Dec 2009
Location: Perros-Guirec, France
Boat: Jeanneau Sunshine 36
Posts: 833
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, 13:07   #7
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: chesapeake bay
Boat: bristol 27
Posts: 2,813
Re: mbtiles in opencpn

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

Join Date: Jan 2015
Posts: 11
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, 15:27   #9
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: chesapeake bay
Boat: bristol 27
Posts: 2,813
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.
__________________
boat_alexandra is offline   Reply With Quote
Old 21-09-2017, 17:44   #10
Registered User

Join Date: Dec 2011
Boat: Catfisher 28
Posts: 149
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, 19:23   #11
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 4,028
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, 19:46   #12
Registered User

Join Date: Dec 2011
Boat: Catfisher 28
Posts: 149
Re: mbtiles in opencpn

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

Join Date: Oct 2011
Boat: Valiant 42
Posts: 4,028
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, 04:30   #14
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,407
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, 09:39   #15
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,407
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

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 16:17.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.