Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 19-09-2017, 00:42   #1
Registered User

Join Date: Apr 2015
Posts: 18
Installing charts, layers and UserIcons automatically

Hi all,

Although I am a member of this forum already for a long time, a very short introduction: Hans Fix, sails often on the dutch Waddenzee and a member of Nautin, a foundation that supplies Nautical Information for the Netherlands and Germany.
Nautin has a lot of information for the recreational sailor like charts, tidal information, a very up to date database with buoys and other related stuff.
The problem we encouter is that a lot of users find it hard to install this stuff on their PC, phone or tablet. (Perhaps it is the age :-) )
So what we want to do is make an easy to install package, with charts gpx with buoys and usericons, for example for Windows or Android.
One press on a button should be enough to install it, or for Android, select an app on the Android Play Store, and it installs automatically.
There is a lot of know how in our team (The authors of QuickTide for Windows and Android e.g.) so technical it should be no problem.
My question: is such a thing already available? Or are there code snippets we can use with examples?


Regards,
Hans Fix
Stichting Nautin

Example of a laser altymetry chart for the Waddenzee:
__________________

__________________
Hans Fix is offline   Reply With Quote
Old 19-09-2017, 04:07   #2
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 3,888
Re: Installing charts, layers and UserIcons automatically

Since your files are already compatible with OpenCPN then all that is required is to create XML catalog file(s) with the correct format and OpenCPN can download and install the files without writing any code. Have a look at the chart downloader plugin. It's pretty easy to figure out what XML files it uses.
__________________

__________________
transmitterdan is offline   Reply With Quote
Old 19-09-2017, 05:15   #3
Registered User

Join Date: Apr 2015
Posts: 18
Re: Installing charts, layers and UserIcons automatically

Is it possible to install UserIcons, GPX-waypoint files and KAP-chart files with the downloader?
__________________
Hans Fix is offline   Reply With Quote
Old 19-09-2017, 05:21   #4
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 3,987
Re: Installing charts, layers and UserIcons automatically

Quote:
Originally Posted by Hans Fix View Post
Is it possible to install UserIcons, GPX-waypoint files and KAP-chart files with the downloader?
Hans..

It is possible to download/install whatever using the chart downloader plugin, given you put it into a ZIP archive. If the current features are for some reason not enough for you, just let us know and we will see how to implement what you need. Sure less work than doing something very similar from scratch again.

Pavel
__________________
nohal is offline   Reply With Quote
Old 19-09-2017, 05:30   #5
Registered User

Join Date: Apr 2015
Posts: 18
Re: Installing charts, layers and UserIcons automatically

Thanks! Where can I find documentation for the XML file?
__________________
Hans Fix is offline   Reply With Quote
Old 19-09-2017, 05:33   #6
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 3,987
Re: Installing charts, layers and UserIcons automatically

Hans...
Please look at https://github.com/chartcatalogs/cat...OY_Catalog.xml and let me know if I still need to start writing documentation for it.

Pavel
__________________
nohal is offline   Reply With Quote
Old 20-09-2017, 00:14   #7
Registered User

Join Date: Apr 2015
Posts: 18
Re: Installing charts, layers and UserIcons automatically

Hi,

I am testing with the xml, and it works up to the downloading.
The only problem I encouter is after the unpacking: all files are in the directory as declared in the downloader tool, but the directory structure in the zip file is completely lost.
What am I doing wrong?
__________________
Hans Fix is offline   Reply With Quote
Old 20-09-2017, 00:43   #8
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 3,987
Re: Installing charts, layers and UserIcons automatically

Quote:
Originally Posted by Hans Fix View Post
the directory structure in the zip file is completely lost.
What am I doing wrong?
You are not doing anything wrong. No chart archives we have seen contain any directories, so we implemented simplified unpacking logic that simply does not care about them (and it also very much simplifies the logic comparing files for updates).

There are basically 2 ways out of this and depends on the structure of your data (May we see it?):
1) You split the data into several archives (I prefer this if you have just a few dirs).
2) We look into support for directories in archives (Sure a must if the directory structure you have is complicated)

Pavel
__________________
nohal is offline   Reply With Quote
Old 20-09-2017, 01:24   #9
Registered User

Join Date: Apr 2015
Posts: 18
Re: Installing charts, layers and UserIcons automatically

Are you sure :-) ?
If I download for example the Belgium Inland ENC Charts, then there is a directory structure in the zip file.
In the resulting directory there are lots of directories and files...

Ah, a little further investigation reveals that these are sub-directories in directories.
So if I put everything in an extra directory it works!
__________________
Hans Fix is offline   Reply With Quote
Old 20-09-2017, 01:36   #10
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 3,987
Re: Installing charts, layers and UserIcons automatically

You are of course right, I forgot which way we ended up with at https://github.com/OpenCPN/OpenCPN/b...r_pi.cpp#L1485
__________________
nohal is offline   Reply With Quote
Old 21-09-2017, 05:09   #11
Registered User

Join Date: Apr 2015
Posts: 18
Re: Installing charts, layers and UserIcons automatically

Hi,

perhaps I am overlooking some features that I don't know, but I encounter the following problems/ issues/ nice to haves:

I am installing a new or updated gpx file in directory layers, but this file is only detected after a restart of OpenCPN. (Perhaps also for the UserIcons I add in that directory)
I want to create chart groups automatically with the content of charts I just installed. (A group for Bathymetry Germany and a group for laser altimetry charts e.g)

Is it already possible to do these actions automatically?

regards

Hans Fix
__________________
Hans Fix is offline   Reply With Quote
Old 21-09-2017, 05:16   #12
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 3,987
Re: Installing charts, layers and UserIcons automatically

Hans...
No, neither of this is currently implemented in the plugin API, but create feature requests for it, seems reasonably doable for the next release.

Pavel
__________________
nohal is offline   Reply With Quote
Old 21-09-2017, 08:20   #13
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,974
Re: Installing charts, layers and UserIcons automatically

Hans
Feature Requests in Tracker. You need to register if you have not.
https://opencpn.org/flyspray/
__________________

__________________
rgleason is offline   Reply With Quote
Reply

Tags
cal, charts

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
Layers or layers? Aart K. OpenCPN 4 23-03-2017 07:09
Install "UserIcons" automatically Gilletarom OpenCPN 2 25-02-2016 01:26
Automatically save tracks. nixontankgirl OpenCPN 10 22-08-2015 21:43
Automatically open picture on a waypoint Tommylun89 OpenCPN 7 20-07-2014 06:59
Why does selecting a chart automatically zoom? nkiesel OpenCPN 4 28-01-2014 01:48



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

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


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.