<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>Jason Antman's Blog &#187; maps</title> <atom:link href="http://blog.jasonantman.com/tags/maps/feed/" rel="self" type="application/rss+xml" /><link>http://blog.jasonantman.com</link> <description>A general-purpose dump of my thoughts, tips, tricks, and observations on a wide variety of topics - Linux, Free Software, the Internet, IT, EMS, software development, systems administration, and the state of the world.</description> <lastBuildDate>Thu, 01 Jul 2010 15:17:33 +0000</lastBuildDate> <generator>http://wordpress.org/</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Using Google Maps to produce usable, printable maps</title><link>http://blog.jasonantman.com/2009/12/using-google-maps-to-produce-usable-printable-maps/</link> <comments>http://blog.jasonantman.com/2009/12/using-google-maps-to-produce-usable-printable-maps/#comments</comments> <pubDate>Tue, 01 Dec 2009 19:11:44 +0000</pubDate> <dc:creator>Jason Antman</dc:creator> <category><![CDATA[Tech HowTos]]></category> <category><![CDATA[catrography]]></category> <category><![CDATA[emergency]]></category> <category><![CDATA[EMS]]></category> <category><![CDATA[google]]></category> <category><![CDATA[maps]]></category> <category><![CDATA[PHP]]></category><guid isPermaLink="false">http://blog.jasonantman.com/?p=516</guid> <description><![CDATA[How to create a really big, printable map from Google Maps, complete with overlays.<div class="ezAdsense adsense adsense-leadout" style="text-align:center;margin:12px;"><script type="text/javascript">google_ad_client="pub-6049167767809021";google_ad_slot="8888378867";google_ad_width=336;google_ad_height=280;</script> <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>]]></description> <content:encoded><![CDATA[<p>This is a follow-up to my <a href="/2009/11/making-maps-from-gis-data-with-inkscape/">Making maps from GIS data with Inkscape</a> post. After playing around with Inkscape for quite a while, and coming up with the dismal results seen in that post, I decided there has to be an easier way. A little Googling turned up <a href="http://www.wipeout44.com/video/misc/google_maps_large.asp" onclick="pageTracker._trackPageview('/outgoing/www.wipeout44.com/video/misc/google_maps_large.asp?referer=');">this video tutorial</a> on how to print large scale maps from Google Maps. It turns out that the Google Maps API will honor almost any pixel resolution that it&#8217;s passed. The <a href="https://addons.mozilla.org/en-US/firefox/addon/1146" onclick="pageTracker._trackPageview('/outgoing/addons.mozilla.org/en-US/firefox/addon/1146?referer=');">Screengrab</a> add-on for Firefox has the wonderful capability of being able to capture a screengrab of page content, at actual resolution, regardless of screen resolution. So load up a 5000&#215;5000 pixel Google Map, use the Screengrab addon, and end up with a full 5000&#215;5000 pixel image file.</p><p>After testing this a bit, I decided to go the Google Maps route. This also has a lot of other added bonuses &#8211; I can store my overlay data in simple XML files, add and remove layers on-the-fly, and also make it available online (and, theoretically, to any Google Maps-equipped device used by responders). This even opens up the possibility of using paper maps as a last resort, and providing the Fire Department with live hydrant maps on GPS-enabled handheld devices and phones.</p><p>The quirks, however, may need some serious photoshopping (err, rather, <a href="http://www.gimp.org/" onclick="pageTracker._trackPageview('/outgoing/www.gimp.org/?referer=');">gimp</a>ing) to fix:</p><ol><li>With all of the background color, how will this look when printed?</li><li>How do I make the town borders easily defined? It would be a <em>lot</em> of raster editing to remove the background color of areas outside of town.</li><li>How do I overlay a grid for a street name index?</li></ol><p>The first step was to setup a large Google Map to develop with. I used PHP and Monte Ohrt&#8217;s <a href="http://www.phpinsider.com/php/code/GoogleMapAPI/" onclick="pageTracker._trackPageview('/outgoing/www.phpinsider.com/php/code/GoogleMapAPI/?referer=');">GoogleMapAPI</a> PHP wrapper class. It was simple enough to setup a big (3300&#215;5100px) map, zoom out in Firefox, and start adding some stuff. My examples and development pages, if you want to take a peek at the code, are <a href="http://www.jasonantman.com/indexed/googleMaps/" onclick="pageTracker._trackPageview('/outgoing/www.jasonantman.com/indexed/googleMaps/?referer=');">here</a>.</p><p>The first step was to draw a polygon for the outline of the town. I found some very detailed information on how to get zip code boundary lines on Matt Cutts&#8217; <a href="http://www.mattcutts.com/blog/fun-with-zip-codes/" onclick="pageTracker._trackPageview('/outgoing/www.mattcutts.com/blog/fun-with-zip-codes/?referer=');">blog</a>. Apparently, he&#8217;s a Google software engineer, heading up their webspam team. I grabbed the files from the Census, as described, and came up with the boundary for my zip code looking like:</p><div class="wp_syntax"><div class="code"><pre class="none" style="font-family:monospace;">        60      -0.741427638843858E+02       0.409963180802469E+02
      -0.741375870000000E+02       0.410075970000000E+02
      -0.741308870000000E+02       0.410061970000000E+02
      -0.741308870000000E+02       0.410061970000000E+02
      -0.741307260000000E+02       0.410032600000000E+02
      -0.741326870000000E+02       0.409955970000000E+02
      -0.741278870000000E+02       0.409943970000000E+02
      -0.741280870000000E+02       0.409938970000000E+02
      -0.741327870000000E+02       0.409853970000000E+02
      -0.741352870000000E+02       0.409830970000000E+02
      -0.741369600000000E+02       0.409818620000000E+02
      -0.741410520000000E+02       0.409821940000000E+02
      -0.741412870000000E+02       0.409826970000000E+02
      -0.741412870000000E+02       0.409826970000000E+02
      -0.741417870000000E+02       0.409847970000000E+02
      -0.741427870000000E+02       0.409863970000000E+02
      -0.741482870000000E+02       0.409868970000000E+02
      -0.741536880000000E+02       0.409899970000000E+02
      -0.741510880000000E+02       0.409929970000000E+02
      -0.741531880000000E+02       0.409965970000000E+02
      -0.741571880000000E+02       0.409988970000000E+02
      -0.741557880000000E+02       0.410013970000000E+02
      -0.741461870000000E+02       0.410018970000000E+02
      -0.741400870000000E+02       0.410065970000000E+02
