nohal / chartdldr_pi Goto Github PK
View Code? Open in Web Editor NEWChart Downloader plugin for OpenCPN
Chart Downloader plugin for OpenCPN
wxHTTP* is plain evil, the plugin must be switched to wxCURL - https://github.com/seandepagnier/weatherfax_pi has a correct implementation of downloads as a reference
The thread now used is broken as far as I remember and should not be needed at all.
Most likely this is the cause - we can't use the STL based wx3.0, so unfortunately will have to fix it...
with a single click and have all updated charts for all catalogs preselected for download.
Alternatively allow selection of multiple catalogs (shift-click) before click on "update"
There are ~20 RNC catalogs for US waters, plus as many ENC. Updating each is several clicks and waits...
Thanks!
Dirk
This isn't a bug in the downloader. Rather it is something that will probably confuse newbies and we should prepare for it.
If you have existing charts in hierarchical folders and you tell the chart downloader the wrong thing unexpected results might happen. For example, suppose you have all your ENC charts and RNC charts for a region under some folders like this:
~/charts/texas/ENC_ROOT
~/charts/texas/BSB_ROOT
But you tell the chart downloader that your charts are in
~/charts/texas
The downloader will happily check the dates of your charts and tell you that some are up to date and some need updating. It doesn't complain that there are in fact no charts in ~/charts/texas.
If you select to update the revised charts it will put the new charts in ~/charts/texas and leave the old charts where they were. A newbie might become confused by that. What will OpenCPN do in such a case? Will it only show the chart from the higher level or will it also show the out of date chart further down the directory tree?
Although the files are not removed from disk, it might be confusing for the user if we make deletion too easy.
The Army Corps of Engineers catalogs are currently broken due to a change to file naming (and maybe even format)
Catalog section - Radio button Predefined ---> Dropdown selection needs to be wider.
in the chart source list
With focus on 2 user groups
Both need pictures, preferably taken on Windows
not to delay the Toolbox opening.
It seems that Gringos are familiar with the Coast Guard district logic. Switching the catalogs to them will save space while selecting sources and generally decrease clutter.
This is the case with some of the IENC sources. Needed for #4
A way to select NZ and set a destination directory,
Initiate full download and install without a directory.
Upack and install charts in the destination,
then create an xml directory from the charts if the zip does not contain one.
Some Brasilian charts are not properly identified on local disk (no CHARTNR.KAP exists, they have CHARTNR.BSB instead)
When the database gets updated during the proccess all folders under "charts" directories are scanned weather or not they are listed in the Directories, this takes awhile, then it appears that the opengl cache is updated. (this is a basic opengl feature). However when there are many charts that are not in the directory, and the charts in the directory start getting fairly large, it appears that opengl updating the cache overpowers the computer when "Apply" or "Close" this process.
I found the solution was to turn off Opengl during chart changes and file and database updates.
Currently the chart directory must exist, implement it's creation.
Zulu values for timestamps are not properly converted to zonal time
Implement checks for catalog URL validity, as strict as possible....
Any chance of letting us stretch this pop up menu out to the right so we can see full
This may be a bug in the implementation of tabs within the OpenCPN Charts dialog itself. ChartDldrPanelImpl::ChartDldrPanelImpl is the last dialog added to the toolbox Charts tabs. That dialog has a "default" button that is "Download selected charts". So even if the user is working on another tab such as "Chart files" or "Vector Chart Display" and they press the enter key it fires the DownloadCharts event on the invisible dialog. This is probably not what the user expects. Not sure the best method to fix this. Probably the safest thing to do is not have a default button in the plugin. This default flag is set in the wxFormBuilder tool not in the plugin source itself.
This line:
wxRegEx re(_T("^https?\\://[a-zA-Z0-9\\./_-]*\\.[xX][mM][lL]$") ); //TODO: wxRegEx sucks a bit, this RE is way too naive
should eliminate URLs that don't end in .xml.
Downloaded all of Brazil to test it.
There are about 13 charts that keep coming up with "Update Available" even when "Download" at least 3 to 4 times. Some of them are:
I wanted to see the directory and file name in order to check if there is the necessary folder and file in the proper place, and to try to determine why the status did not change to "Up to Date"
Some way of doing this would be useful. Perhaps add something to allow:
Options > Downloader > Predef. Catalog -Wider.
Options > Downloader > Catalog Area -Make so it can Pull down
Needs to be able to pull it down to see the list better height is too restricted.
Can't see enough of the Sources. Scolling is useful but we need more window area
At present we are restricted to a single depth (one directory below) format, otherwise the catalogs do not show and downloads do not work. See this description of the problem.
http://www.cruisersforum.com/forums/f134/chart-downloader-updater-plugin-58737-4.html#post1729188
#58, 59, & 60
Read catalogs from and download to the directory which the chartdownload tool is being pointed at.
If possible, shorten Source Headers and add descriptive locations.
Saw some of this but it seems to have disappeared.
Tried to shorten and still have it understood.
US RNC Region 02 - RI - Canada
US RNC Region 03 - Nantucket - NJ
US RNC Region 04 - Delaware
US RNC Region 06 - VA - FL
US RNC Region 07 - FL East
US RNC Region 08 - FL West
US RNC Region 10 - P.Rico -Virgin I.
US RNC Region 12 - S.CA
US RNC Region 13 - L.Michigan
US RNC Region 14 - S.Fran - C.Flattery
US RNC Region 15 - P.NW - Canada
US RNC Region 17 - AL - Mexico
US RNCRegion 22 - L. Superior & Huron
US RNC Region 24 - L. Erie
US RNC Region 26 - L. Ontario
US RNC Region 30 - AL SE
US RNC Region 32 - AL Central
US RNC Region 34 - AL Aleutians
US RNC Region 36 - AL N.S.- Beauf.
US RNC Region 40 - Hawai
This problem has been reported already in flyspray/tracker. But now it will probably begin to annoy a whole new group of users (i.e. newbies using chartdldr pi). Anytime a modal dialog "pops up", at least on Windows 7, OpenCPN comes to the front. If you have a long download of charts going it is very annoying. Every time the DownloadDialog box pops up to start a new chart download it sends whatever window you were working in behind OpenCPN. Interestingly the focus is still with the window that is behind O. I am pretty sure this is a wxWidgets thing.
To be able to set the preferred main chart directory under Preferences when in Options > Plugin > Preferences. This would not be forgotten, and would get the user to the top of the Chart directory.
Another small bug in function:
void ChartDldrGuiAddSourceDlg::OnSourceSelected( wxCommandEvent& event )
This line:
m_dpChartDirectory->SetPath(FixPath(cs->GetDir()));
Would be better if it tested to be sure the path is empty like this:
if( m_dpChartDirectory->GetPath().IsEmpty() )
m_dpChartDirectory->SetPath(FixPath(cs->GetDir()));
The default path should only be used if the user has not already selected a path.
(NOTE: These comments contain XML so you may have to "edit" the comment to see the actual XML text.)
When trying to populate the list of charts for ACE inland rivers this function:
bool ChartCatalog::LoadFromFile(wxString path, bool headerOnly)
returns false when reading the file "iencu37productscatalog.xml". When reading other NOAA xml files it works. For some reason this line ret = LoadFromXml(doc, headerOnly); returns false when reading that file. The first part of "iencu37productscatalog.xml" looks like this:
<title>IENC U37 Product Catalog</title><date_created>01/14/2015</date_created>
<time_created>14:33:32</time_created>
<ref_spec>USACE IENC Product Catalog Technical Specifications</ref_spec>
<ref_spec_vers>1</ref_spec_vers>
I am not sure why the LoadFromXml() call fails.
This is the first part from another file that will return true:
<title>RNC Product Catalog 17 Region</title>2015-01-1608:42:002015-01-1608:42:002015-01-16T13:42:00ZNOAA Rnc Product Catalog 17 Region Technical Specifications1.0550The net result is that because the inland rivers catalog file cannot be loaded the list of charts does not populate.
The OpenCPN data directory is hidden. It will sure cause problems to the users at least until we can add the chart dirs to the config for them. Change it to place the charts in their standard documents folder by default.
Any possibility of showing a destination folder and file column?
Maybe not full path to make it shorter...truncated at destination directory.
Enable users to troubleshoot.
but keep downloading charts and display a cumulative information at the end to prevent the process getting stalled because of a problem with one/several files.
It will be necessary to process the charts available and create the catalogs.
Use https://github.com/chartcatalogs/ to accomplish that.
RNC Region 02 - Monhegan Island to Cape Eliz
and others caused repeated crash and close of OpenCPN.
Got over it by uncheck the first problem chart and continue download.
Then it seemed to download at the end after checking it again.
Various charts when downloading force Opencpn to crashes or close, so OpenCPN has to be reopened.
If I uncheck the chart so it can go on. that helps.
When the user updates a catalog, selects the updated/new charts in the list so that they can be downloaded with a single click.
Until the Toolbox is resized, the panel does not fill the available space
I believe "Select Update" is clearer.
There is a small bug in the function:
void ChartDldrPanelImpl::UpdateChartList( wxCommandEvent& event )
This line:
FillFromFile(url.GetPath(), fn.GetPath());
Should be:
FillFromFile(url.GetPath(), fn.GetPath() ,pPlugIn->m_preselect_new, pPlugIn->m_preselect_updated);
As it is now it ignores the users preferences about autochecking new and updated charts.
Both of these features will be replaced by #9 and #10 in 2.0
after #22 the "download selected charts" button is now visible but the four buttons to th right "Add", "Delete", "Edit", "Update" are still hidden. see screenshot.
In the chart list the date displayed appears to be the field "date_valid". But I think it should be the date obtained from the field "zipfile_datetime_iso8601". It also appears that the file date comparison is done with "date_valid" and not "zipfile_datetime_iso8601". If the latter is true then we will miss small corrections such as notice to mariner updates.
For size and speed
When adding a catalog, offer the user a meaningful default path, like "OCPNDATADIR/Charts/XXX"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.