Index: trunk/test/data/__files/README
===================================================================
--- trunk/test/data/__files/README	(revision 12557)
+++ trunk/test/data/__files/README	(revision 12557)
@@ -0,0 +1,1 @@
+The __files directory must be named this way in order to use WireMock, until https://github.com/tomakehurst/wiremock/issues/471 is fixed.
Index: trunk/test/data/__files/imagery/maps.xml
===================================================================
--- trunk/test/data/__files/imagery/maps.xml	(revision 12557)
+++ trunk/test/data/__files/imagery/maps.xml	(revision 12557)
@@ -0,0 +1,92 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<imagery xmlns="http://josm.openstreetmap.de/maps-1.0">
+	<entry>
+		<name>Landsat</name>
+		<id>landsat</id>
+		<type>wms</type>
+		<url><![CDATA[http://irs.gis-lab.info/?layers=landsat&SRS={proj}&WIDTH={width}&HEIGHT={height}&BBOX={bbox}]]></url>
+		<icon>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUTPmdaXSdnXUmdcyo9AbYLAAAAFklEQVQI12NYtYqBgYEI4v//0FAiCAA8TB/hMzHkwAAAAABJRU5ErkJggg==
+		</icon>
+		<projections>
+			<code>NASA:4326</code>
+			<code>EPSG:32641</code>
+			<code>EPSG:3857</code>
+			<code>EPSG:3785</code>
+			<code>EPSG:32642</code>
+			<code>EPSG:32640</code>
+			<code>EPSG:4326</code>
+			<code>EPSG:900913</code>
+			<code>EPSG:3395</code>
+			<code>EPSG:32639</code>
+			<code>EPSG:32638</code>
+			<code>EPSG:32637</code>
+			<code>EPSG:32636</code>
+			<code>EPSG:32635</code>
+		</projections>
+	</entry>
+	<entry>
+		<name>Bing aerial imagery</name>
+		<id>Bing</id>
+		<type>bing</type>
+		<default>true</default>
+		<url>http://www.bing.com/maps/</url>
+		<max-zoom>22</max-zoom>
+		<permission-ref>http://wiki.openstreetmap.org/wiki/Bing_Maps
+		</permission-ref>
+		<icon>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAALVBMVEUMhIT///8jj4/Z7Ozl8vJUqal/vr6+3t6Tycmo1NQxl5dutbXz+flBn5/M5eX9gIKtAAAAjUlEQVR4XmMgD6gFoQkoC7eiCQgKK6AJiNBEQGkBmoBW5S40LROFZyugCMQICloEIQuoCwoKCicgCbAJCgoKGiEJMCWjCTAwpaAJsBaiCnC1CCILCCslCwoKijQgVKQLCgoKliLcAQbWCqgCFgin6wkKCgqevIDwHO8cQUHxAAYkwFoonMSAArS7GCgAAKZlGg8L4DPrAAAAAElFTkSuQmCC
+		</icon>
+		<no-tile-header name="X-VE-Tile-Info" value="no-tile" />
+		<metadata-header header-name="X-VE-TILEMETA-CaptureDatesRange"
+			metadata-key="Capture Date" />
+	</entry>
+	<entry>
+		<name>Mapbox Satellite</name>
+		<id>Mapbox</id>
+		<default>true</default>
+		<type>tms</type>
+		<attribution-text mandatory="true">Terms &amp; Feedback
+		</attribution-text>
+		<attribution-url>http://www.mapbox.com/about/maps/</attribution-url>
+		<url>https://{switch:a,b,c}.tiles.mapbox.com/v4/openstreetmap.map-inh7ifmo/{zoom}/{x}/{y}.png?access_token=pk.eyJ1Ijoib3BlbnN0cmVldG1hcCIsImEiOiJncjlmd0t3In0.DmZsIeOW-3x-C5eX-wAqTw
+		</url>
+		<max-zoom>19</max-zoom>
+		<icon>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAhFBMVEVHcEz///9CZPtphPtFZ/uMof1KavvO0uJifvtQcPuLn/1ng/ve4euQnv36+vtIaPtXdfvt7vTr7PG2v+jl5/BaePuhrv1devugrOC7wNdxi/uap96uuOXKzeDc3/O9xuqfrfzY2+ilsOLEy+xEZfuQntuwttG+w9mpsM2Zp/x3j/t0jfvA+Y0kAAAAAXRSTlMAQObYZgAAASRJREFUeF6Fk+eSwyAMhC2Be+9Ob9fv/d/viBQgDLnx98cedi2JNQTPhHkqZSrC4CVZjYYo8+SzRAdZunqCHsmznuILUk/3HX79fPmMN7vE7XK2n5yAuTVI8KRm/qYATSd4L7R/rddH0i4VObjGPY9IGxYgfvbchRNTBq2PFQkxzvzCk6r8teFKy+0WcSHHjlbDIEdGtne5pIbzXlk2tCxMSFtQ9DMSvxeAwyOsN2RK6lD1jfLGALpCbQwfwPQYtWBnkKZFDEw1TkDkjxYCGZNi39HjhIQw2xzAoXhUDk1QnaMfG2RUkrVuYakWXuSoMzsk015H1GT2d7/HxTAUh69J8Mbt7w6+8V9K58j5JGuHdv3Yr18cy7Ry9RRZ5F1ej1D41/8P1QwO53k2L5oAAAAASUVORK5CYII=
+		</icon>
+		<permission-ref>http://wiki.openstreetmap.org/wiki/Vertical_Aerial_Photographs#DigitalGlobe_.2F_MapBox
+		</permission-ref>
+		<no-tile-header name="ETag"
+			value="&quot;067736a547cafe90014b4e59b6510abe&quot;|&quot;ee1f6802b0234046b553cbbc672ac7d9&quot;|&quot;9f5a2f1d7cc131e58befc2052c71c827&quot;" />
+		<no-tile-checksum type="MD5"
+			value="811bb5f56a0e672f674a2a820d340c61" />
+	</entry>
+	<entry>
+		<name>IGN orthophoto AMBA a (WMTS)</name>
+		<id>ign-amba-a</id>
+		<type>wmts</type>
+		<url>
+<![CDATA[
+https://ide.ign.gob.ar/geoservicios/rest/services/sensores_remotos/amba_a/ImageServer/WMTS?
+]]>
+		</url>
+		<permission-ref>http://www.ign.gob.ar/descargas/tyc1.html
+		</permission-ref>
+		<projections>
+			<code>CRS:84</code>
+			<code>EPSG:4326</code>
+			<code>EPSG:3857</code>
+			<code>EPSG:102100</code>
+		</projections>
+		<country-code>AR</country-code>
+		<bounds min-lat="-34.668416" min-lon="-59.251080" max-lat="-34.331591"
+			max-lon="-58.498165" />
+		<attribution-text>
+			Instituto Geográfico Nacional de la República Argentina
+		</attribution-text>
+		<attribution-url>http://www.ign.gob.ar</attribution-url>
+		<icon>
+			http://www.ign.gob.ar/sites/default/files/favicon.png
+		</icon>
+		<min-zoom>1</min-zoom>
+		<max-zoom>20</max-zoom>
+	</entry>
+</imagery>
Index: trunk/test/data/__files/imagery/wms-capabilities.xml
===================================================================
--- trunk/test/data/__files/imagery/wms-capabilities.xml	(revision 12557)
+++ trunk/test/data/__files/imagery/wms-capabilities.xml	(revision 12557)
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<WMS_Capabilities version="1.3.0"
+  xmlns="http://www.opengis.net/wms"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:esri_wms="http://www.esri.com/wms"
+  xsi:schemaLocation="http://www.opengis.net/wms http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd http://www.esri.com/wms http://maps.six.nsw.gov.au/arcgis/services/public/NSW_Imagery/MapServer/WmsServer?version=1.3.0%26service=WMS%26request=GetSchemaExtension">
+  <Service>
+    <Name><![CDATA[WMS]]></Name>
+    <Title>WMS</Title>
+    <Abstract><![CDATA[Progressively from scales larger than 1:150,000 higher resolution imagery overlays lower resolution imagery and most recent imagery overlays older imagery within each resolution.
+This service includes external imagery sourced from © AAM 2011,2012; © Jacobs Group Ausimage 2002,2006,2009,2014; © LANDSAT 2014
+Metadata_link http://sdi.nsw.gov.au/catalog/search/resource/details.page?uuid=%7BA9550CB1-5908-4A47-936F-64AE50405DF7%7D]]></Abstract>
+    <KeywordList><Keyword><![CDATA[]]></Keyword></KeywordList>
+    <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://maps.six.nsw.gov.au/arcgis/services/public/NSW_Imagery/MapServer/WmsServer?"/>
+    <ContactInformation>
+      <ContactPersonPrimary>
+        <ContactPerson><![CDATA[]]></ContactPerson>
+        <ContactOrganization><![CDATA[Land and Property Information NSW]]></ContactOrganization>
+      </ContactPersonPrimary>
+      <ContactPosition><![CDATA[Manager Spatial Data Services]]></ContactPosition>
+      <ContactAddress>
+        <AddressType><![CDATA[]]></AddressType>
+        <Address><![CDATA[346 Panorama Avenue]]></Address>
+        <City><![CDATA[Bathurst]]></City>
+        <StateOrProvince><![CDATA[NSW]]></StateOrProvince>
+        <PostCode><![CDATA[2795]]></PostCode>
+        <Country><![CDATA[Australia]]></Country>
+      </ContactAddress>
+      <ContactVoiceTelephone><![CDATA[02 63328200]]></ContactVoiceTelephone>
+      <ContactFacsimileTelephone><![CDATA[02 63328296]]></ContactFacsimileTelephone>
+      <ContactElectronicMailAddress><![CDATA[SDS.Services@lpi.nsw.gov.au]]></ContactElectronicMailAddress>
+    </ContactInformation>
+    <Fees><![CDATA[]]></Fees>
+    <AccessConstraints><![CDATA[]]></AccessConstraints>
+    <MaxWidth>4096</MaxWidth>
+    <MaxHeight>4096</MaxHeight>
+  </Service>
+  <Capability>
+    <Request>
+      <GetCapabilities>
+        <Format>application/vnd.ogc.wms_xml</Format>
+        <Format>text/xml</Format>
+        <DCPType>
+          <HTTP><Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://maps.six.nsw.gov.au/arcgis/services/public/NSW_Imagery/MapServer/WmsServer?"/></Get></HTTP>
+        </DCPType>
+      </GetCapabilities>
+      <GetMap>
+        <Format>image/bmp</Format>
+        <Format>image/jpeg</Format>
+        <Format>image/tiff</Format>
+        <Format>image/png</Format>
+        <Format>image/png8</Format>
+        <Format>image/png24</Format>
+        <Format>image/png32</Format>
+        <Format>image/gif</Format>
+        <Format>image/svg+xml</Format>
+        <DCPType>
+          <HTTP><Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://maps.six.nsw.gov.au/arcgis/services/public/NSW_Imagery/MapServer/WmsServer?"/></Get></HTTP>
+        </DCPType>
+      </GetMap>
+      <GetFeatureInfo>
+        <Format>application/vnd.esri.wms_raw_xml</Format>
+        <Format>application/vnd.esri.wms_featureinfo_xml</Format>
+        <Format>application/vnd.ogc.wms_xml</Format>
+        <Format>application/geojson</Format>
+        <Format>text/xml</Format>
+        <Format>text/html</Format>
+        <Format>text/plain</Format>
+        <DCPType>
+          <HTTP><Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://maps.six.nsw.gov.au/arcgis/services/public/NSW_Imagery/MapServer/WmsServer?"/></Get></HTTP>
+        </DCPType>
+      </GetFeatureInfo>
+      <esri_wms:GetStyles>
+        <Format>application/vnd.ogc.sld+xml</Format>
+        <DCPType>
+          <HTTP><Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://maps.six.nsw.gov.au/arcgis/services/public/NSW_Imagery/MapServer/WmsServer?"/></Get></HTTP>
+        </DCPType>
+      </esri_wms:GetStyles>
+    </Request>
+    <Exception>
+      <Format>application/vnd.ogc.se_xml</Format>
+      <Format>application/vnd.ogc.se_inimage</Format>
+      <Format>application/vnd.ogc.se_blank</Format>
+      <Format>text/xml</Format>
+      <Format>XML</Format>
+    </Exception>
+    <Layer>
+      <Title><![CDATA[NSW_Imagery]]></Title>
+<CRS>CRS:84</CRS>
+<CRS>EPSG:4326</CRS>
+<CRS>EPSG:3857</CRS>
+ <!-- alias 3857 -->
+<CRS>EPSG:102100</CRS>
+<EX_GeographicBoundingBox><westBoundLongitude>139.236629</westBoundLongitude><eastBoundLongitude>159.289947</eastBoundLongitude><southBoundLatitude>-38.351166</southBoundLatitude><northBoundLatitude>-26.603479</northBoundLatitude></EX_GeographicBoundingBox>
+<BoundingBox CRS="CRS:84" minx="139.236629" miny="-38.351166" maxx="159.289947" maxy="-26.603479"/>
+<BoundingBox CRS="EPSG:4326" minx="-38.351166" miny="139.236629" maxx="-26.603479" maxy="159.289947"/>
+<BoundingBox CRS="EPSG:3857" minx="15499750.634300" miny="-4629153.206800" maxx="17732075.828300" maxy="-3074018.396000"/>
+      <Layer queryable="1">
+        <Name>BestImageryDates</Name>
+        <Title><![CDATA[BestImageryDates]]></Title>
+        <Abstract><![CDATA[]]></Abstract>
+<CRS>CRS:84</CRS>
+<CRS>EPSG:4326</CRS>
+<CRS>EPSG:3857</CRS>
+ <!-- alias 3857 -->
+<CRS>EPSG:102100</CRS>
+<EX_GeographicBoundingBox><westBoundLongitude>139.236629</westBoundLongitude><eastBoundLongitude>159.289947</eastBoundLongitude><southBoundLatitude>-38.351166</southBoundLatitude><northBoundLatitude>-26.603479</northBoundLatitude></EX_GeographicBoundingBox>
+<BoundingBox CRS="CRS:84" minx="139.236629" miny="-38.351166" maxx="159.289947" maxy="-26.603479"/>
+<BoundingBox CRS="EPSG:4326" minx="-38.351166" miny="139.236629" maxx="-26.603479" maxy="159.289947"/>
+<BoundingBox CRS="EPSG:3857" minx="15499750.634300" miny="-4629153.206800" maxx="17732075.828300" maxy="-3074018.396000"/>
+        <Style>
+          <Name>default</Name>
+          <Title>BestImageryDates</Title>
+          <LegendURL width="16" height="16">
+            <Format>image/png</Format>
+            <OnlineResource xlink:href="http://maps.six.nsw.gov.au/arcgis/services/public/NSW_Imagery/MapServer/WmsServer?request=GetLegendGraphic%26version=1.3.0%26format=image/png%26layer=BestImageryDates" xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" />
+          </LegendURL>
+        </Style>
+      </Layer>
+    </Layer>
+  </Capability>
+</WMS_Capabilities>
Index: trunk/test/data/__files/nominatim/London.xml
===================================================================
--- trunk/test/data/__files/nominatim/London.xml	(revision 12557)
+++ trunk/test/data/__files/nominatim/London.xml	(revision 12557)
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<searchresults timestamp='Tue, 01 Aug 17 19:44:23 +0000'
+	attribution='Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright'
+	querystring='London' polygon='false'
+	exclude_place_ids='172886376,4363712,171577264,393695,173598423,173598634,173598624,173495610,433519,361768,434160'
+	more_url='https://nominatim.openstreetmap.org/search.php?q=London&amp;exclude_place_ids=172886376%2C4363712%2C171577264%2C393695%2C173598423%2C173598634%2C173598624%2C173495610%2C433519%2C361768%2C434160&amp;format=xml&amp;accept-language=fr-FR%2Cfr%3Bq%3D0.8%2Cen-US%3Bq%3D0.6%2Cen%3Bq%3D0.4'>
+	<place place_id='172886376' osm_type='relation' osm_id='65606'
+		place_rank='16' boundingbox="51.2867602,51.6918741,-0.5103751,0.3340155"
+		lat='51.5073219' lon='-0.1276474' display_name='Londres, Grand Londres, Angleterre, Royaume-Uni'
+		class='place' type='city' importance='0.8654895765402'
+		icon='https://nominatim.openstreetmap.org/images/mapicons/poi_place_city.p.20.png' />
+	<place place_id='4363712' osm_type='node' osm_id='485248691'
+		place_rank='16' boundingbox="42.828576,43.148576,-81.406643,-81.086643"
+		lat='42.988576' lon='-81.246643' display_name='London, Ontario, Canada'
+		class='place' type='city' importance='0.6515723047601'
+		icon='https://nominatim.openstreetmap.org/images/mapicons/poi_place_city.p.20.png' />
+	<place place_id='171577264' osm_type='relation' osm_id='130591'
+		place_rank='16' boundingbox="37.079759,37.15226,-84.126262,-84.035957"
+		lat='37.1289771' lon='-84.0832646'
+		display_name='London, Laurel County, Kentucky, États-Unis d&#039;Amérique'
+		class='place' type='city' importance='0.50529223844486'
+		icon='https://nominatim.openstreetmap.org/images/mapicons/poi_place_city.p.20.png' />
+	<place place_id='393695' osm_type='node' osm_id='153408665'
+		place_rank='19' boundingbox="43.0277775,43.0677775,-89.0328881,-88.9928881"
+		lat='43.0477775' lon='-89.0128881'
+		display_name='London, Dane County, Wisconsin, États-Unis d&#039;Amérique'
+		class='place' type='hamlet' importance='0.457828369551'
+		icon='https://nominatim.openstreetmap.org/images/mapicons/poi_place_village.p.20.png' />
+	<place place_id='173598423' osm_type='relation' osm_id='182481'
+		place_rank='16' boundingbox="39.85928,39.921786,-83.478923,-83.389997"
+		lat='39.8864493' lon='-83.448253'
+		display_name='London, Madison County, Ohio, États-Unis d&#039;Amérique'
+		class='place' type='city' importance='0.44543898169688'
+		icon='https://nominatim.openstreetmap.org/images/mapicons/poi_place_city.p.20.png' />
+	<place place_id='173598634' osm_type='relation' osm_id='2730965'
+		place_rank='19' boundingbox="36.4734452,36.4884367,-119.4497699,-119.4385395"
+		lat='36.4760619' lon='-119.4431785'
+		display_name='London, Tulare County, Californie, États-Unis d&#039;Amérique'
+		class='place' type='village' importance='0.42045232539126'
+		icon='https://nominatim.openstreetmap.org/images/mapicons/poi_place_village.p.20.png' />
+	<place place_id='173495610' osm_type='relation' osm_id='111457'
+		place_rank='16' boundingbox="35.315577,35.33814,-93.272693,-93.187375"
+		lat='35.328973' lon='-93.2529553'
+		display_name='London, Pope County, Arkansas, États-Unis d&#039;Amérique'
+		class='place' type='city' importance='0.4184484386218'
+		icon='https://nominatim.openstreetmap.org/images/mapicons/poi_place_city.p.20.png' />
+	<place place_id='433519' osm_type='node' osm_id='154301303'
+		place_rank='19' boundingbox="38.1743567,38.2143567,-81.3886944,-81.3486944"
+		lat='38.1943567' lon='-81.3686944'
+		display_name='London, Kanawha County, Virginie-Occidentale, États-Unis d&#039;Amérique'
+		class='place' type='hamlet' importance='0.41707848858916'
+		icon='https://nominatim.openstreetmap.org/images/mapicons/poi_place_village.p.20.png' />
+	<place place_id='361768' osm_type='node' osm_id='151379108'
+		place_rank='19' boundingbox="32.2109892,32.2509892,-94.9643839,-94.9243839"
+		lat='32.2309892' lon='-94.9443839'
+		display_name='London, Rusk County, Texas, États-Unis d&#039;Amérique'
+		class='place' type='hamlet' importance='0.385'
+		icon='https://nominatim.openstreetmap.org/images/mapicons/poi_place_village.p.20.png' />
+	<place place_id='434160' osm_type='node' osm_id='154083583'
+		place_rank='19' boundingbox="40.8903338,40.9303338,-82.6493412,-82.6093412"
+		lat='40.9103338' lon='-82.6293412'
+		display_name='London, Cass Township, Richland County, Ohio, États-Unis d&#039;Amérique'
+		class='place' type='hamlet' importance='0.385'
+		icon='https://nominatim.openstreetmap.org/images/mapicons/poi_place_village.p.20.png' />
+</searchresults>
Index: trunk/test/data/__files/nominatim/foo-bar-baz-does-not-exist.xml
===================================================================
--- trunk/test/data/__files/nominatim/foo-bar-baz-does-not-exist.xml	(revision 12557)
+++ trunk/test/data/__files/nominatim/foo-bar-baz-does-not-exist.xml	(revision 12557)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<searchresults timestamp='Tue, 01 Aug 17 20:32:17 +0000'
+	attribution='Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright'
+	querystring='foo-bar-baz-does-not-exist' polygon='false'
+	more_url='https://nominatim.openstreetmap.org/search.php?q=foo-bar-baz-does-not-exist&amp;format=xml&amp;accept-language=fr-FR%2Cfr%3Bq%3D0.8%2Cen-US%3Bq%3D0.6%2Cen%3Bq%3D0.4'>
+</searchresults>
Index: trunk/test/data/__files/presets/Presets_BicycleJunction-preset.xml
===================================================================
--- trunk/test/data/__files/presets/Presets_BicycleJunction-preset.xml	(revision 12557)
+++ trunk/test/data/__files/presets/Presets_BicycleJunction-preset.xml	(revision 12557)
@@ -0,0 +1,120 @@
+<presets xmlns="http://josm.openstreetmap.de/tagging-preset-1.0"
+         author="Adiac"
+         description="Bicycle network related waypoints"
+         shortdescription="Bicycle waypoints"
+         version="1.3_2012-11-27">
+	<group name="Bicyclejunction" de.name="Fahrradknotenpunkt">
+		<item name="International (icn): Guidepost" de.name="International (icn): Wegweiser" type="node">
+			<label text="International (icn): Guidepost" de.text="International (icn): Wegweiser" />
+			<key key="tourism" value="information" />
+			<key key="information" value="guidepost" />
+			<key key="network" value="icn" />
+			<key key="bicycle" value="yes" />
+			<key key="icn" value="yes" />
+			<text key="icn_ref" text="Junctionnr." de.text="Knotenpunkt-Nr." />
+			<text key="note" text="Note" de.text="Bemerkung" default="Fahrradknotenpunkt ##" />
+			<link href="http://wiki.openstreetmap.org/wiki/Radverkehrsnetz_NRW#Beispiel" />
+		</item>
+		<item name="International (icn): Map" de.name="International (icn): Karte" type="node">
+			<label text="International (icn): Map" de.text="International (icn): Karte" />
+			<key key="tourism" value="information" />
+			<key key="information" value="map" />
+			<key key="network" value="icn" />
+			<key key="bicycle" value="yes" />
+			<combo key="map_size" text="Mapsize" de.text="Kartengröße" values="site,city,region" default="" delete_if_empty="true" />
+			<combo key="map_type" text="Maptype" de.text="Kartentyp" values="topo,street,scheme" default="" delete_if_empty="true" />
+			<link href="http://wiki.openstreetmap.org/wiki/Radverkehrsnetz_NRW#Beispiel" />
+		</item>
+		<item name="Local (lcn): Guidepost" de.name="Lokal (lcn): Wegweiser" type="node">
+			<label text="Local (lcn): Guidepost" de.text="Lokal (lcn): Wegweiser" />
+			<key key="tourism" value="information" />
+			<key key="information" value="guidepost" />
+			<key key="network" value="lcn" />
+			<key key="bicycle" value="yes" />
+			<key key="lcn" value="yes" />
+			<text key="lcn_ref" text="Junctionnr." de.text="Knotenpunkt-Nr." />
+			<text key="note" text="Note" de.text="Bemerkung" default="Fahrradknotenpunkt ##" />
+			<link href="http://wiki.openstreetmap.org/wiki/Radverkehrsnetz_NRW#Beispiel" />
+		</item>
+		<item name="Local (lcn): Map" de.name="Lokal (lcn): Karte " type="node">
+			<label text="Local (lcn): Map" de.text="Lokal (lcn): Karte" />
+			<key key="tourism" value="information" />
+			<key key="information" value="map" />
+			<key key="network" value="lcn" />
+			<key key="bicycle" value="yes" />
+			<combo key="map_size" text="Mapsize" de.text="Kartengröße" values="site,city,region" default="" delete_if_empty="true" />
+			<combo key="map_type" text="Maptype" de.text="Kartentyp" values="topo,street,scheme" default="" delete_if_empty="true" />
+			<link href="http://wiki.openstreetmap.org/wiki/Radverkehrsnetz_NRW#Beispiel" />
+		</item>
+		<item name="National (ncn): Guidepost" de.name="National (ncn): Wegweiser" type="node">
+			<label text="National (ncn): Guidepost" de.text="National (ncn): Wegweiser" />
+			<key key="tourism" value="information" />
+			<key key="information" value="guidepost" />
+			<key key="network" value="ncn" />
+			<key key="bicycle" value="yes" />
+			<key key="ncn" value="yes" />
+			<text key="ncn_ref" text="Junctionnr." de.text="Knotenpunkt-Nr." />
+			<text key="note" text="Note" de.text="Bemerkung" default="Fahrradknotenpunkt ##" />
+			<link href="http://wiki.openstreetmap.org/wiki/Radverkehrsnetz_NRW#Beispiel" />
+		</item>
+		<item name="National (ncn): Map" de.name="National (ncn): Karte" type="node">
+			<label text="National (ncn): Map" de.text="National (ncn): Karte" />
+			<key key="tourism" value="information" />
+			<key key="information" value="map" />
+			<key key="network" value="ncn" />
+			<key key="bicycle" value="yes" />
+			<combo key="map_size" text="Mapsize" de.text="Kartengröße" values="site,city,region" default="" delete_if_empty="true" />
+			<combo key="map_type" text="Maptype" de.text="Kartentyp" values="topo,street,scheme" default="" delete_if_empty="true" />
+			<link href="http://wiki.openstreetmap.org/wiki/Radverkehrsnetz_NRW#Beispiel" />
+		</item>
+		<item name="Regional (rcn): Guidepost" de.name="Regional (rcn): Wegweiser" type="node">
+			<label text="Regional (rcn): Guidepost" de.text="Regional (rcn): Wegweiser" />
+			<key key="tourism" value="information" />
+			<key key="information" value="guidepost" />
+			<key key="network" value="rcn" />
+			<key key="bicycle" value="yes" />
+			<key key="rcn" value="yes" />
+			<text key="rcn_ref" text="Junctionnr." de.text="Knotenpunkt-Nr." />
+			<text key="note" text="Note" de.text="Bemerkung" default="Fahrradknotenpunkt ##" />
+			<link href="http://wiki.openstreetmap.org/wiki/Radverkehrsnetz_NRW#Beispiel" />
+		</item>
+		<item name="Regional (rcn): Map" de.name="Regional (rcn): Karte" type="node">
+			<label text="Regional (rcn): Map" de.text="Regional (rcn): Karte" />
+			<key key="tourism" value="information" />
+			<key key="information" value="map" />
+			<key key="network" value="rcn" />
+			<key key="bicycle" value="yes" />
+			<combo key="map_size" text="Mapsize" de.text="Kartengröße" values="site,city,region" default="" delete_if_empty="true" />
+			<combo key="map_type" text="Maptype" de.text="Kartentyp" values="topo,street,scheme" default="" delete_if_empty="true" />
+			<link href="http://wiki.openstreetmap.org/wiki/Radverkehrsnetz_NRW#Beispiel" />
+		</item>
+	</group>
+        <item name="LF bicycle relation ncn" type="relation"
+            name_template="route(?{'{network} '}?{'{ref} '}?{'{name} '}?{'{from} - {via} - {to} ' | '{from} - {to} ' | '{from} ' | '{to} '}?{'{note} '})"
+            name_template_filter="type=route network=ncn route=bicycle">
+        </item>
+        <item name="Node Network Route relation" type="relation"
+            name_template="route(?{'{network} '}!{parent() type=network(network=rcn|network=rwn|network=rhn)'?{'{ref}' | ''}'}?{'{ref} '}?{'{note} '}?{'{name}'}"
+            name_template_filter="type=route (route=bicycle | route=foot | route = hiking | route = walking | route = horse)">
+        </item>
+        <item name="Node Network Network relation" type="relation"
+            name_template="network(rcn ?{'{addr:country} '}?{'{addr:province} '}?{'{name}'}"
+            name_template_filter="type=network network=rcn">
+        </item>
+        <item name="Node Network node" type="node"
+            name_template="?{'FKp {rcn_ref}'}?{' / WKp {rwn_ref}'}"
+            name_template_filter="type:node rcn_ref rwn_ref">
+        </item>
+        <item name="Node Network node" type="node"
+            name_template="FKp {rcn_ref}"
+            name_template_filter="type:node rcn_ref">
+        </item>
+        <item name="Node Network node" type="node"
+            name_template="WKp {rwn_ref}"
+            name_template_filter="type:node rwn_ref">
+        </item>
+        <item name="Node Network node" type="node"
+            name_template="PKp {rhn_ref}"
+            name_template_filter="type:node rhn_ref">
+        </item>
+</presets>
Index: trunk/test/data/__files/samples/data.gpx
===================================================================
--- trunk/test/data/__files/samples/data.gpx	(revision 12557)
+++ trunk/test/data/__files/samples/data.gpx	(revision 12557)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gpx xmlns="http://www.topografix.com/GPX/1/0" xmlns:osm="http://www.openstreetmap.org" version="1.0" creator="JOSM">
+  <trk>
+    <name>105241</name>
+    <extensions>
+      <osm:property key="trkseg" value="&#xA;      &#xA;        146791&#xA;      &#xA;      &#xA;        146797&#xA;      &#xA;    " />
+    </extensions>
+    <trkseg>
+      <trkpt lat="48.08120346069336" lon="11.736961364746094">
+        <name>146791</name>
+      </trkpt>
+      <trkpt lat="48.07872009277344" lon="11.734161376953125">
+        <name>146797</name>
+      </trkpt>
+    </trkseg>
+  </trk>
+  <trk>
+    <name>85964</name>
+    <extensions>
+      <osm:property key="trkseg" value="&#xA;      &#xA;        128286&#xA;      &#xA;      &#xA;        128287&#xA;      &#xA;    " />
+    </extensions>
+    <trkseg>
+      <trkpt lat="48.155582427978516" lon="11.422438621520996">
+        <name>128286</name>
+      </trkpt>
+      <trkpt lat="48.1555061340332" lon="11.422523498535156">
+        <name>128287</name>
+      </trkpt>
+    </trkseg>
+  </trk>
+  <wpt lat="48.17121887207031" lon="11.717523574829102" />
+  <wpt lat="48.17500686645508" lon="11.753143310546875" />
+  <wpt lat="48.176429748535156" lon="11.752127647399902" />
+  <wpt lat="48.1754264831543" lon="11.754337310791016" />
+  <wpt lat="48.174217224121094" lon="11.424162864685059">
+    <name>128957</name>
+  </wpt>
+</gpx>
Index: trunk/test/data/__files/samples/data.osm
===================================================================
--- trunk/test/data/__files/samples/data.osm	(revision 12557)
+++ trunk/test/data/__files/samples/data.osm	(revision 12557)
@@ -0,0 +1,70 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<osm version='0.6' upload='never' generator='JOSM'>
+  <node id='-27' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.47771177330651926' lon='-1.214837040993729' />
+  <node id='-13' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4770456414460069' lon='-1.2128480891895201' />
+  <node id='-96' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4764633314455231' lon='-1.2128409733562326' />
+  <node id='-97' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4758285965581824' lon='-1.2099736236471972' />
+  <node id='-26' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4792876662805732' lon='-1.2169820812340761' />
+  <node id='-19' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.48036950894773345' lon='-1.2131904879318611' />
+  <node id='-14' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4791657020375284' lon='-1.2102793618913894' />
+  <node id='-12' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4798004366165714' lon='-1.213146711600425' />
+  <node id='-10' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.47936268863731496' lon='-1.213146711600425' />
+  <node id='-17' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4813140315130982' lon='-1.2101234506227323' />
+  <node id='-18' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.48267104976957914' lon='-1.213034576663203' />
+  <node id='-15' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4822989641455303' lon='-1.2129689121660499' />
+  <node id='-11' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.48166422979871726' lon='-1.2101015624570148' />
+  <node id='-32' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4751195493564001' lon='-1.2048370205367955' />
+  <node id='-99' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4745372391933516' lon='-1.2048299047035078' />
+  <node id='-36' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.47669544292428195' lon='-1.2069820607771429' />
+  <node id='-24' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4774365971965075' lon='-1.2051356429477' />
+  <node id='-21' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.47693318684453173' lon='-1.2051794192791356' />
+  <node id='-22' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4778743452986904' lon='-1.2051356429477' />
+  <node id='-98' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4761131328941895' lon='-1.2069749449438552' />
+  <node id='-29' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4800226751795712' lon='-1.204979731679043' />
+  <node id='-34' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4803728735314377' lon='-1.2049578435133252' />
+  <node id='-30' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4800193105956951' lon='-1.2073244595194834' />
+  <node id='-25' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.47850907999728337' lon='-1.207324459519483' />
+  <node id='-23' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4784434177898294' lon='-1.2051794192791356' />
+  <node id='-33' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.479450238235392' lon='-1.2072806831880476' />
+  <node id='-35' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4790124902337393' lon='-1.2072806831880474' />
+  <node id='-37' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.48136874999641444' lon='-1.2036554976531113' />
+  <node id='-44' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.48171894827922374' lon='-1.2036336094873938' />
+  <node id='-45' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4820910339349863' lon='-1.2036992739845465' />
+  <node id='-38' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4819487658925157' lon='-1.2071028837536724' />
+  <node id='-40' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.482320851535727' lon='-1.2071685482508254' />
+  <node id='-42' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4822551893648863' lon='-1.204979731679043' />
+  <node id='-43' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4807449592606228' lon='-1.2050235080104783' />
+  <node id='-39' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4828461488797523' lon='-1.205089172507632' />
+  <node id='-41' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4815985676215157' lon='-1.20712477191939' />
+  <node id='-51' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4807340155630004' lon='-1.2007881479440765' />
+  <node id='-47' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.48136874999640183' lon='-1.1977675810750161' />
+  <node id='-48' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4810842138783876' lon='-1.2007662597783586' />
+  <node id='-46' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.48174083567128484' lon='-1.1978332455721696' />
+  <node id='-49' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.48101855169561025' lon='-1.1977894692407338' />
+  <node id='-50' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.48145629956880753' lon='-1.200831924275512' />
+  <node id='-54' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.47960857628212794' lon='-1.1959762749469767' />
+  <node id='-53' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4797928575014292' lon='-1.1956225408346692' />
+  <node id='-55' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4824972674572115' lon='-1.1959611311835499' />
+  <node id='-52' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4801649432621869' lon='-1.195688205331822' />
+  <node id='-60' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.48479412617580425' lon='-1.2101234506227323' />
+  <node id='-65' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.48477223879355674' lon='-1.2131002411603569' />
+  <node id='-62' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4841375046778457' lon='-1.2102328914513212' />
+  <node id='-63' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.48542886022998155' lon='-1.2129908003317675' />
+  <node id='-57' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.48354654527531427' lon='-1.210123450622732' />
+  <node id='-64' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4841812794463481' lon='-1.2129908003317675' />
+  <node id='-56' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.48507866213848755' lon='-1.20712477191939' />
+  <node id='-58' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.48442204066808775' lon='-1.2072342127479787' />
+  <node id='-67' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.48442335747002924' lon='-1.2039721998362745' />
+  <node id='-66' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.48407315932651057' lon='-1.1981061714238967' />
+  <node id='-68' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4837886233216322' lon='-1.201104850127239' />
+  <node id='-59' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.4838310812903243' lon='-1.2071247719193896' />
+  <node id='-61' timestamp='2010-01-24T10:28:01Z' visible='true' lat='0.48350277050269397' lon='-1.204979731679043' />
+  <way id='-69' action='modify' timestamp='2010-01-24T10:28:01Z' visible='true'>
+    <nd ref='-65' />
+    <nd ref='-62' />
+    <nd ref='-58' />
+    <nd ref='-39' />
+    <tag k='highway' v='residential' />
+    <tag k='oneway' v='yes' />
+  </way>
+</osm>
Index: trunk/test/data/__files/samples/data.osn
===================================================================
--- trunk/test/data/__files/samples/data.osn	(revision 12557)
+++ trunk/test/data/__files/samples/data.osn	(revision 12557)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<osm-notes>
+<note id="4" lat="36.7232991" lon="68.8641500" created_at="2013-04-24T08:07:02Z" closed_at="2013-04-24T08:08:51Z">
+  <comment action="opened" timestamp="2013-04-24T08:07:02Z" uid="1626" user="FredB">test</comment>
+  <comment action="closed" timestamp="2013-04-24T08:08:51Z" uid="1626" user="FredB"></comment>
+</note>
+<note id="5" lat="51.7609210" lon="-0.0112063" created_at="2013-04-24T08:10:38Z" closed_at="2013-04-24T21:31:47Z">
+  <comment action="opened" timestamp="2013-04-24T08:10:38Z" uid="3980" user="TomH">This building has been demolished and is currently a construction site.</comment>
+  <comment action="closed" timestamp="2013-04-24T21:31:47Z" uid="3980" user="TomH"></comment>
+</note>
+<note id="6" lat="35.5170066" lon="139.6322554" created_at="2013-04-24T08:12:38Z" closed_at="2013-05-10T12:28:11Z">
+  <comment action="opened" timestamp="2013-04-24T08:12:38Z" uid="378532" user="nyampire">Ministopは閉店済み</comment>
+  <comment action="closed" timestamp="2013-05-10T12:28:11Z" uid="10353" user="gorn">name corrected</comment>
+</note>
+<note id="7" lat="50.9381992" lon="1.8605947" created_at="2013-04-24T08:14:28Z" closed_at="2013-04-24T08:14:50Z">
+  <comment action="opened" timestamp="2013-04-24T08:14:28Z">Adresse complète :
+B&amp;B CALAIS Centre St Pierre 	 
+ZAC Curie
+Rue de Lille
+62100 CALAIS
+Tel. 08 92 70 75 18 (0.34€ TTC/mn depuis un poste fixe)
+Fax. 03 21 00 92 71
+Parking, accès handicapé, wifi, ascenseur, caméra</comment>
+  <comment action="closed" timestamp="2013-04-24T08:14:50Z" uid="37548" user="Marcussacapuces91"></comment>
+</note>
+<note id="289379" lat="50.3699789" lon="8.6278027" created_at="2014-12-21T01:30:26Z">
+  <comment action="opened" timestamp="2014-12-21T01:30:26Z">Freizeitheim Uhu</comment>
+</note>
+<note id="289380" lat="48.5979475" lon="-2.1622145" created_at="2014-12-21T01:51:36Z">
+  <comment action="opened" timestamp="2014-12-21T01:51:36Z">parking</comment>
+</note>
+<note id="289381" lat="49.8535075" lon="20.9857535" created_at="2014-12-21T02:14:51Z" closed_at="2014-12-21T02:16:33Z">
+  <comment action="opened" timestamp="2014-12-21T02:14:51Z">to nie ścieżka</comment>
+  <comment action="closed" timestamp="2014-12-21T02:16:33Z" uid="163896" user="Zbigniew_Czernik">zgadza się</comment>
+</note>
+<note id="289382" lat="49.8537980" lon="20.9873736" created_at="2014-12-21T02:15:04Z">
+  <comment action="opened" timestamp="2014-12-21T02:15:04Z">to nie ścieżka</comment>
+</note>
+<note id="289383" lat="49.8525390" lon="20.9827387" created_at="2014-12-21T02:15:23Z" closed_at="2014-12-21T02:18:01Z">
+  <comment action="opened" timestamp="2014-12-21T02:15:23Z">o to za droga i dlaczego brak jej oznaczenia w legendzie?</comment>
+  <comment action="closed" timestamp="2014-12-21T02:18:01Z" uid="163896" user="Zbigniew_Czernik">bo legenda jest stara i nieaktualna. To jest droga lokalna.</comment>
+</note>
+</osm-notes>
