Using OSM to Enhance NOAA Charts

beaufort-nc-osm-map

Posted 03/04/2016:

I have been using the free NOAA ocean charts that are available from the NOAA.  While these charts are wonderful, they lack in some respects if the detail one is interested in lies on the shore.  Naturally, they are water charts, so a complaint about land is not reasonable.  They’re doing what they ought to do.  Clicking on the graphic (above) will display it in higher resolution.  Once that is done, it can readily be seen that the inshore detail resolution of the OSM map is somewhat better than the NOAA charts, which may have only a smattering of inshore detail.   In this article, I am describing my use of OSM to compliment NOAA charts.

My computer system, for this particular setup, is a 3-GHz AMD64 running the NetBSD operating system.   On a NetBSD machine, it is necessary to install some form of JVM (Java Virtual Machine).   JOSM (the Java Open Streetmaps editor program) relies on Java to do its magic.   NetBSD has packages that can be installed to obtain various OpenJDK versions, or alternatively the Oracle JDK can be had by visiting Oracle.com.  If the OpenJDK version has been selected, then  run:

pkgin install openjdk7   # (JOSM uses this)

On NetBSD,  the JAVA_HOME environment variable must be set by exporting it via the command line or the dot-profile file:

export JAVA_HOME=/usr/pkg/java/openjdk7

The JOSM editor can be downloaded from:

https://josm.openstreetmap.de/josm-tested.jar

To run JOSM, use something like this command line:

java -Djosm.home=/home/me -jar ./josm-tested.jar

The very first thing to do, after launching JOSM, is to click the Preferences menu item, and then click “expert mode” in the lower left hand corner of the dialog.  This must be done in order to add several (in my opinion) necessary menu items, that would otherwise not be visible.   Yes, the non-novice mode does expose more items for the newbie to screw up – so a user who thinks he may screw up his interface shouldn’t enable the expert mode.  I don’t think there are many who would have trouble staying away from misconfigurations.  In any case – Just don’t DO that!

One of the menu items added by “expert mode” is Save session.   Without the Save-session menu item, one would have to reconstruct the map every time (silly).  Starting JOSM with the -Djosm.home option is nice, if one wants to use an alternative directory to store session, map, and tile caches.   The tile caches are important, because the sailor may not often have access to the internet while sailing offshore.   I like to put all the data in a subdirectory of /usr/pkgsrc – which lets me save everything in one big tarball, including maps, caches, sessions, and installation packages – for easy portability.

Once the Preferences dialog has been modified to suit tastes, JOSM will restart in order to save and then start up with all of the new settings enabled.   At this point, we click “Download OSM”  to download an open street map.   The option contacts an OSM server, and downloads the rectangular area that has been user-selected on the download page global map.  Once the map rectangle has been downloaded, open it by clicking the “Open” menu item.   A relatively sparse map will appear, but don’t worry – we’ll make it very fancy with only a little effort.

I usually end up with four layers in my map (An Open streetmap base map layer, a TIGER/US tiled roadmap layer, a USGS drawn-topo tiled layer, and a USGS satellite imagery tiled layer.   All these are obtained by clicking the appropriate items in the submenu that appears after clicking the Imagery  menu item.  I like to put the drawn tropo layer at the bottom of the pile (using the up/down arrows in “layers” dialog).  I like to drop the opacity of the drawn layer down to about ten percent (via use of transparency bar in the layers dialog).  Right above the drawn-topo layer, I put the satellite imagery layer, and set the opacity to about 40 percent for that.   Above the satellite layer, I have the Open Streetmap base layer, and above that (at the top) I have the road map layer.   I don’t touch the transparency level for the top two layers.  The result of this kind of layering is what you see in the artlice’s header graphic at the top of the page.

The tiles may not be drawn all at once.  It takes some panning an zooming to kick off the downloads that will put all the tiles into the cache directory.  For Beaufort, it took about fifteen minutes of panning and zooming (in and out) before the tiles were complete.  (actually, one can see a couple tiles are missing).  😦

I misspoke about  expanding the graphic by clicking it.  This particular WordPress theme doesn’t do it.  So – to see the graphic in full bloom, go to:

See full scale graphic …

Notice the sailboats in the harbor.  You can make out the outline of most of the docks as well.   Now, that’s my kind of map!  For an overall (full zoom: out) view, I can directly use USGS low-res satellite images (public domain).  An example is shown in the following graphic:

USGS-lowres-north-carolina-bottom

Figure 2: EOG on NetBSD, showing low-res (full zoom-out, courtesty of USGS). Note, EOG screenshot subject to GPL license, as described at bottom of this page.

OK, so now I have OSM maps in one app (JOSM) – and NOAA ocean charts in a couple other apps (including OpenCPN).  Wouldn’t it be great to overlay the OSM map data with the NOAA charts?  So that I don’t have to go back and forth?

To be continued …

Screenshot licenses:
The screenshot at the top of the article is of a program that has been released under a free software license (JOSM, located at http://www.openstreetmap.org and josm.openstreetmap.de). As a derivative work of that program, this screenshot falls under the same license (GPL2+) Full Text License Source:

http://josm.openstreetmap.de/browser/trunk/LICENSE

Any contributed OSM data shown is licensed under a different license than the program license(s), and that license is the OdbL: opendatacommons.org/licenses/odbl/

Additionally, the maps within the screenshot contain USGS imagery, courtesy of the U.S. Geological Survey, licensed as public domain. Also, the maps within the screenshot contain TIGER (Topologically Integrated Geographic Encoding and Referencing system) data, produced by the US Census Bureau, in a public domain data source.

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.