OslVosm

From OpenStreetMap Wiki
Jump to: navigation, search

OslVosm (http://osm.tiiiim.com/oslVosm ) is a script developed to compare the OS Locator (OSL) data to the OpenStreetMap (OSM) data for a particular area. It is not recommended to use this script to compare the entire UK OSM database - for such a script, please see http://humanleg.org.uk/code/oslmusicalchairs.

Contents

About OS Locator

OS Locator is a file with a list of road names and positions for the UK. These road names, amongst other things, have waypoints for their centroid. The road names can be compared with data in the OSM database, highlighting the following issues:

OslVosm will perform these comparisons on a particular area.

Prerequisites

This script has been tested using Ubuntu 9.04. It requires the following:

Preparation

Before using this script, the raw OSL data file must be massaged to provide only the road names for the particular area in which we're interested. This is done using the same method as described on the OS_Locator page. Note that this only needs to be done once every time the OS Locator data is updated - it does not need to be done every time this script is run!

Script

Download

Old updates


Once downloaded, it must be made executable:

chmod +x oslVosm

Usage

./oslVosm osm_data.osm osl_data.gpx --gpx
./oslVosm osm_data.osm osl_data.gpx --gpx --kml --wiki
./oslVosm osl_data.GPX --gpx --kml --wiki

Manually downloading OSM data

Normally, you can just provide the script with the OSL GPX file, and the script will download the relevant OSM data for the same bounding box. If you know the bounding box you want to compare and want to download it manually, use wget as follows (for Bath):

wget http://api.openstreetmap.org/api/0.6/map?bbox=-2.45299059999,51.33705469999,-2.2772094,51.4249453 -O Bath_Data.osm

Script workings

OSM way bounding box

For each OSM way, all of its constituent nodes are collected. The latitude and longitude values of each node are compared to each other node to provide the minimum and maximum latitude and longitude values of the way, and thus the bounding box. A little bit extra (~15 metres) is added to each bound for a slight 'fudge-factor'.

Special cases

The word 'Saint' may have been abbreviated in the OSL data. According to Editing Standards and Conventions#Street Names, all occurrences of 'Saint' must not be abbreviated, so all OSL roads with 'St' or 'St.' at the start of their names are expanded to 'Saint' (it is assumed that no road name begins with St or St. = Street!). All abbreviated forms of 'St' and 'St.' in the OSM data are left alone, as these are then assumed to be spelling errors.

Ignoring some discrepancies

Say a road in the OSL data is Michaels Way. However, in OSM it is Michael's Way - this has been verified by surveying the area and checking the street signs. In order for the script to not output this road as one which has an incorrect name, ITO are using the not:name= tag, into which would go the OSL name. oslVosm will pick up those highways with a not:name= tag and not include them in any of the comparisons.

The old method of ignoring OSM ways was to add osl_ignore to the the note= tag. The script will strip the punctuation and spaces from the two road names, compare them and if a 100% match is found (a location match must also be found) then the OSL spelling will be ignored, and the OSM data presumed correct. This is still currently supported, but it's best to move over to the not:name= convention as future releases of oslVosm will no longer support note=osl_ignore.

Script output files

Other features

Script processing time

For an area the size of Bath, with 2486 OSM ways, the script takes around 20 seconds to compare all the OSM data to the OSL data, and provide the requested files.

Personal tools
Namespaces
Variants
Actions
site
Toolbox