Map Source Editor - wb8tyw/D-Rats GitHub Wiki

The map source editor needed a number of changes just to get the editor to launch. Once those were done, the problem is that the usgs.gov has changed how to request their data for download. I am still experimenting with that.

River data

The biggest issue was that my d-rats.config had a partially configured rivers section where it had a rivers data item with no sites. For python3, that resulted in the Map Source code trying to open a site named "", which generated an error.

It took me a while to find that, and in the mean time, there appear to be changes in the USGS data and queries.

The hard part was in finding a good site code to use as test data. I finally found that by using a query on the https://waterdata.usgs.gov site.

Then I found that the data format had changed slightly, and that the results of the dialog were initially not being retrieved.

The results of the map-source editor for USGS and probably the buoy sites are not being saved by the unit test program, and are only saved by d-rats once the program exits normally. We may want to change that in the future.

The GUI interface also needs work. Buttons should be marked "Save" or "Cancel", and the operation of the add button is non-intuitive that you need to set the map source type first. And we have a lot of active menus where many functions do not work.

As finding site codes is such a pain, that should also be enhanced.

It appears that we will have to use the latitudes and longitudes of two corners of the map to specify what site codes that you want.

NDBC Buoys

The buoy information is an RSS feed. Look up the buoy of interest at https://www.ndbc.noaa.gov/. Then click on the buoy on the map and look click on the show details. On the title of the buoy, if the buoy is an active buoy, will have a RSS symbol. You need to look up that link, example: https://www.ndbc.noaa.gov/data/latest_obs/cmti2.rss The name in the last section with is what you need to add to the list of bouys.

A number of changes for using lxml were needed.

Issues

  • It appears that you need to open the edit sources dialog a second time to cause a new change to take effect.
  • The changes are not saved until you normally exit d-rats. If d-rats crashes, or you exit it with Control-C, etc, the changes are lost.
  • Dialogs are not consistent with the prompts and grouping of commands. Non-functional options appear to be enabled.