Skip to Content
Mapping Hacks
book

Mapping Hacks

by Schuyler Erle, Rich Gibson, Jo Walsh
June 2005
Intermediate to advanced
568 pages
24h 7m
English
O'Reilly Media, Inc.
Content preview from Mapping Hacks
Plot Statistics Against Shapes #44
Chapter 4, Mapping (on) the Web
|
195
HACK
Hacking the Hack
What if you’re primarily interested in quakes in your immediate neighbor-
hood? In that case, you can specify a bounding box for your map in terms of
latitude and longitude in your config.xml file. Here’s an example that covers
the San Francisco Bay Area:
<north>38.20</north>
<south>37.30</south>
<west>-121.87</west>
<east>-123.00</east>
If a bounding box is specified, worldKit will only display items in the feed
within the bounding box. You only need to provide an image that corre-
sponds to your location. If you don’t have a map of your area handy, we can
offer a couple of suggestions on how to obtain one easily.
First, you might try MapProxy (http://brainoff.com/worldkit/mapproxy/), a
simple web interface to TerraServer, which can fetch U.S. topo maps or
aerial photos, given a ZIP Code and distance. MapProxy generates the corre-
sponding worldKit bounding box configuration for you, as well.
Failing that, you can take one of the world maps, and extract the area corre-
sponding to your bounding box with Photoshop or ImageMagick. To con-
vert the bounding box in latitude and longitude to x- and y-coordinates in
the image, use the following formulas from Table 4-1.
—Mikel Maron
HACK
#44
Plot Statistics Against Shapes Hack #44
Easily render demographic maps in SVG from shapes and CSV or Excel files.
In late 2003,
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

The Three Traps That Stymie Reinvention

The Three Traps That Stymie Reinvention

Ryan Raffaelli
Computing for Numerical Methods Using Visual C++

Computing for Numerical Methods Using Visual C++

Shaharuddin Salleh, Albert Y. Zomaya, Sakhinah A. Bakar

Publisher Resources

ISBN: 0596007035Purchase LinkErrata PageOther