<?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; JOSM</title>
	<atom:link href="http://www.britishideas.com/tag/josm/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.britishideas.com</link>
	<description>Interesting Tech Projects</description>
	<lastBuildDate>Sun, 23 Oct 2011 20:05:43 +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>So You Want to be a Cartographer?</title>
		<link>http://www.britishideas.com/2011/01/16/so-you-want-to-be-a-cartographer/</link>
		<comments>http://www.britishideas.com/2011/01/16/so-you-want-to-be-a-cartographer/#comments</comments>
		<pubDate>Sun, 16 Jan 2011 22:21:49 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Mapping]]></category>
		<category><![CDATA[JOSM]]></category>
		<category><![CDATA[maperitive]]></category>
		<category><![CDATA[OpenStreetMap]]></category>
		<category><![CDATA[rendering]]></category>

		<guid isPermaLink="false">http://www.britishideas.com/?p=293</guid>
		<description><![CDATA[Love maps? Want to make your own? Now it&#8217;s easy thanks to a set of free software.
Previously I wrote about the OpenStreetMap project, which allows anyone to edit a map of the world. People can add points, lines and areas and &#8220;tag&#8221; them to show what they are. Once the data is uploaded a new]]></description>
			<content:encoded><![CDATA[<p>Love maps? Want to make your own? Now it&#8217;s easy thanks to a set of free software.</p>
<p>Previously I wrote about the <a href="http://www.openstreetmap.org" target="_blank">OpenStreetMap</a> project, which allows anyone to edit a map of the world. People can add points, lines and areas and &#8220;tag&#8221; them to show what they are. Once the data is uploaded a new version of the map is generated for everyone to see.</p>
<p>For example I could create a point on the map and tag it with &#8220;railway=station&#8221; to indicate that it is a train station. I could draw a line and tag it with &#8220;highway=residential&#8221; to mark the line as a residential road. I could also draw an enclosed area and tag it with &#8220;landuse=forest&#8221; to show that the area is a forest. There are many different tags that can be used to represent all kinds of things that appear on maps.</p>
<p>This article is in the form of a tutorial to get you quickly started creating your own maps. I will introduce the software involved and show how to use it step by step. The result of the tutorial is a map of the <a href="http://www.nymr.co.uk/" target="_blank">North Yorkshire Moors Railway</a>, which is a steam train service on a historic train line in England and is featured in the Harry Potter films.</p>
<p><span id="more-293"></span></p>
<p><strong>Get the Data</strong></p>
<p>To quickly get started we will use some map data from the OpenStreetMap project. This data has a <a href="http://www.openstreetmap.org/copyright" target="_blank">license</a> which you must follow, however you can create your own map data from scratch, either by using a GPS/hiking SatNav unit to perform surveys or even create maps of imaginary places or recreate historical maps.</p>
<p>The first piece of software is the map editor, called <a href="http://josm.openstreetmap.de/josm-latest.jar">JOSM</a>. This is downloaded to your PC and you can run it by double-clicking on the file. You must have <a href="http://www.java.com/en/download/manual.jsp" target="_blank">Java</a> installed on your PC if you don&#8217;t already.</p>
<p><a href="http://www.britishideas.com/wp-content/uploads/2011/01/josmnew.png"><img class="aligncenter size-medium wp-image-299" title="JOSM" src="http://www.britishideas.com/wp-content/uploads/2011/01/josmnew-300x188.png" alt="" width="300" height="188" /></a></p>
<p>To download data in JOSM go to the File menu and choose Download from OSM&#8230; a window showing a map will appear. You can scroll around by dragging and zoom in and out using the mouse wheel.</p>
<p>Find the town of Pickering in the north of England and drag a box from Pickering to Whitby, being sure to include both towns as shown in the image. Then click on Download.</p>
<p><a href="http://www.britishideas.com/wp-content/uploads/2011/01/josmselectbox.png"><img class="aligncenter size-medium wp-image-295" title="Select Map Area in JOSM" src="http://www.britishideas.com/wp-content/uploads/2011/01/josmselectbox-290x300.png" alt="" width="290" height="300" /></a></p>
<p>Once the data has downloaded it will show in JOSM as lots of multicoloured ponts, lines and areas.</p>
<p><a href="http://www.britishideas.com/wp-content/uploads/2011/01/josmdownloaded2.png"><img class="aligncenter size-medium wp-image-298" title="Downloaded Data in JOSM" src="http://www.britishideas.com/wp-content/uploads/2011/01/josmdownloaded2-300x188.png" alt="" width="300" height="188" /></a></p>
<p>At this point you could edit the map by clicking on items and then changing the tags, however that is outside the scope of this tutorial. For more information see the <a href="http://josm.openstreetmap.de/wiki/Help" target="_blank">JOSM documentation</a>. For now simply save the data without changing it by going to the File menu and choosing Save As&#8230; Save the file as nymr.osm in an empty folder.</p>
<p><strong>Render the Map</strong></p>
<p>The software we will use to render the map is called <a href="http://maperitive.net/download/" target="_blank">Maperitive</a>. Download the latest version (the one with the largest number), install it on your PC then start the application.</p>
<p><a href="http://www.britishideas.com/wp-content/uploads/2011/01/mapstart.jpg"><img class="aligncenter size-medium wp-image-306" title="Maperitive" src="http://www.britishideas.com/wp-content/uploads/2011/01/mapstart-300x217.jpg" alt="" width="300" height="217" /></a></p>
<p>The map shown is not from our data so the first thing we need to do is get rid of it. Click in the Command Prompt box at the bottom so it turns yellow. The command is &#8220;clear-map&#8221; however you can&#8217;t simply type it in as Maperitive tries to guess the command you want. This means that after every key press you need to stop typing and look at the yellow box to see what has happened. In practice for this command you will need to type &#8220;cl&#8221; followed by &#8220;m&#8221;. Press Enter and the map will dissappear.</p>
<p>Next we need to switch to the folder where you saved your copy of nymr.osm. Here is an example:</p>
<pre class="brush: plain;">change-dir C:\Users\Andy\Desktop\temp\NYMR</pre>
<p>Next load the data and set the edge of the map to match the data:</p>
<pre class="brush: plain;">load-source nymr.osm
bounds-use-source</pre>
<p><a href="http://www.britishideas.com/wp-content/uploads/2011/01/mapdataloaded.jpg"><img class="aligncenter size-medium wp-image-311" title="Data loaded in Maperitive" src="http://www.britishideas.com/wp-content/uploads/2011/01/mapdataloaded-300x217.jpg" alt="" width="300" height="217" /></a></p>
<p>Show is a rendering of your map along with a dotted line around the edge to show the boundary. When you save the map later nothing outside of the dotted line will be included.</p>
<p>The map works in the same was as JOSM. You can scroll around by clicking and dragging and zoom in and out using the mouse wheel. To reset the view to show the entire map go to the View menu and choose Zoom All.</p>
<p>One thing you will immediately notice is the large pink dashes on the map. They remind me of pictures of bacteria under a microscope but in our case they are trails that have been marked as private. The first thing we need to do is reduce the size of these to something a bit more appropriate for the map scale, and for that we need to discuss rules.</p>
<p><strong>Renderer Rules</strong></p>
<p>As mentioned before, the map is made up of points, lines and areas. Maperitive uses a set of rules to determine how these are shown on the map. For example a rule for residential roads says to draw it in white with a black border and at a specific width. In order to change how the map looks we have to change the rules. Maperitive uses a default set of rules and we need to change these for every map to focus on the things we want to show.</p>
<p>In Maperitive enter the command:</p>
<pre class="brush: plain;">edit-rules</pre>
<p>This will open a text editor showing the default rules. Save this file as rules.txt into the folder where you saved nymr.osm. Keep the text editor open.</p>
<p>Next we tell Maperitive to use our newly saved rules file:</p>
<pre class="brush: plain;">use-ruleset location=rules.txt as-alias=myrules
apply-ruleset</pre>
<p>The map should look the same, however every time we edit and save the rules file the map will automatically update to show the new version of the map.</p>
<p>Search for the following line:</p>
<pre class="brush: plain;">target : highway private</pre>
<p>and below it you will find the rules for showing private &#8220;highways&#8221;, which includes tracks:</p>
<pre class="brush: plain;">target : highway private
define
line-width : 4
line-style : dash
line-color : #F7D4D4
draw : line</pre>
<p>Change the line-width from 4 to 1 and save the file. The thick pink track lines on the map will be replaced with thin lines.</p>
<p>It is important to note that the indentation in the Maperitive rules file is important and must always be used with tabs. For example don&#8217;t use spaces as it won&#8217;t work.</p>
<p><strong>Customizing the Map</strong></p>
<p>The central area of the map shows the North Yorkshire Moors, which is a hilly region and could be made more interesting. We can do that by adding three additional layers to the map, all of which are available from the Tools menu in Maperitive.</p>
<p>First, add contour lines. These show the height of the land, and are added by going to the Tools menu and choosing Generate Relief Contours.</p>
<p>Next add hillshading. This is a trick to make the map look three dimensional by showing shadows on the south and eastern sides of raised land. To add this go to the Tools menu and choose of the Generate Hillshading items. You can do this multiple times for more emphasis if you want.</p>
<p>The last step is to change the color of the land to indicate the height, which is called hypsometric tinting. Adding this layer makes the map look like it comes from a beautiful atlas. Add it by choosing Generate Hypsometric Tinting from the Tools menu.</p>
<p><a href="http://www.britishideas.com/wp-content/uploads/2011/01/maplayered.jpg"><img class="aligncenter size-medium wp-image-317" title="Layered Map in Maperitive" src="http://www.britishideas.com/wp-content/uploads/2011/01/maplayered-300x217.jpg" alt="" width="300" height="217" /></a></p>
<p>If you look at the bottom of the Maperitive window you will see the current zoom level. The zoom level increases as you zoom into the map, with level 18 being the current maximum. In the rules the maximum and minimum zoom levels are often specified. This allows more features to be shown as you zoom into the map and less as you zoom out. Railway lines are one of the items that are not shown when zoomed out, so we need to change that.</p>
<p>Find the entry for</p>
<pre class="brush: plain;">target: railway</pre>
<p>and change the first two min-zoom entries from 13 to 8. Save the file. The map will now show the full-time commercial railway line from Whitby.</p>
<p><a href="http://www.britishideas.com/wp-content/uploads/2011/01/maplineadded.gif"><img class="aligncenter size-medium wp-image-318" title="Railway Line in Maperitive" src="http://www.britishideas.com/wp-content/uploads/2011/01/maplineadded-300x102.gif" alt="" width="300" height="102" /></a></p>
<p>Next we need to show the railway stations, which are currently not rendered at all. The rules file starts with:</p>
<pre class="brush: plain;">features
 points, areas</pre>
<p>below this are a set of target name descriptions. Add a new entry, making sure to indent it with tabs:</p>
<pre class="brush: plain;">railway station: railway=station</pre>
<p>Again find:</p>
<pre class="brush: plain;">target : railway</pre>
<p>and just above that line add a new rule, making sure to copy the indentation that is used for similar rules:</p>
<pre class="brush: plain;">target : railway station
 define
 min-zoom : 8
 shape : circle
 shape-size : 10
 line-color : gray
 line-width : 2
 fill-color : red
 fill-opacity : 1
 draw : shape</pre>
<p>Save the file and the map will now show red circles for the train stations.</p>
<p><a href="http://www.britishideas.com/wp-content/uploads/2011/01/mapstations.jpg"><img class="aligncenter size-medium wp-image-319" title="Railway Stations in Maperitive" src="http://www.britishideas.com/wp-content/uploads/2011/01/mapstations-270x300.jpg" alt="" width="270" height="300" /></a></p>
<p>Finally we need to add a target description for preserved railways and a rule on how they should be rendered. Below the &#8220;lines&#8221; heading of the &#8220;features&#8221; section at the start of the rules file add:</p>
<pre class="brush: plain;">preserved railway: railway=preserved</pre>
<p>then above the railway station rule add the rule (again with the correct indentation):</p>
<pre class="brush: plain;">target : preserved railway
 define
 min-zoom : 8
 line-color : black
 line-width : 3
 draw : line
 define
 min-zoom : 8
 line-style : dashlong
 line-color : white
 line-width : 3
 border-style : solid
 border-color : black
 border-width : 25%
 draw : line</pre>
<p>Save to render the North Yorkshire Moors Railway line.</p>
<p><a href="http://www.britishideas.com/wp-content/uploads/2011/01/mapfinal.jpg"><img class="aligncenter size-medium wp-image-320" title="Final Map in Maperitive" src="http://www.britishideas.com/wp-content/uploads/2011/01/mapfinal-300x213.jpg" alt="" width="300" height="213" /></a></p>
<p><strong>Export the Map</strong></p>
<p>To save the map as a bitmap enter the command:</p>
<pre class="brush: plain;">export-bitmap file=nymr.png scale=6</pre>
<p>Here is the final map (click to view):</p>
<p><a href="http://www.britishideas.com/wp-content/uploads/2011/01/nymr-web.jpg"><img class="aligncenter size-medium wp-image-322" title="Final Map" src="http://www.britishideas.com/wp-content/uploads/2011/01/nymr-web-176x300.jpg" alt="" width="176" height="300" /></a></p>
<p>Now you can edit it to add labels, borders, a compass rose, etc.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d293').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d293" style="overflow:hidden">
<br />
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d293').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.d293').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.britishideas.com/2011/01/16/so-you-want-to-be-a-cartographer/feed/</wfw:commentRss>
		<slash:comments>0</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>Getting US Government Shapefiles Into OpenStreetMap</title>
		<link>http://www.britishideas.com/2009/07/10/getting-us-government-shapefiles-into-openstreetmap/</link>
		<comments>http://www.britishideas.com/2009/07/10/getting-us-government-shapefiles-into-openstreetmap/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 17:28:42 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Mapping]]></category>
		<category><![CDATA[JOSM]]></category>
		<category><![CDATA[OpenStreetMap]]></category>

		<guid isPermaLink="false">http://www.britishideas.com/2009/07/10/getting-us-government-shapefiles-into-openstreetmap/</guid>
		<description><![CDATA[I recently embarked on the process of adding the shapefiles for Region 3 of the US Forest Service into OpenStreetMap (OSM). This post describes the method I used. First a bit of background.
OSM is a free street level map of the world. Just like Wikipedia is a encylopaedia that anyone can edit, OSM is a]]></description>
			<content:encoded><![CDATA[<p>I recently embarked on the process of adding the shapefiles for <a href="http://www.fs.fed.us/r3/" target="_blank">Region 3 of the US Forest Service</a> into <a href="http://www.openstreetmap.org" target="_blank">OpenStreetMap</a> (OSM). This post describes the method I used. First a bit of background.</p>
<p>OSM is a free street level map of the world. Just like Wikipedia is a encylopaedia that anyone can edit, OSM is a map that anyone can edit. The data is licensed under Creative Commons by attribution, which is a very liberal license.</p>
<p>In the US currently most of the data came from a mass import of the US Government&#8217;s <a href="http://www.census.gov/geo/www/tiger/" target="_blank">TIGER data</a>. This data has numerous problems, such as streets being in the wrong places and regions like forests are missing completely.</p>
<p>Fortunately some regions of the US Forest Service make good quality shapefiles available of the forest boundaries and I live in one of those regions &#8211; the Southwestern Region. It&#8217;s just a matter of converting the shapefiles into the correct format, adding some descriptions and uploading them to the OSM server.</p>
<p>There are several challenges with getting the data into OSM. Firstly the shapefiles are in the Lambert Conformal Conic projection, which is not what OSM uses. Secondly OSM doesn&#8217;t use Shape Files, it uses it&#8217;s own XML data format. Thirdly the data has to be &#8220;tagged&#8221; in the correct way for the forests to be rendered correctly. This becomes more complex if there are holes in the forest.</p>
<p>The first stage is to find the shapefiles and what projection they are in. In my case the US Forest Service provided the projection information with the data files. I then reprojected the data and converted to a OSM file format using the following steps:</p>
<ul>
<li>Open the shapefile in <a href="http://www.mapwindow.org/" target="_blank">MapWindow GIS</a></li>
<li>Use the GIS Tools menu to reproject the data to WGS84</li>
<li>Save</li>
<li>Open the reprojected data in <a href="http://www.gpstm.com/" target="_blank">GPS TrackMaker</a></li>
<li>Save as GPX file</li>
<li>Use <a href="http://www.gpsbabel.org/" target="_blank">GPSBabel</a> to convert from GPX to OSM</li>
</ul>
<p><code>gpsbabel -i gpx -f smallpiece.gpx -o osm -F smallpiece.osm</code></p>
<p>Currently the best editor to use for OSM is <a href="http://josm.openstreetmap.de/" target="_blank">JOSM</a>. This is a Java application that allows data to be added, edited, deleted and tagged. Don&#8217;t use the default memory allocation, instead allocate more using:</p>
<p><code>java -jar -Xmx256M josm-latest.jar</code></p>
<p>There are some essential plugins that are required. Install utilsplugin, validator and waydownloader. Here are the steps I used to edit and tag the data. There may be mistakes, so use at your own risk.</p>
<ul>
<li> Open in JOSM</li>
<li> Simplify using Shift-Y</li>
<li> Select all nodes in a single ring (closed loop) and choose Combine Way</li>
<li> Select all outer ways</li>
<li> Add way tags (see below)</li>
<li> Select all inner ways and delete all tags</li>
<li> Select all ways with no holes
<ul>
<li> Create a relation</li>
<li> Add the selected ways to the relation</li>
<li> To the left of the way in the dialog window set the role to &#8220;outer&#8221; for all ways. Click on each way to see which it is on the map</li>
<li> Add the tags for the relation (see below), setting the type to &#8220;boundary&#8221;</li>
</ul>
</li>
<li>Select each way with holes in turn, along with the holes
<ul>
<li>Create a relation</li>
<li>Add the selected ways to the relation</li>
<li> To the left of the way in the dialog window set the role to &#8220;outer&#8221; for outside rings. Set the role to &#8220;inner&#8221; for inside rings.</li>
<li> Add the tags for the relation (see below), setting the type to &#8220;multipolygon&#8221;</li>
</ul>
</li>
<li>Split large ways into smaller ways of 2,000 nodes or less</li>
<li> Validate and fix errors. Ignore warnings about unclosed ways.</li>
</ul>
<p>The tags I use for ways are:</p>
<ul>
<li> uuid: username_yyyymmddn</li>
<li> attribution: US Forest Service</li>
<li> boundary: national_park</li>
<li> landuse: forest</li>
<li> leisure: nature_reserve</li>
<li> name: Coronado National Forest (example)</li>
<li> wood: mixed</li>
</ul>
<p>The tags I use for relations are:</p>
<ul>
<li> uuid: username_yyyynnddn</li>
<li>name: Coronado National Forest (example)</li>
<li> landuse: forest</li>
<li> type: multipolygon (when there are holes)</li>
<li> type: boundary (where there are no holes)</li>
<li> boundary: national_park</li>
</ul>
<p>Do not add tags to inner ways or the nodes. GPSBabel automatically adds tags, so delete those.</p>
<p>The uuid&#8217;s are a unique identifer that I can use to search for this particular set of data later, if needed. It is constructed from my OSM user name, the date and the upload number for the day. For example:</p>
<p>FooBar_200907104</p>
<p>would be the fourth upload for July 10th 2009 by the user FooBar. I use this scheme because I can work out the uuid&#8217;s from just an upload date and it is very unlikely that someone else would use the exact same uuids.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d116').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark to:</em></strong></a>
<br />
<div class="d116" style="overflow:hidden">
<br />
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d116').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.d116').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.britishideas.com/2009/07/10/getting-us-government-shapefiles-into-openstreetmap/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

