CARVIEW |
![]()
Sun 2025-10-12
Sat 2025-10-11
Wed 2025-10-01
Mon 2025-09-29
Sun 2025-09-28
Sat 2025-09-27
Fri 2025-09-26
Thu 2025-09-25
Bundler belongs to the Ruby community Tue 2025-09-23
Mon 2025-09-22
Sun 2025-09-21
Sat 2025-09-20
Fri 2025-09-19
Search
Archives
2024
12 11 10 09 08 07 06 05 04 03 02 01
2023
2022
2021
2020
2019
2018
2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003 One good site
MDN
Nelson Minar
Blog licensed under a Creative Commons License
|
There's an amazing amount of free mapping code and data out there but
it's difficult to figure out how it all fits together. Yesterday I did a
one day spike of
a map for pilots, a picture that emphasizes
mountains higher than 8000'. What I love about this hack
is how much technology was involved. Web servers, Javascript, PNG
compositing. Geographic projections and image rendering. Data from
three different sources, including the freaking Space
Shuttle. And I was able to cobble it all together in less than a day
without any real expertise in mapping. Hooray for Open Source Geo!
![]() My product is a slippy map, a zoomable javascript map like Google Maps. The map has three data layers on it: raster aviation sectionals for the base map, a raster elevation overlay, and a vector state outline. I put it all together in Javascript using Polymaps, an amazing mapping library. All told it was 50 lines of Javascript, about an hour's work. Polymaps' job is loading map tiles, what about the tiles themselves? I lifted the aviation sectionals from RunwayFinder and the state outlines from a PolyMaps demo. I had to build my own map layer for elevation. SRTM is an amazing free elevation dataset (7GB for North America, an hour's download). But it's just raw data and I need images. SRTM is a simple enough format but I didn't want to write a bunch of rendering software. Fortunately there's MapServer, a dynamic web server for map tiles. MapServer wraps a CGI interface around GDAL, which does the heavy lifting of projection, scaling, and rendering (via libgd). The great thing about this software is it all just works and has great docs. I barely understand what it's doing, but I got it working with an hour or two of tinkering. I didn't link my live map because my server would die; the dynamic rendering from Mapserver is too much for it. It'd be pretty simple to prerender all the SRTM tiles to about 100 gigs of image files for fast serving. That'd be a useful resource to host online for other mappers to use in their own products. But what I really want to do is move that 8000' threshold I hardcoded into the user's hands, to let you dial up and down and quickly see terrain levels. To do that requires some client side image manipulation, so that's my next hack.
Nelson's Weblog
• tech
→ ago, bad, bittorrent, blosxom, dotnet, good, hqnx, iphone, mac, phone, photo, python, webservices |