Remapping/Potlatch 2 vector background layers
You can use Potlatch 2's vector background layers to speed remapping, by pulling through data (from a compatible source) as one of the tools in your mapping. On this page we'll explain how to do it with an example in the South-West of England.
- 1 What's a vector background layer?
- 2 An example: the South-West of England
- 3 Setting other areas up yourself
- 4 Help!
What's a vector background layer?
Map data from third-party files that is loaded into the background. You can "pull it through" to the main map, tidy it up, and then save it.
These files might have their own tags that you want to automatically translate into OSM tags. You can do this by supplying a MapCSS file with the translations in.
An example: the South-West of England
South-West England (Cornwall and Devon) has a high number of 'declined' roads. Many of these were traced from old, out-of-copyright maps. Better-quality data is now available as part of the Ordnance Survey OpenData release. We can use that to replace the old, declined roads.
Loading the tag translations
First of all, we want to load a file that tells Potlatch 2 how to translate OS OpenData attributes into OSM tags. Open Potlatch 2 for the right area, click 'Background' (top right) and then 'Vector file...'.
Paste this into the 'Tag transform' input box:
and click 'Load'. Keep this window open.
Loading the data
- Use this webpage to find out the file to load: http://geowiki.com/os.cgi . Enter a placename near where you're editing, and copy the URL it gives you (beginning "http://richard.dev...")
- Paste the URL into the 'URL' input box in the Potlatch 2 'Vector file' window, and click 'Load'.
- The data will load. You'll see it appear as a new layer in the table. Using the drop-down menu, change its style from 'Potlatch' to 'GPS' so it shows up better. You can now close the 'Vector file' window.
Working with the data
The data is now in the background. Your task is now to incorporate it into the map as you see fit. Using Potlatch 2's 'Options' window, make sure that 'Show licence status' is ticked. This will show any data that will be lost at licence change with a deep red highlight. (Light orange is for mappers who haven't decided yet.)
- To replace a road, you'll probably want to begin by deleting the old one (check if it's part of any cycle routes or other relations before you do so, and make a note of them to add back afterwards if so).
- The background data will show up beneath it as a thin cyan line. Pull this through by alt-clicking it.
- Adjust the ends of the road, and any intermediate junctions, to make sure they join up. Check the tags are appropriate. Use background imagery (e.g. Bing or OS StreetView) and your own local knowledge to add extra details. Remember, there's no point in OSM if it's just a carbon copy of the OS data, so make it as good as you can.
That's all there is to it!
Working efficiently - tips and tricks
- Shift-alt-click will bring a road through and keep the current road selected. Use this to good advantage by doing each section of a road in turn, then pressing 'J' (Join) to merge them all into one road.
- When a node is selected, use 'J' to make a junction with nearby ways.
- If you have a Linux system which doesn't let you alt-click, you could try shift-ctrl-click.
Setting other areas up yourself
The richard.dev.openstreetmap.org site has data for the South-West of England, but you may want to remap other parts of the UK or indeed the world. As ever, make sure your intended source's licence is compatible.
What data can you use?
Potlatch 2 can load the following types of files:
- Shapefiles (.shp/.dbf/.shx formats)
- GPX files
- .osm files
- .kml files
Files must be hosted on a webserver. There is currently no facility to load them from your local hard drive. The webserver will also need a 'crossdomain.xml' file at its root level to tell Flash it's ok to load files from there. You can copy such a file from .
Files should remain fairly small. The original OS OpenData VectorMap District files, for example, are too big at 100km x 100km. I used ogr2ogr to split them up into 10km x 10km files for Devon and Cornwall and reproject them. If you want to split the files yourself, see here.
What other areas are already available?
The OS Opendata Vectormap Road tiles TQ and SU are available at http://www.loach.me.uk/os/ (like the South-West of England tiles are available at http://richard.dev.openstreetmap.org/os/ ), split to 10km x 10km squares using the instructions mentioned above. You can use the same tag transform file mentioned in the South-West area example above.
Please ask on IRC if you're having problems.