I need some help with sorting out code in wvschart.cpp. First of all the problem:
As you probably remember I am working on Debian inclusion of the OpenCPN
and most hot topic for now is the data files that are distributed along with OpenCPN
tarball. Of cause Debian and I sure other distros as well does not want to have the same data distributed several times by different software
. Not only due to space, but also to the easy handling of fixes and corrections to the data.
One of such data is Wolrd Vector Shoreline that is included as wvs43.dat file. Debian has xtide package that ships World Vector Shoreline data too. The only thing that there is only wvs1.dat available there. As I understand this is the higher resolution version of the same data as in wvs43.dat.
I am thinking about possibility of making OpenCPN to use wvs1.dat instead of wvs43.dat.
Based on initial review this file is explicitly specified in wvschart.cpp. First it uses it to check the parameters sanity in constructor of WVSChart class. This is not a big deal as it just open/close the file there.
More interesting is that for data retrieval, it uses wvsrtv function that looks to be taken from xtide. Thought It passes the actual path to wvs43.dat file to it. I see there is even code to parse /etc/xtide.conf for the list of dirs and some code to automagically choose the best file based on resolutions (just first sight guess). But this code is disabled in OpenCPN, and the path to the actual wvs43.dat file is passed instead.
Does somebody know of why the wvs43.dat was set explicitly. Is this just for simplicitly or the commented out code did not work
for some reason? Any thoughs of the possibility of replacing wvs43.dat to wvs1.dat? Any advantages or disadvantages?
That is because another way is to request xtide mantainer to include wvs43.dat along with wvs1.dat. So any general considerations are welcomed.