<?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>BritishIdeas &#187; Mapping</title>
	<atom:link href="http://www.britishideas.com/category/mapping/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.britishideas.com</link>
	<description>Interesting Tech Projects</description>
	<lastBuildDate>Mon, 06 Sep 2010 05:34:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Optimizing DeepEarth For GIS Mapping</title>
		<link>http://www.britishideas.com/2010/09/05/optimizing-deepearth-for-gis-mapping/</link>
		<comments>http://www.britishideas.com/2010/09/05/optimizing-deepearth-for-gis-mapping/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 05:02:07 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Mapping]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[OpenStreetMap]]></category>
		<category><![CDATA[silverlight]]></category>

		<guid isPermaLink="false">http://www.britishideas.com/?p=281</guid>
		<description><![CDATA[DeepEarth is an interesting Silverlight project. It allows interactive tile-based maps to run in a browser with overlays of custom data, however it suffers from some performance problems.
Large GPS Track Logs
I had the need to display GPS tracks in DeepEarth. GPS tracks can contain thousands of points. DeepEarth has three update modes called ElementUpdate, PanOnlyUpdate]]></description>
			<content:encoded><![CDATA[<p><a href="http://deepearth.codeplex.com/" target="_blank">DeepEarth</a> is an interesting <a href="http://www.silverlight.net/" target="_blank">Silverlight</a> project. It allows interactive tile-based maps to run in a browser with overlays of custom data, however it suffers from some performance problems.</p>
<p><strong>Large GPS Track Logs</strong></p>
<p>I had the need to display GPS tracks in DeepEarth. GPS tracks can contain thousands of points. DeepEarth has three update modes called ElementUpdate, PanOnlyUpdate and TransformUpdate for showing features such as tracks:</p>
<ul>
<li>ElementUpdate recalculates the point positions on every map movement. This produces an accurate track display but gets slower as the number of points increases.</li>
<li>PanOnlyUpdate recalculates point positions during panning and hides features while zooming. Not too useful for me and didn&#8217;t seem to show anything anyway.</li>
<li>TransformUpdate draws the tracks to the map once then scales and pans the vector graphic in synchronization with the map. This makes it very fast. Sadly the scaling code is flawed. Lines disappear as you zoom in and sections of the tracks become distorted, almost looking like calligraphy.</li>
</ul>
<p>I wasted many evenings trying to get the scaling in TransformUpdate mode working before giving up. I then turned my attention back to the ElementUpdate mode to see where the bottleneck is.<span id="more-281"></span></p>
<p><strong>The LogicalToPixel Function</strong></p>
<p>LineStringControl objects represent the GPS tracks and they draw as lines using multiple points. When points are added to a LineStringControl they are transformed from longitude and latitude into logical coordinates. This is an intermediate coordinate system that can easily be converted into pixel coordinates later.</p>
<p>When the map is panned or zoomed the CoordTransform.LogicalToPixel function is called for every point in line. This function uses some simple mathematics to work out where the point should be on the map in terms of pixels. This is the bottleneck.</p>
<p>A single zoom or pan operation can result in this function being called several times. If a GPS track has 7,000 points that is a lot of calls. My testing showed that even the very first mathematical operation caused considerable slow down. Overall this function had several problems:</p>
<ul>
<li>Using 64-bit division</li>
<li>Creating three Point objects and then discarding two for each call</li>
<li>Using Math.Log and Math.Pow functions</li>
</ul>
<p><strong>Optimizing LogicalToPixel</strong></p>
<p>The first step was to separate out the mathematical operations into two groups:</p>
<ul>
<li>Those that can be executed once per movement of the map</li>
<li>Those that have to be executed once per point</li>
</ul>
<p>I split the function into two new functions, LogicalToPixelPrepare and LogicalToPixelPerform to allow the two groups to be called separately.</p>
<p>Next instead of creating two temporary Point objects and then throwing them away, two global (to the class) Point objects are created and continually reused. This eliminates any overhead of object creation.</p>
<p>Finally I saw that I could eliminate both Math.Log and Math.Pow, as they were not necessary.</p>
<p>The last step was to modify the GeometryLayer.UpdatePathData function to call LogicalToPixelPrepare once and then LogicalToPixelPerform for every point. This reduces the transformation code needed for every point down to four multiplications and two additions.</p>
<p><strong>Conclusion &amp; Download<br />
</strong></p>
<p>By finding the bottleneck and looking at way to optimize it, I was able to gain a significant speed increase for my 7,000 point test GPS track. I think the performance is close to that which could be obtained from the TransformUpdate mode, but without the scaling flaws found in that mode.</p>
<p><a href="http://www.britishideas.com/wp-content/uploads/2010/09/ElementUpdateOptimization.zip" target="_self">Download a patch</a> that can be applied to the <a href="http://deepearth.codeplex.com/SourceControl/list/changesets" target="_blank">Silverlight 4 branch</a> of DeepEarth (currently at revision 49789).</p>
<p><span class="youtube">
<object width="560" height="340">
<param name="movie" value="http://www.youtube.com/v/22MOWEAzmoY&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;showsearch=0&amp;hd=1" />
<param name="allowFullScreen" value="true" />
<embed wmode="transparent" src="http://www.youtube.com/v/22MOWEAzmoY&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;showsearch=0&amp;hd=1" type="application/x-shockwave-flash" allowfullscreen="true" width="560" height="340"></embed>
<param name="wmode" value="transparent" />
</object>
</span><p><a href="http://www.youtube.com/watch?v=22MOWEAzmoY&fmt=18">www.youtube.com/watch?v=22MOWEAzmoY</a></p></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d281').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d281" style="overflow:hidden">
<br />
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d281').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d281').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.britishideas.com/2010/09/05/optimizing-deepearth-for-gis-mapping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiling OpenScales 1.1 with FlashDevelop 3</title>
		<link>http://www.britishideas.com/2010/02/07/compiling-openscales-1-1-with-flashdevelop-3/</link>
		<comments>http://www.britishideas.com/2010/02/07/compiling-openscales-1-1-with-flashdevelop-3/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 05:00:47 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Mapping]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[Mapnik]]></category>

		<guid isPermaLink="false">http://www.britishideas.com/?p=165</guid>
		<description><![CDATA[This article describes how to compile the OpenScales mapping library for Flash in FlashDevelop 3. OpenScales is an open source LGPL library for displaying interactive maps using Flex and Actionscript. It has many of the features of OpenLayers. FlashDevelop 3 is a free Flash development environment and can be used with the Flex SDK from]]></description>
			<content:encoded><![CDATA[<p>This article describes how to compile the <a href="http://www.openscales.org" target="_blank">OpenScales</a> mapping library for Flash in <a href="http://www.flashdevelop.org" target="_blank">FlashDevelop</a> 3. OpenScales is an open source LGPL library for displaying interactive maps using Flex and Actionscript. It has many of the features of <a href="http://www.openlayers.org" target="_blank">OpenLayers</a>. FlashDevelop 3 is a free Flash development environment and can be used with the Flex SDK from Adobe.</p>
<p>This article assumes you already have the Flex 3 SDK and FlashDevelop 3 installed and working. See my <a href="http://www.britishideas.com/2008/02/27/first-steps-with-flash-using-the-flex-3-sdk/" target="_blank">post from two years ago</a> for help.<span id="more-165"></span></p>
<p><strong>Compilation Options</strong></p>
<p>There are two ways OpenScales can be compiled. Firstly the source code can be included with your application code. This approach is good for debugging OpenScales and learning how it works. My understanding of the OpenScales <a href="http://openscales.org/userguide/license.html" target="_blank">LGPL license</a> is that this will make your application also licensed as LGPL (or a compatible license). However I&#8217;m not a lawyer so if that aspect is important to you then you will need to take a closer look.</p>
<p>The second way to compile OpenScales is as a library (SWC file). This library can then be linked with your application to produce the final Flash file.</p>
<p><strong>Compiling OpenScales Into a Library</strong></p>
<p>1. Download and install the <a href="http://sourceforge.net/projects/exportswc" target="_blank">ExportSWC plugin</a> for Flash Develop.</p>
<p>2. Create a new Flex 3 project with no package name.</p>
<p>3. Check out OpenScales using Subversion into the folder above the project folder. Note that if you use a different location the paths in the rest of this tutorial will need to be adjusted accordingly. I recommend <a href="http://tortoisesvn.tigris.org/" target="_blank">TortoiseSVN</a> if using Windows.</p>
<p>4. Go to Project -&gt; Properties -&gt; Compiler Options. Click on the Additional Compiler Options field and then the small &#8220;&#8230;&#8221; button.</p>
<p>5. Enter:</p>
<pre class="brush: plain;">
-namespace http://openscales.org ..\OpenScales-1.1\src\openscales-fx\src\main\flex\META-INF\manifest.xml
</pre>
<p>Note the hyphen at the start of the line.</p>
<p>6. Click on the Classpaths tab and add the following Classpaths:</p>
<p><code>..\OpenScales-1.1\src\openscales-core\src\main\flex<br />
..\OpenScales-1.1\src\openscales-fx\src\main\flex<br />
..\OpenScales-1.1\src\openscales-proj4as\src\main\flex<br />
C:\Program Files\FlexSDK\frameworks\libs<br />
C:\Program Files\FlexSDK\frameworks\locale\en_US</code></p>
<p>then close the dialog window. Note if you copied the Flex 3 SDK to a different location then choose the correct location when adding the libs and locale classpaths.</p>
<p>7. Download <a href="http://gskinner.com/libraries/gtween" target="_blank">GTween</a>, extract the zip file and copy GTween_xx_xx.swc into the lib folder for the project.</p>
<p>8. In the Project tree view right click on the GTween SWC file and choose &#8220;Add To Library&#8221;. The name will turn blue.</p>
<p>9. In the Project tree expand &#8220;libs&#8221; and &#8220;locale&#8221;, right-click on each SWC file in turn and choose &#8220;Add To Library&#8221;. The names will turn blue.</p>
<p>10. Click on the Build SWC toolbar button to generate the SWC file.</p>
<p>You may get two warnings for the OverviewMap.mxml file, which causes the build to fail. I think this is a bug in FlashDevelop because warnings shouldn&#8217;t cause the build to fail, only errors should. However the warnings can be disabled in the compiler options. I don&#8217;t know for sure if the Overview Map control is usable because of this.</p>
<p>The generated SWC file will be in the bin subfolder. In FlashDevelop create a new Flex 3 project and copy the OpenScales SWC file into the lib folder, then add it to the library by right-clicking on the name in the Project tree and choosing &#8220;Add To Library&#8221;. OpenScales can now be used.</p>
<p><strong>Compiling Application Code With OpenScales Code</strong></p>
<p>1. Create a new Flex 3 project with a suitable package name.</p>
<p>2. Check out OpenScales using Subversion into the folder above the project folder. Note that if you use a different location the paths in the rest of this tutorial will need to be adjusted accordingly. I recommend <a href="http://tortoisesvn.tigris.org/" target="_blank">TortoiseSVN</a> if using Windows.</p>
<p>3. Go to Project -&gt; Properties -&gt; Compiler Options. Click on the Additional Compiler Options field and then the small &#8220;&#8230;&#8221; button.</p>
<p>4. Enter:</p>
<pre class="brush: plain;">
-namespace http://openscales.org ..\OpenScales-1.1\src\openscales-fx\src\main\flex\META-INF\manifest.xml
</pre>
<p>Note the hyphen at the start of the line.</p>
<p>5. Click on the Classpaths tab and add the following Classpaths:</p>
<p><code>..\OpenScales-1.1\src\openscales-core\src\main\flex<br />
..\OpenScales-1.1\src\openscales-fx\src\main\flex<br />
..\OpenScales-1.1\src\openscales-proj4as\src\main\flex<br />
</code></p>
<p>then close the dialog window.</p>
<p>6. Download <a href="http://gskinner.com/libraries/gtween" target="_blank">GTween</a>, extract the zip file and copy GTween_xx_xx.swc into the lib folder for the project.</p>
<p>7. In the Project tree view right click on the GTween SWC file and choose &#8220;Add To Library&#8221;. The name will turn blue.</p>
<p>Now you can add OpenScales controls to Main.mxml and build a Flex/ActionScript 3 project.</p>
<p>It is possible to add the GTween source code to the project instead of the SWC if needed.</p>
<p>You may get two warnings for the OverviewMap.mxml file, which causes the build to fail. I think this is a bug in FlashDevelop because warnings shouldn&#8217;t cause the build to fail, only errors should. However the warnings can be disabled in the compiler options. I don&#8217;t know for sure if the Overview Map control is usable because of this.</p>
<p>For completeness my MXML and ActionScript test code follows. Note that I avoided using MXML to create any controls, instead preferring to use ActionScript. This is just a personal preference.</p>
<p>Example Main.mxml file:</p>
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
xmlns:os=&quot;http://openscales.org&quot; layout=&quot;horizontal&quot; horizontalAlign=&quot;left&quot;
backgroundColor=&quot;#FFFFFF&quot; backgroundGradientColors=&quot;[#FFFFFF, #FFFFFF]&quot;
paddingTop=&quot;0&quot; paddingLeft=&quot;0&quot; paddingRight=&quot;0&quot; paddingBottom=&quot;0&quot;
creationComplete=&quot;OSMap.main();&quot;&gt;
&lt;/mx:Application&gt;
</pre>
<p>Example OSMap.as file:</p>
<pre class="brush: as3;">
package com.britishideas
{
  import mx.controls.*;
  import mx.core.*;
  import mx.events.FlexEvent;
  import flash.events.*;
  import flash.utils.*;
  import flash.display.Sprite;
  import org.openscales.fx.FxMap;
  import org.openscales.core.Map;
  import org.openscales.core.layer.osm.Mapnik;
  import org.openscales.core.handler.mouse.DragHandler;
  import org.openscales.core.handler.mouse.WheelHandler;
  import org.openscales.core.control.PanZoomBar;

  public class OSMap
  {
    private static var map:FxMap;
    private static var mxmlApp:Application;
    private static var osmap:Map;

    public function OSMap()
    {
    }

    public static function main():void
    {
      mxmlApp = Application(Application.application);
      map = new FxMap();
      map.width = 840;
      map.height = 840;
      map.zoom = 10;
      mxmlApp.addChild(map);
      map.addEventListener(FlexEvent.CREATION_COMPLETE, MapCreated);
    }

    private static function MapCreated(e:FlexEvent):void
    {
      osmap = map.map;
      var MapnikLayer:Mapnik = new Mapnik(&quot;Mapnik&quot;, true);
      osmap.addLayer(MapnikLayer);
      var dragHandler:DragHandler = new DragHandler(osmap, true);
      var wheelHandler:WheelHandler = new WheelHandler(osmap, true);
      osmap.zoom = 10;
      osmap.addControl(new PanZoomBar());
    }
  }
}
</pre>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d165').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d165" style="overflow:hidden">
<br />
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d165').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d165').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.britishideas.com/2010/02/07/compiling-openscales-1-1-with-flashdevelop-3/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Map Scales and Printing with Mapnik</title>
		<link>http://www.britishideas.com/2009/09/22/map-scales-and-printing-with-mapnik/</link>
		<comments>http://www.britishideas.com/2009/09/22/map-scales-and-printing-with-mapnik/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 23:36:20 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Mapping]]></category>
		<category><![CDATA[Mapnik]]></category>
		<category><![CDATA[printing]]></category>

		<guid isPermaLink="false">http://www.britishideas.com/2009/09/22/map-scales-and-printing-with-mapnik/</guid>
		<description><![CDATA[Mapnik is a nice open source library for generating maps. The typical data source is OpenStreetMap style data stored in a PostgreSQL/PostGIS database. This post examines how to understand and control the map scale and generate maps suitable for printing.
Map Scales 
A map scale looks something like 1:1000. This means that for every 1 inch]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mapnik.org" target="_blank">Mapnik</a> is a nice open source library for generating maps. The typical data source is <a href="http://www.openstreetmap.org" target="_blank">OpenStreetMap</a> style data stored in a PostgreSQL/PostGIS database. This post examines how to understand and control the map scale and generate maps suitable for printing.</p>
<p><strong>Map Scales </strong></p>
<p>A map scale looks something like 1:1000. This means that for every 1 inch on the map there are 1000 inches in the real world. The units don&#8217;t matter, for example it also means that 1 meter on the map is 1000 meters in the real world. The value 1000 shown in this example is called the Scale Denominator.</p>
<p>Maps (in the context of this discussion) are generated using pixels. This is true even if printing because ultimately the printer has to print the pixels onto the paper (assuming a raster output). At low resolutions the pixels will be easily seen. Not so at high resolutions.</p>
<p>It is therefore useful for us to know the size of a pixel in meters. If we know this then we can work out the map scale and set the map scale.<span id="more-132"></span></p>
<p><strong>Universal Transverse Mercator</strong></p>
<p>The world is round and not flat (no comments on this please!) and therefore we need a way of converting a section of it onto a flat piece of paper. The method of converting a curved section of the world to a flat representation is called the <a href="http://en.wikipedia.org/wiki/Map_projection" target="_blank">projection</a>. There are many different projections to choose from and software available to convert data using the different projections. <a href="http://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system" target="_blank">Universal Transverse Mercator</a> (UTM) is a useful projection because it&#8217;s units are in meters. Typical map data uses latitude and longitude in degrees, which are difficult to use in calculations. However meters are much easier to work with.</p>
<p>The first step therefore is to get the bounding box of your map in degrees and <a href="http://www.google.com/search?q=convert+lat+lon+to+utm" target="_blank">convert</a> it to meters in UTM. Mapnik can also do this for you using the <a href="http://svn.mapnik.org/tags/release-0.6.0/docs/api_docs/python/mapnik.Projection-class.html" target="_blank">projection class</a>.</p>
<p>A bounding box is defined by the two coordinates that locate two opposite corners of the rectangle which defines the area in the map. The UTM zone is not needed, and we will assume the map area fits within a single UTM zone.</p>
<p><strong>Maps For Screens</strong></p>
<p>We assume that a pixel on a screen is 0.28mm on each side. This may or may not be true in reality, but it&#8217;s called the &#8220;standardized rendering pixel size&#8221; and is defined in the <a href="http://www.opengeospatial.org/standards/sld" target="_blank">OpenGIS Styled Layer Descriptor (SLD) Implementation Specification</a>. This assumption is made because software typically doesn&#8217;t know the pixel size on a screen and it&#8217;s a reasonable assumption. If the actual pixel size is known then it should be used. 0.28mm = 0.00028 m</p>
<p>We know the width of the area we wish to draw in meters from the UTM bounding box. We will call this map_realwidth_m. We also know the width of the map in pixels, because we choose that based on our requirements for the map. For example if the map is to go on a web page then the maximum width is probably something like 800px. We will call that image_width_px. Therefore:</p>
<p>scale_denominator = map_realwidth_m / (image_width_px x 0.00028)</p>
<p>The scale denominator is simply the ratio of the real world area width to the map width.</p>
<p>To summarize, for a bounding box in UTM coordinates and a given map width in pixels you can now calculate the scale of the map. However by rearranging the formula a UTM bounding box width can be calculated from a specific map scale and image width in pixels. By choosing a coordinate for the center of the map or one corner the UTM bounding box can be fixed.</p>
<p>Here is an example.  The width of the UTM bounding box is 1600 meters. The image width is 800px. Therefore:</p>
<p>scale_denominator = 1600 / (800 x 0.00028) = 7143.<br />
Map scale is 1:7143.</p>
<p>For a map scale of 1:2000 and an image width of 800px, the UTM bounding box width will be:</p>
<p>map_realwidth_m = 2000 x (800 x 0.00028) = 448 meters</p>
<p><strong>Maps For Printing</strong></p>
<p>Generating maps for printing is the same as for a screen except the resolution is different. For example a pixel size of 0.00028m corresponds to a resolution of approximately 90.7 Pixels Per Inch (PPI). This is a relatively low resolution and will likely appear quite poor when printed. Printing has a much better resolution than a screen. For example printing an 8&#8243; x 10&#8243; map might need 300 PPI to get enough detail. Large posters might be printed at 150 PPI. Note that sometimes PPI is referred to as Dots Per Inch (DPI) although DPI is specifically related to printing whereas PPI is more generic.</p>
<p>The first step in creating a map for printing is to determine the PPI to use. This is defined by the size of the print and the printer. For the examples that follow we will use 300 PPI, but any value can be used.</p>
<p>Next we need to work out the pixel size for the resolution.</p>
<p>300 PPI = 1 / 300 inches per pixel. 1/300 x 25.4mm/inch = 0.0846mm = 0.000085 meters</p>
<p>Now we need to work out the width of the map in pixels. For 300 PPI and a width of 7.5 inches we get:</p>
<p>image_width_px = 300 x 7.5 = 2250px</p>
<p>We can now put these values into the map scale formula to calculate the scale from the UTM bounding box, or calculate the UTM bounding box width from the scale. For a UTM bounding box that is 1600 meters wide:</p>
<p>scale_denominator = 1600 / (2250 x 0.000085) = 8366<br />
Map scale is 1:8366</p>
<p><strong>XML Stylesheet</strong></p>
<p>The Mapnik XML stylesheet tells Mapnik what to draw for different map scales. The rules are enabled by specifying a maximum and minimum scale denominator.</p>
<p>When creating maps for printing it is important to remember that internally Mapnik is assuming the map is for the screen and therefore has a different scale denominator. To get the scale denominator which Mapnik thinks is being used:</p>
<p># zoom to bounding box then&#8230;<br />
internal_scale_denom = mymap.scale_denominator()</p>
<p>Use this value when constructing the rules for the XML stylesheet.</p>
<p><strong>Notes</strong></p>
<p>If you tell Mapnik to render a specific UTM bounding box to an image of a specific dimensions then it will expand the bounding box in one direction so it has the same proportions as the image to be created. This can change the width of the UTM bounding box and therefore the scale calculation. The solution is to base any scale calculations off the actual bounding box. Mapnik can give you the values by calling the envelope() function on the map object.</p>
<p>The scale is an approximation and might only be valid for the center of the map. The larger the area represented in the map the more distortion there will be and therefore less accuracy when using the scale.</p>
<p>OpenStreetMap uses zoom levels numbered one to 18. <a href="http://svn.openstreetmap.org/applications/rendering/mapnik/zoom-to-scale.txt" target="_blank">This file</a> shows the relationship between the zoom levels and the scale denominators.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d132').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d132" style="overflow:hidden">
<br />
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d132').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d132').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.britishideas.com/2009/09/22/map-scales-and-printing-with-mapnik/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>OpenStreetMap and Beaches of the Rich and Famous</title>
		<link>http://www.britishideas.com/2009/09/01/openstreetmap-and-beaches-of-the-rich-and-famous/</link>
		<comments>http://www.britishideas.com/2009/09/01/openstreetmap-and-beaches-of-the-rich-and-famous/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 05:33:34 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Mapping]]></category>
		<category><![CDATA[celebrity]]></category>
		<category><![CDATA[hidden locations]]></category>

		<guid isPermaLink="false">http://www.britishideas.com/2009/09/01/openstreetmap-and-beaches-of-the-rich-and-famous/</guid>
		<description><![CDATA[In Malibu, Calif. there have long been disputes between the rich and famous and the public over access to certain beaches. One of these is Trancas Beach (a.k.a. Broad Beach).
In the 100 or so houses along this beach are the homes of some of the most famous people in Hollywood. Under the California Constitution (Article]]></description>
			<content:encoded><![CDATA[<p>In Malibu, Calif. there have long been disputes between the rich and famous and the public over access to certain beaches. One of these is <a href="http://www.malibucomplete.com/mc_around_broadbeach.php" target="_blank">Trancas Beach</a> (a.k.a. Broad Beach).</p>
<p>In the 100 or so houses along this beach are the homes of some of the most famous people in Hollywood. Under the California Constitution (Article X, Section 4) the <a href="http://www.venturacountystar.com/news/2007/jul/25/this-land-is-your-land/" target="_blank">public is allowed access</a> to certain areas of beach, but the rich and famous apparently want to keep it all for themselves. They even <a href="http://www.flickr.com/photos/cityprojectca/sets/72157600307195992/" target="_blank">bulldozed the sand</a> to protect their homes but ruined the public section, before being made to undo the damage.</p>
<p>This beach has two public access walkways, but they can be hard to find. They are located between houses and are narrow. According to some reports the local residents try to obsure the locations and put up <a href="http://pruned.blogspot.com/2008/07/field-guide-to-public-beaches-of-malibu.html" target="_blank">false signs</a> to deter people.</p>
<p>Last weekend (August 2009) I went to the beach armed with my GPS unit. I recorded the western public access and I have now added it to OpenStreetMap. Within a few minutes it was rendered (showing the location, steps and the gate).</p>
<p>Now everyone will be able to put this onto their maps and GPS units, easily find this public access point and enjoy free parking and a quiet beach!</p>
<p><a href="http://www.britishideas.com/wp-content/uploads/2009/09/trancasbeachaccess.gif" title="Trancas Beach Access - West"><img src="http://www.britishideas.com/wp-content/uploads/2009/09/trancasbeachaccess.thumbnail.gif" alt="Trancas Beach Access - West" /></a></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d130').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d130" style="overflow:hidden">
<br />
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d130').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d130').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.britishideas.com/2009/09/01/openstreetmap-and-beaches-of-the-rich-and-famous/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter + Google Maps + Text Messaging Mashup</title>
		<link>http://www.britishideas.com/2009/08/16/twitter-google-maps-test-messaging-mashup/</link>
		<comments>http://www.britishideas.com/2009/08/16/twitter-google-maps-test-messaging-mashup/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 17:55:05 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Mapping]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[Text Messaging]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.britishideas.com/2009/08/16/twitter-google-maps-test-messaging-mashup/</guid>
		<description><![CDATA[I am planning a road trip and thought about using Twitter to send updates from the road. As my phone doesn&#8217;t have internet access and emailing using the Samsung interface is difficult, I would be restricted to text messaging. However I really wanted a way to post tweets with a link to a map showing]]></description>
			<content:encoded><![CDATA[<p>I am planning a road trip and thought about using <a href="http://twitter.com" target="_blank">Twitter</a> to send updates from the road. As my phone doesn&#8217;t have internet access and emailing using the Samsung interface is difficult, I would be restricted to text messaging. However I really wanted a way to post tweets with a link to a map showing my approximate location. Ideally it would allow vague descriptions such as &#8220;Euclid and Stone, Tucson&#8221; as well as latitude and longitude, e.g. &#8220;N 32. 16.123 W 110 18.654&#8243;.</p>
<p>Surprisingly a search turned up very few options.  There is, however, a service that already does everything I want, and it&#8217;s called <a href="http://geo.ly" target="_blank">Geo.ly</a>. So why not use it I hear you ask? Well there are two large problems. Firstly the twitter interface doesn&#8217;t seem to be working right now and appears to have reliability problems. Secondly about 20% of the time the service will give you a URL to a map that doesn&#8217;t work &#8211; all you see is a blank page.</p>
<p>After a bit more fruitless searching I sat down and wrote my own PHP code that pulls everything together. Here is how it works.</p>
<p>There is a free text messaging service called <a href="http://www.textmarks.com" target="_blank">TextMarks</a> that converts text messaging to/from HTTP requests and responses. All that&#8217;s needed to send and receive text messages is to write a PHP (or CGI) script and put it on a web server somewhere. I tried it and it really is a piece of cake.</p>
<p>Next was to convert the text description of a location into latitude and longitude. For this Google provides a free <a href="http://code.google.com/apis/maps/documentation/geocoding/" target="_blank">geocoding</a> system, providing that the results are shown on a Google map. After a bit more work I had this working and it can accept a wide variety of input descriptions. For example the ones I listed above plus things like &#8220;Grand Canyon National Park&#8221;. Perfect.</p>
<p>The final piece of the puzzle was to automatically post the tweet with the location of the Google map using the <a href="http://apiwiki.twitter.com/" target="_blank">Twitter API</a>. I found that Twitter automatically shortens URLs in tweets using the <a href="http://bit.ly" target="_blank">bit.ly</a> service.</p>
<p>So now I can send a text message with a rough description of my location, the location is converted to coordinates, a tweet is generated with a link to the map and a confirmation text message is sent back to my phone. This typically takes about 15 seconds. Nice!</p>
<p>Below is the PHP script. Use at your own risk. To install:</p>
<ol>
<li>Copy to somewhere on your webserver</li>
<li>Go to TextMarks and create a new TextMark for your service</li>
<li>Create a TextMarks account and edit the configuration. Disable messaging and any public options for your TextMark &#8211; after all you don&#8217;t want other people posting locations to your twitter account.</li>
<li>Edit the script and enter your Twitter username and password. Also enter your <a href="http://code.google.com/apis/maps/signup.html" target="_blank">Google Maps API key</a> (which is free).</li>
</ol>
<p>Note that there is no authentication used in the script. This is because the script is not linked to, uses an obscure name (not twitter.php, which is just an example name), and the TextMark is private. However, if desired, the TextMarks service can pass the phone number to the script allowing for only specific phones to use the system.</p>
<p>A public version would, of course, need more input checking, user authentication, etc.<br />
<code><br />
&lt;?php<br />
// script to take a location description from a text message,<br />
// generate a URL to a map and then tweet the URL<br />
// the result is returned as a text message<br />
</code></p>
<p><code><br />
// (C) Copyright Andrew Ayre, 2009<br />
// andy at britishideas dot com<br />
</code></p>
<p><code><br />
// call from TextMarks using something like:<br />
// http://www.mydomain.com/twitter.php?args=\0<br />
</code></p>
<p><code><br />
// This program is free software; you can redistribute it and/or<br />
// modify it under the terms of the GNU General Public License<br />
// as published by the Free Software Foundation; either version 2<br />
// of the License, or (at your option) any later version.<br />
</code></p>
<p><code><br />
// This program is distributed in the hope that it will be useful,<br />
// but WITHOUT ANY WARRANTY; without even the implied warranty of<br />
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br />
// GNU General Public License for more details.<br />
// You should have received a copy of the GNU General Public License<br />
// along with this program; if not, write to the Free Software<br />
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.<br />
// See: http://www.gnu.org/licenses/gpl-2.0.html<br />
</code></p>
<p><code><br />
// twitter username and password<br />
$twitter_username = 'myusername';<br />
$twitter_password = 'mypassword';<br />
// API key for Google Maps<br />
$google_mapsapikey = 'myapikey';<br />
</code></p>
<p><code><br />
// max time to wait for tweet responses from twitter in seconds<br />
$twitter_timeout = 30;<br />
// max time to wait for Google geocoding service in seconds<br />
$google_timeout = 30;<br />
</code></p>
<p><code><br />
// get text message contents<br />
$args = $_GET['args'];<br />
// encode<br />
$args = urlencode($args);<br />
</code></p>
<p><code><br />
// geocode input<br />
$req = curl_init("http://maps.google.com/maps/geo?q=$args&amp;output=json&amp;oe=utf8&amp;sensor=false&amp;key=$google_mapsapikey");<br />
curl_setopt($req, CURLOPT_RETURNTRANSFER, true);<br />
curl_setopt($req, CURLOPT_CONNECTTIMEOUT, $google_timeout);<br />
$output = curl_exec($req);<br />
curl_close($req);<br />
</code></p>
<p><code><br />
// parse geocoding result<br />
$result = json_decode($output, true);<br />
if ($result == NULL) {<br />
echo "Geocoding failed";<br />
return;<br />
}<br />
</code></p>
<p><code><br />
// get address and coordinates<br />
$address = $result['Placemark'][0]['address'];<br />
$lon = $result['Placemark'][0]['Point']['coordinates'][0];<br />
$lat = $result['Placemark'][0]['Point']['coordinates'][1];<br />
</code></p>
<p><code><br />
// construct Google URL<br />
$mapurl = urlencode("http://maps.google.com/maps?q=$lat+$lon&amp;mrt=yp");<br />
</code></p>
<p><code><br />
// send to twitter - based on<br />
// http://morethanseven.net/2007/01/20/posting-to-twitter-using-php/<br />
$tweet = "I am somewhere near $mapurl";<br />
$req = curl_init('https://twitter.com/statuses/update.xml');<br />
curl_setopt($req, CURLOPT_CONNECTTIMEOUT, $twitter_timeout);<br />
curl_setopt($req, CURLOPT_RETURNTRANSFER, true);<br />
curl_setopt($req, CURLOPT_POST, true);<br />
curl_setopt($req, CURLOPT_POSTFIELDS, "status=$tweet");<br />
curl_setopt($req, CURLOPT_USERPWD, "$twitter_username:$twitter_password");<br />
$output = curl_exec($req);<br />
curl_close($req);<br />
</code></p>
<p><code><br />
// return result via text message<br />
if (empty($output))<br />
{<br />
echo "Failed: $address, $lat, $lon";<br />
} else {<br />
echo "Tweeted: $address, $lat, $lon";<br />
}<br />
?&gt;<br />
</code></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d129').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d129" style="overflow:hidden">
<br />
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d129').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d129').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.britishideas.com/2009/08/16/twitter-google-maps-test-messaging-mashup/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Open Street Map Quick Start (JOSM)</title>
		<link>http://www.britishideas.com/2009/08/06/open-street-map-quick-start-josm/</link>
		<comments>http://www.britishideas.com/2009/08/06/open-street-map-quick-start-josm/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 00:12:44 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Mapping]]></category>
		<category><![CDATA[JOSM]]></category>
		<category><![CDATA[Mapnik]]></category>

		<guid isPermaLink="false">http://www.britishideas.com/2009/08/06/open-street-map-quick-start-josm/</guid>
		<description><![CDATA[This is a description of how to quickly get going with OpenStreetMap. It is primarily aimed at people who don&#8217;t have a GPS unit or don&#8217;t want to use one. It&#8217;s also aimed at people who want to quickly add something to their local area. It is not a replacement for the OSM wiki.
Get JOSM
First]]></description>
			<content:encoded><![CDATA[<p>This is a description of how to quickly get going with <a href="http://www.openstreetmap.org" target="_blank">OpenStreetMap</a>. It is primarily aimed at people who don&#8217;t have a GPS unit or don&#8217;t want to use one. It&#8217;s also aimed at people who want to quickly add something to their local area. It is not a replacement for the <a href="http://wiki.openstreetmap.org" target="_blank">OSM wiki</a>.</p>
<p><strong>Get JOSM</strong></p>
<p>First <a href="http://josm.openstreetmap.de/josm-latest.jar">download the current version of JOSM</a>, which is a Java based editor. You will also need to install <a href="http://java.sun.com/javase/downloads/" target="_blank">Java 1.5</a>. You can also read more about JOSM <a href="http://josm.openstreetmap.de/" target="_blank">here</a> and <a href="http://wiki.openstreetmap.org/wiki/JOSM" target="_blank">here</a>.</p>
<p>Start JOSM. On the command line this is something like:</p>
<p><code>java -jar -Xmx512M josm-latest.jar</code></p>
<p>There are some JOSM plugins that I think are essential, and here is how to add them:</p>
<ul>
<li>Start JOSM</li>
<li> Go to Edit -&gt; Preferences</li>
<li>Click on the plugins tab (looks like a wall socket/outlet)</li>
<li>Click on &#8220;Download List&#8221;</li>
<li>Check/tick the following: utilsplugin, validator, waydownloader</li>
<li>Click on &#8220;OK&#8221;</li>
<li>Restart JOSM</li>
</ul>
<p>Next you need to tell JOSM your OpenStreetMap username and password.</p>
<ul>
<li>Go to Edit -&gt;Preferences</li>
<li>Click on the connection settings tab (looks like a planet)</li>
<li>Enter your email address and password</li>
<li>Click on &#8220;OK&#8221;</li>
</ul>
<p>Next <a href="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/WMSPlugin" target="_blank">install the WMS Plugin</a> for JOSM that will allow you to view Yahoo satellite images.</p>
<p><strong>Download a Section of the Map</strong></p>
<p>Next you will want to download the part of the map that covers your local area.</p>
<ul>
<li>Click on the Download From OSM toolbar button</li>
<li>Check/tick &#8220;Download as a new layer&#8221;</li>
<li>Drag the map with the right mouse button, zoom with the mouse wheel or Ctrl + arrow keys</li>
<li>Drag a box with the left mouse button to select an area to download. Keep it small for now.</li>
<li>Click on &#8220;OK&#8221; and wait a bit. It could take a few minutes so don&#8217;t give up too quickly</li>
</ul>
<p>You will now be looking at a black screen with lots of lines on it. Zoom in to a few streets using the magnifying glass tool on the toolbar.</p>
<p><strong>Get the Satellite Images</strong></p>
<p>The next step is to get the satellite images so we can see how the streets compare with the real world.</p>
<ul>
<li>Go to  WMS -&gt; Yahoo Sat (may have a slightly different name depending on the JOSM version)</li>
</ul>
<p>At the top right under the Layers heading a new layer should appear called &#8220;Yahoo Sat&#8221; or something like that. Wait a bit and the images should start to appear.</p>
<p><strong>Edit the Map</strong></p>
<p>It&#8217;s now time to start editing. It should be clear if a street is not aligned with the Yahoo images. If it isn&#8217;t then you can click on the Select tool on the toolbar and start dragging the nodes (small yellow boxes). Position a road over where it is in the satellite image.</p>
<p><strong>Upload!</strong></p>
<p>Once you have fixed a few roads click on the Upload to OSM toolbar button.</p>
<ul>
<li>Enter a description for the change</li>
<li>Click on &#8220;Upload Changes&#8221;</li>
</ul>
<p>Once complete you can go to your OSM account page and view your edits. The URL is http://www.openstreetmap.org/user/myusername/edits. Replace &#8220;myusername&#8221; with your user name. You should see your first edit!</p>
<p>After waiting a few minutes your changes should start to appear on the <a href="http://www.openstreetmap.org" target="_blank">map</a>. <a href="http://wiki.openstreetmap.org/wiki/Slippy_Map#Mapnik_tile_rendering" target="_blank">Mapnik</a> (the default renderer) renders the lower zoom levels more frequently, so you should see your changes appear in stages and only in some zoom levels. After a day or so all the lower zoom levels should show your changes.</p>
<p><strong>Some Notes</strong></p>
<p>The Yahoo satellite images are not always in the right place, but it seems from my experience they are pretty good. However this is something to keep in mind.</p>
<p>Along with fixing streets, it&#8217;s also possible to add in schools, malls, hospitals, businesses, rivers, streams, parks, etc. all by using the satellite images. There is plenty to do!</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d128').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d128" style="overflow:hidden">
<br />
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d128').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d128').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.britishideas.com/2009/08/06/open-street-map-quick-start-josm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mapping Summerhaven</title>
		<link>http://www.britishideas.com/2009/08/01/mapping-summerhaven/</link>
		<comments>http://www.britishideas.com/2009/08/01/mapping-summerhaven/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 04:32:04 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Mapping]]></category>

		<guid isPermaLink="false">http://www.britishideas.com/2009/08/01/mapping-summerhaven/</guid>
		<description><![CDATA[Previously I wrote on preparations to map Summerhaven for OpenStreetMap (OSM). This weekend we were able to get up there, drive around and take pictures. Here is the map as of yesterday:

And here is the map today:

As you can see there are less roads. We found that many of the roads just don&#8217;t exist. Also]]></description>
			<content:encoded><![CDATA[<p>Previously I wrote on <a href="http://www.britishideas.com/2009/07/20/preparing-to-map-summerhaven/">preparations to map Summerhaven</a> for <a href="http://www.openstreetmap.org" target="_blank">OpenStreetMap</a> (OSM). This weekend we were able to get up there, drive around and take pictures. Here is the map as of yesterday:</p>
<p><a href="http://www.britishideas.com/wp-content/uploads/2009/07/summerhavenbefore.jpg" title="Summerhaven Before Mapping"><img src="http://www.britishideas.com/wp-content/uploads/2009/07/summerhavenbefore.thumbnail.jpg" alt="Summerhaven Before Mapping" /></a></p>
<p>And here is the map today:</p>
<p><a href="http://www.britishideas.com/wp-content/uploads/2009/08/summerhavenafter.jpg" title="Improved Summerhaven Map"><img src="http://www.britishideas.com/wp-content/uploads/2009/08/summerhavenafter.thumbnail.jpg" alt="Improved Summerhaven Map" /></a></p>
<p>As you can see there are less roads. We found that many of the roads just don&#8217;t exist. Also after talking to some cabin owners we met, some roads have apparently been cut in two to build more cabins.</p>
<p>Comparing with the Google map we can see that we have missed a section of roads in the North East of Summerhaven, so we will need to go back for those sometime soon. Looking more closely at the Google map I can see many mistakes. Roads connecting when they don&#8217;t and the wrong names used.</p>
<p>Interestingly it seems Garmin have also used the incorrect TIGER data for their City Navigator NT. It contained a huge error which I corrected as soon as I saw it several weeks ago on the OSM map.</p>
<p>We marked on the map the locations of restrooms and parking areas, something which doesn&#8217;t appear on other maps.</p>
<p>Here is a screenshot showing our GPS trails overlaid on the TIGER data. As you can see the TIGER data is total nonsense.</p>
<p><a href="http://www.britishideas.com/wp-content/uploads/2009/08/summerhavenjosm.gif" title="Summerhaven JOSM"><img src="http://www.britishideas.com/wp-content/uploads/2009/08/summerhavenjosm.thumbnail.gif" alt="Summerhaven JOSM" /></a></p>
<p>We have now compiled a list of about half a dozen specific items to look at when we next visit, however I can say that the OSM map must be the most accurate map of Summerhaven that is publically available, even if it isn&#8217;t completed yet.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d125').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d125" style="overflow:hidden">
<br />
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d125').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d125').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.britishideas.com/2009/08/01/mapping-summerhaven/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OSM and Tucson</title>
		<link>http://www.britishideas.com/2009/07/28/osm-and-tucson/</link>
		<comments>http://www.britishideas.com/2009/07/28/osm-and-tucson/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 05:41:22 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Mapping]]></category>

		<guid isPermaLink="false">http://www.britishideas.com/2009/07/28/osm-and-tucson/</guid>
		<description><![CDATA[I noticed that various cities and counties/states have pages in the OpenStreetMap (OSM) wiki, but Tucson didn&#8217;t. I&#8217;ve now fixed that with a page for Tucson that provides a list of projects with percentage of completion. I hope that will encourage people to contribute by giving them ideas of where to start.


Bookmark to:




Hide Sites



$$('div.d124').each( function(e)]]></description>
			<content:encoded><![CDATA[<p>I noticed that various cities and counties/states have pages in the OpenStreetMap (OSM) wiki, but Tucson didn&#8217;t. I&#8217;ve now fixed that with a <a href="http://wiki.openstreetmap.org/wiki/Tucson%2C_Arizona" target="_blank">page for Tucson</a> that provides a list of projects with percentage of completion. I hope that will encourage people to contribute by giving them ideas of where to start.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d124').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d124" style="overflow:hidden">
<br />
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d124').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d124').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.britishideas.com/2009/07/28/osm-and-tucson/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Personal Open Street Map Goals</title>
		<link>http://www.britishideas.com/2009/07/25/personal-open-street-map-goals/</link>
		<comments>http://www.britishideas.com/2009/07/25/personal-open-street-map-goals/#comments</comments>
		<pubDate>Sat, 25 Jul 2009 21:00:06 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Mapping]]></category>

		<guid isPermaLink="false">http://www.britishideas.com/2009/07/25/personal-open-street-map-goals/</guid>
		<description><![CDATA[I&#8217;ve decided to write down my goals. These are long-term; if I can get them done in six months that would be great.
1. Large Scale Features
Adding national forests, parks and preserves, wilderness areas and the trails inside those areas for Arizona. I am perhaps 70% done with this goal. The benefit is vastly improved recreation]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve decided to write down my goals. These are long-term; if I can get them done in six months that would be great.</p>
<p><strong>1. Large Scale Features</strong></p>
<p>Adding national forests, parks and preserves, wilderness areas and the trails inside those areas for Arizona. I am perhaps 70% done with this goal. The benefit is vastly improved recreation maps for the six million people in the state. The area is huge (larger than the UK) and the total number of nodes is probably in the 100,000s.</p>
<p><strong>2. Medium Scale Features</strong></p>
<p>Adding key features in the city of Tucson. This includes major rivers and washes, large buildings such as hospitals, malls and big box stores, realigning primary and secondary roads. To date I have added at least one of each of these features. The benefit is a good overall map for the one million people who live in the Tucson area.</p>
<p><strong>3. Small Scale Features</strong></p>
<p>I plan to completely map in as much detail as possible the nine square miles or so around my home. This includes realigning all the streets, adding buildings which are not houses, adding recreation areas, ensuring all streets are named, etc. Of the three goals this is probably the most work. The number of people living in the area isn&#8217;t that much, but I intend this to be an example for future Tucson mappers.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d123').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d123" style="overflow:hidden">
<br />
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d123').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d123').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.britishideas.com/2009/07/25/personal-open-street-map-goals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Rivers To Open Street Map</title>
		<link>http://www.britishideas.com/2009/07/25/adding-rivers-to-open-street-map/</link>
		<comments>http://www.britishideas.com/2009/07/25/adding-rivers-to-open-street-map/#comments</comments>
		<pubDate>Sat, 25 Jul 2009 19:05:46 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Mapping]]></category>

		<guid isPermaLink="false">http://www.britishideas.com/2009/07/25/adding-rivers-to-open-street-map/</guid>
		<description><![CDATA[Some rivers are small enough that they can be added with just a line. But how are wider rivers added? They are polygons that can stretch hundreds of miles. How do you stop and start editing or does the entire river somehow have to be added at once?
The answer is to use the tag waterway:riverbank]]></description>
			<content:encoded><![CDATA[<p>Some rivers are small enough that they can be added with just a line. But how are wider rivers added? They are polygons that can stretch hundreds of miles. How do you stop and start editing or does the entire river somehow have to be added at once?</p>
<p>The answer is to use the tag <a href="http://wiki.openstreetmap.org/wiki/Tag:waterway%3Driverbank" target="_blank">waterway:riverbank</a> and build the river up from polygons that are next to each other. This diagram shows:</p>
<p><img src="http://wiki.openstreetmap.org/images/4/41/Make_river.png" alt="Ways in a river" width="500" height="106" /></p>
<p>Seems simple enough. But what about bridges. The <a href="http://wiki.openstreetmap.org/wiki/Key:bridge" target="_blank">bridge:yes</a> page explained. Just cut up the road and mark the section on the bridge with bridge:yes. The layer option was a bit ambiguous so to be sure I added layer:1 for the bridge.</p>
<p>So I tried added a section of the Pantano Wash in Tucson. After waiting 15 minutes or so the result was added to the map:</p>
<p><a href="http://www.britishideas.com/wp-content/uploads/2009/07/osmwash.jpg" title="A Wash in OSM"><img src="http://www.britishideas.com/wp-content/uploads/2009/07/osmwash.thumbnail.jpg" alt="A Wash in OSM" /></a></p>
<p>Looking good. Now to add some more.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d122').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d122" style="overflow:hidden">
<br />
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d122').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d122').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.britishideas.com/2009/07/25/adding-rivers-to-open-street-map/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
