Thursday, July 26, 2012

Canada, eh?

I'm happy to announce that a topo layer for the canadian rockies is finally live.  The "nrcan" WMS source has always been available from the candian government, but I've wanted to create my own tiled source as well.  Why?

There are 3 sets of topo maps available from the canadian government:
  • Toporama is a WMS layer hosted by Natural Resources Canada, and appears as "nrcan" on  It's a vector based layer - all the trails, contours, water features, etc. are stored as lines in a database and then turned into an image using a renderer like Mapnik.
  • CanMatrix is scans of the original 1:50k Canadian topos.  These are what the current layer is based on.  Scan quality only supports going down to zoom 15.
  • CanTopo is a newer, high-resolution round of topo maps.  They appear to be computer-generated, probably from the same vector data that feeds Toporama, but coverage is currently quite sparse.  Image quality supports going to zoom 16; as coverage increases, I will expand the USGS 7.5' layer to include these.
Being a WMS layer, Toporama isn't as speedy as I'd like.  Although it's better than the USGS' vector data, side-by-side comparisons show that there are still a lot of missing trails and forest roads compared to the older paper maps.  Some of the data leaves you scratching your head for context, like short unlabeled trails that start and stop in the middle of nowhere.  And, being WMS, it's not compatible with some of the tiled-dataset tools I'm working on like Google Earth Export.  Not that you couldn't make it work, but it's more development effort.

CanTopo would be the ideal dataset to build a new map layer off, but it doesn't exist for most of the country yet.  The maps I've spot checked look dead on compared to the old paper ones.  I suspect the slow progress is due to the government checking/updating all the vector data before producing the map; perhaps when the full series is available the Toporama data will be equally comprehensive.

That leaves CanMatrix, which works fine but suffers from a couple imperfections.  Some of the maps are NAD27 and others are WGS84; historical NAD27 versions of the newer maps don't seem to be available.  This results in small coverage gaps at the border between maps with different datums.  Many of the older maps, particularly getting up north into the Yukon, are grayscale only.  And finally, the accuracy seems way off compared to the USGS 7.5' series.

I kept iterating on the rendering process because the maps didn't line up well with Google's terrain/satellite layers.  Beyond the datum, if you get the projection wrong it can cause parts of the map to be distorted while others are dead-on, and I thought this was my problem.  Eventually I realized that some of the maps just have massive survey errors (and by massive, I mean 150' - not really noticeable unless overlaying against a reference map).  This results in some noticeable misalignment where map quads meet.

For the US, the difference between the new "US Topo" vector maps and the older paper maps is night and day.  Because Canada's paper maps are worse and vector maps are better, the difference is much less pronounced.  Because of this I decided to only render out the rockies / western coast, where the road and trail information on the paper maps is still critical, and skip the flatter lands in the rest of the country.  If there's interest, though, I can look into expanding coverage.


  1. Might be an old post, but I thought I'd let you know that I'm using CalTopo up here in BC for hike planning and finding it fantastic! The maps for British Columbia are fantastic and the editing interface is one of the best I've seen. Here's an example map I'll use for a hike this weekend in Joffre Lakes Park:

    I liked it so much I've written an end-to-end guide for how to use CalTopo and Backcountry Navigator for paper and smartphone planning:

    Only one small feature request: metric or dual measurements everywhere (especially on the terrain profile)... to be honest, part of me really likes dual measurements because although I'm in Canada, I'm from the UK :)

    Once again, thanks for the great tool.

    1. Thanks and nice writeup.

      The elevation and distance measurements are all computed using metric anyway. I try to display both where possible, but sometimes it just leaves the UI too cluttered or takes up too much space - the elevation profile probably looks roomy to you, but the information I have barely fits on smaller monitors.

      Having a metric/imperial/both option in the UI is now on the official to-do list, but no guarantees on when I'll be able to wrap it up.