Wednesday, March 25, 2015

Weather Stations

CalTopo now has a source for NOAA weather stations - some are in standard airport and urban locations, but a number of others are in quasi-backcountry locations useful for trip planning.  Note that the data is screen-scraped off of a web page rather than coming through a documented web service, so it may be less reliable than the SNOTel and water gauge layers.

available as a data overlay checkbox

Similar to the other data layers, at broad zoom levels only station locations are displayed, not station data.  Zooming in, stations with winds greater than 10mph are rendered with arrows showing the wind direction, while stations with light wind or no wind data are shown as black circles.  Mousing over a station brings up a tooltip with the last observation time:

As with SNOTel and stream gauges, clicking on a station brings up additional details and a link to the station's official observation pages.  The official pages contain additional information I'm not sourcing, like solar radiation, fuel moisture and cloud ceiling.

The details dialog also has links to government-sourced diagrams showing typical monthly daytime and nighttime wind patterns.

Between weather stations, SNOTel and stream gauges, CalTopo now provides hourly data from over 12,000 remote sensors nationwide!  As usual, please report any issues.

Friday, March 6, 2015

Killer Visuals Through Enhanced Relief

One of CalTopo's core features has always been the ability to blend multiple map layers together.  Until now, that's been done by creating a layer stack and varying the opacity of each layer to suit.  This works, but shaded relief has always been a weak point.  In order to keep the relief layer from washing out the rest of the map, I had to crank up the exaggeration.  This meant you could use less relief and get less washout, but it reduced the layer's ability to capture small details.

Even so, it's never played well with aerial imagery.  Consider the image of Mt Shasta below; you can make out terrain features from the relief layer, but the imagery itself is starting to get washed out.

Professional mapmakers solve this problem by using more advanced techniques than opacity based layer stacking.  One of those is to do a multiply blend, where each pixel on the map is multiplied by the intensity of the hillshade, on a 0-1 scale.  This darkens the image a bit, but does a much better job of preserving it.  The photo below is the same image of Shasta with multiply blend relief shading . . .

There's no way to a multiply blend in Google Maps, so I have to fetch all the tiles on my server, combine them into a single image, and then pass them back to the browser.  This means that when using the enhanced relief layer, the map won't react to react to opacity adjustments in real time - it has to fetch a new batch of images instead of just changing a CSS parameter.  It also means that images not available to my server - like Google's - will default to the standard relief shading.

While the effect is more subtle with maps than with images, but I still think it's an improvement.  Below are maps of Mt Shasta with both standard and enhanced shading:

This is still experimental, so I may make some changes going forward, including switching to an approach that lightens some parts of the image and darkens others.  While enhanced relief works with printing, it reverts to standard shading for KMZ exports.  Still, I'd rather get it out there and get feedback than tinker away privately until it's perfect.