&nbsp;
      -0.741375870000000E+02       0.410075970000000E+02
END</pre></div></div><p>As per Matt&#8217;s instructions, I stripped off the first and last lines, converted everything to normal decimal notation, and built it into a PHP array:</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$MP_boundary</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.137587</span><span style="color: #339933;">,</span> <span style="color:#800080;">41.007597</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.130887</span><span style="color: #339933;">,</span> <span style="color:#800080;">41.006197</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.130887</span><span style="color: #339933;">,</span> <span style="color:#800080;">41.006197</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.130726</span><span style="color: #339933;">,</span> <span style="color:#800080;">41.003260</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.132687</span><span style="color: #339933;">,</span> <span style="color:#800080;">40.995597</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.127887</span><span style="color: #339933;">,</span> <span style="color:#800080;">40.994397</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.128087</span><span style="color: #339933;">,</span> <span style="color:#800080;">40.993897</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.132787</span><span style="color: #339933;">,</span> <span style="color:#800080;">40.985397</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.135287</span><span style="color: #339933;">,</span> <span style="color:#800080;">40.983097</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.136960</span><span style="color: #339933;">,</span> <span style="color:#800080;">40.981862</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.141052</span><span style="color: #339933;">,</span> <span style="color:#800080;">40.982194</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.141287</span><span style="color: #339933;">,</span> <span style="color:#800080;">40.982697</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.141287</span><span style="color: #339933;">,</span> <span style="color:#800080;">40.982697</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.141787</span><span style="color: #339933;">,</span> <span style="color:#800080;">40.984797</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.142787</span><span style="color: #339933;">,</span> <span style="color:#800080;">40.986397</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.148287</span><span style="color: #339933;">,</span> <span style="color:#800080;">40.986897</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.153688</span><span style="color: #339933;">,</span> <span style="color:#800080;">40.989997</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.151088</span><span style="color: #339933;">,</span> <span style="color:#800080;">40.992997</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.153188</span><span style="color: #339933;">,</span> <span style="color:#800080;">40.996597</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.157188</span><span style="color: #339933;">,</span> <span style="color:#800080;">40.998897</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.155788</span><span style="color: #339933;">,</span> <span style="color:#800080;">41.001397</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.146187</span><span style="color: #339933;">,</span> <span style="color:#800080;">41.001897</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.140087</span><span style="color: #339933;">,</span> <span style="color:#800080;">41.006597</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$MP_boundary</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color:#800080;">74.137587</span><span style="color: #339933;">,</span> <span style="color:#800080;">41.007597</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>Though this data doesn&#8217;t seem exactly 100% accurate (at least by my knowledge of the town, and every map I can find) it&#8217;s quite close and a very good start.</p><p>I&#8217;ll update later this week when I have some more done&#8230;</p><div class="ezAdsense adsense adsense-leadout" style="text-align:center;margin:12px;"><script type="text/javascript">google_ad_client="pub-6049167767809021";google_ad_slot="8888378867";google_ad_width=336;google_ad_height=280;</script> <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>]]></content:encoded> <wfw:commentRss>http://blog.jasonantman.com/2009/12/using-google-maps-to-produce-usable-printable-maps/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 3/11 queries in 0.024 seconds using disk

Served from: mpac.midlandparkambulance.com @ 2010-07-30 10:04:43 -->