Pages

Tuesday, September 28, 2010

Using Custom WMS Maps in JMP 9

Man, this took a while to figure out. I almost had to bust out WireShark to get things working.


Graphs in JMP 9 can use the new Background Map feature. If you have an X co-ordinate and a Y co-ordinate on a graph (or your table has place names that reference co-ordinates in another table), you can use various map servers to provide a background map for your graph.

JMP 9 comes with two built in world maps, and the NASA maps seem to be working now. NASA maps are good enough for rough city level data. The built-in maps are not very detailed. For example, you can't zoom down to city level, at least in Canada.

So, I decided to use one of the Canadian federal government's free Web Map Service servers to get a detailed map of Vancouver.

I'll throw up a video soon, but for now, here are the basic steps to use a custom WMS map of Vancouver in JMP 9:
  1. Open a data table that has co-ordinate information in it (ie longitudes and latitudes).
  2. Open Graph Builder and drag your longitude column to the bottom of the graph, and your latitude column to the left of the graph.
  3. Right click your graph, and choose Graph - Background Map...
  4. Select Web Map Service, and set the URL to this:
http://wms.ess-ws.nrcan.gc.ca/wms/toporama_en

and set the Layer field to feature_names,hydrography,vegetation

[You can see the full version of the map here]

The above is Natural Resource Canada's WMS map server. It only works for Canadian co-ordinates. Other WMS servers are available. And now you have a nice detailed map of Vancouver.

JMP 9 would be better if it saved your custom WMS URLs, showed error responses from the WMS server, and showed a selectable list of all the available layers. There is now a JMP add-in called "WMS Explorer" that does this.

I'll post more soon about integrating Vancouver data with maps.

2 comments:

  1. Great post Neil. I'm glad you got it working. One note though - the URL that you've got is longer than necessary. You only need the first part:

    http://wms.ess-ws.nrcan.gc.ca/wms/toporama_en

    As you indicate, JMP will take care of the other parameters.

    Jeff

    ReplyDelete
  2. Yup, you're right. I've fixed the URL in my post. Thanks!

    ReplyDelete