New Zealand/Imagery
Using LINZ Data Service as a WMS backdrop in JOSM
The LINZ data service provides WMS and WFS data sources. With the WMS data you have display on-the-fly raster backdrops for JOSM or Merkaartor, and with the WFS data you can download data layers with GIS software like QGIS.
Below is instructions on how to use the WMS data as a backdrop in JOSM. Both the cartographic 1:50,000 and 1:250,000 topo maps are available, as are some orthophotos (aerial photographs) and shaded relief elevation maps.
- Note: you don't want to trace this. See the LINZ wiki page for information on the sanctioned upload of the raw data that made these maps.
1. Go to the LINZ Data Service website and click Register in the top-right of the web page and make yourself an account. It's free, and they're quite generous in their usage terms.
2. Once you're registered and logged in, click on the Dashboard button at the top of the webpage, then the "API and Web Services tab" at the top, and create yourself an OGC Web Services key. This will be an alpha-numeric string of 32 characters. You'll insert that into a URL. Follow the instructions here:
3. Your WMS and WFS URLs will look like:
http://wms.data.linz.govt.nz/<YOUR-WEB-SERVICE-KEY>/r/wms http://wfs.data.linz.govt.nz/<YOUR-WEB-SERVICE-KEY>/wfs
but with your key pasted in where it says <YOUR-WEB-SERVICE-KEY>.
4. Start up JOSM and go to Edit → Preferences (F12).
5. Select the WMS/TMS settings tab on the bottom left.
6. A bunch of global WMS and TMS servers are already listed. Ignore them and focus on the Selected entries box at the bottom of the window. Click on the "+" button at the right-hand side of it to add a new WMS entry.
7. Replace the placeholder service URL (if present) with the WMS string from above with an "?" after it:
http://wms.data.linz.govt.nz/<YOUR-WEB-SERVICE-KEY>/r/wms?
8. Next click on the [Get Layers] button to see the list of available online data layers. When you see "LINZ Data Service" click on the little triangle to the left of that to expand the list (if needed). You might want to drag the window a bit bigger at this point. (Alt+right-click-drag in Linux)
9. Look down the list, and highlight "NZ Mainland Topo50 Maps". This is a mosaic of the standard 1:50k topo maps. (or pick any other WMS layer if you prefer)
- Clicking on the [Show bounds] button will show the bounding box of the WMS layer you've selected on a world map.
10. For image format select 'image/png8' for topo maps and nautical charts, or 'image/jpeg' for aerial (ortho) photo imagery.
11. Change the menu name to like "LINZ Mainland Topo50", as to your liking.
12. Click [ok] and it will be added to the list of Selected entries in the bottom pane.
13. Click [ok] again to close the Preferences window, and your new WMS layer will be available from the main Imagery menu. The menu item will be greyed out until you are within the range of the data. Zoom to NZ (maybe use the Mapnik TMS layer to start with, then un-tick its eyeball in the top right layer list) and select your new WMS source from the Imagery window. You should see it come up on the screen.
14. If you zoom in you'll notice the quality is quite granular. If you zoom out you'll notice that it is trying to download a huge amount of data. To reset the image quality to something suitable, right-click on the layer name in the top-right layer-list box and select "Change resolution" from the menu. In recent versions of JOSM this will happen automagically.
15. The topo50 map can be a bit cluttering, so to make it more of a background image click on the "Adjust Opacity" button in the middle of the layer-list box bottom-buttons (looks like a black to white tall skinny rectangle), and turn the level down to about 50%.
16. Use the layer to provide some context for what you're looking at if there isn't much on the Mapnik TMS layer for that area.
Happy mapping!
Browsing the available layers with QGIS
While not specific to OSM (but do try the OSM plugin!), if you install Quantum GIS (QGIS) version 1.8.0 or newer, you can browse and work with these online data layers in a nice way.
WMS
- Launch the qbrowser program.
- Click on "Manage WMS" at the top.
- Make a [New] entry, name it like "LINZ Data Service WMS", and paste the WMS URL from above in the URL box:
- http://wms.data.linz.govt.nz/<YOUR-WEB-SERVICE-KEY>/r/wms
- No authentication beyond your key is needed, so just click [Ok] to add it.
- Next click on the [Connect] button in the top left, and with luck the list of layers will show up. Drag the title column header a bit wider so you can read what it says.
- At the bottom of the window you'll see it says "WGS 84 [Change ...]" for the map projection type. (WGS84 here means a Lat/Lon geographic representation using the WGS84 datum). Click on the [Change] button to switch to the NZTM 2000 projection.
- For topo maps and nautical charts the PNG8 format seems to be a good compromise between quality and speed. For the aerial orthophotos select JPEG format.
- Next click [Add] and [Close] to finish.
- Back in the main Browse window, click on WMS "+" on the left side panel, then your "LINZ Data Service WMS" entry to expand the layer list again.
- Pick one (e.g. "Kermadec Is Raster Image (Topo25)") and you'll see some meta-data on the right side. Click on the Preview tab and wait 15 seconds or so for the layer to load. You can then use the mouse wheel to zoom and middle-click-drag to pan around the map.
When you start the full QGIS application, Your WMS server entry will be remembered if you go to "Layers → Add WMS layer...". Connect, select, change the projection, and Add the layer as above, and you should see it before you.
WFS
- Adding WFS layers is the same but different. This will actually download the selected vector layer with all of its attributes. Setup is much the same as for adding the WMS server connection, but use the provided WFS url not the WMS one. There are a large number of layers, and the main app's list struggles to list them cleanly. hint: the nautical chart layers are listed alphabetically, the topo map layers start with NZ <region>.
- At this point it's much easier to use the qbrowser application that comes with QGIS to preview the WFS layers than the main application itself.
- Be careful about loading huge layers!
CSW
CS-W (Catalogue Services for the web) is an online metadata delivery standard. You can use it to view additional information about the above WMS and WFS layers.
- In newer versions of QGIS go to Plugins → Fetch python plugins in the menus and type csw in the filter box. If nothing appears go to the Options tab and select the Show all plugins (even experimental) radio button, then go back to the Plugins tab. Once you can highlight the CSW Client plugin, install it, then click on [Close]. If a new "Web" menu does not appear on the menu bar, go in to Plugins → Manage plugins and make sure that the CSW Client is turned on.
- Open the client from the Web menu, then click [New]. Type LINZ data service for the name and http://data.linz.govt.nz/feeds/csw for the URL (no API key is required), then [Ok]. With that added you can click on the [Server info] button to see some details about the LINZ data service and test view some raw XML with the [GetCapabilities response] button. But it is more interesting to go to the Search tab and view some information about a layer. Click the [Set global] button to not limit by spatial extent, then in the Find box type Cave or some other mapping entity you are interested in, then click the [Search] button.
- From the list of layers which come back (you may want to pull the window and column header a bit wider to make it easier to read) select an entry which interests you, then click the [Metadata] button at the bottom to read more about it.