Remove pythonese set from profiles and link the wiki in Readme

This commit is contained in:
Ilya Zverev 2017-02-16 16:48:41 +03:00
parent 804b43571f
commit f11ff777da
4 changed files with 9 additions and 3 deletions

View file

@ -3,6 +3,9 @@
This is a script for merging points from some third-party source with OpenStreetMap data.
Please make sure the license allows that. After merging and uploading, the data can be updated.
See [the OSM wiki page](https://wiki.openstreetmap.org/wiki/OSM_Conflator) for detailed
description and instructions.
## Installation
Clone this repository, and from inside it run `pip install -r requirements.txt`.
@ -27,6 +30,9 @@ It is recommended to open the resulting file in the JOSM editor and manually che
Alternatively, you can use [bulk_upload.py](https://wiki.openstreetmap.org/wiki/Bulk_upload.py)
to upload a change file from the command line.
Please mind the [Import Guidelines](https://wiki.openstreetmap.org/wiki/Import/Guidelines), or your
work may be reverted.
## License
Written by Ilya Zverev for MAPS.ME. Published under the Apache 2.0 license.

View file

@ -316,7 +316,7 @@ class OsmConflator:
p = OSMPoint('node', -1-len(self.matched), 1, sp.lat, sp.lon, sp.tags)
p.action = 'create'
else:
master_tags = self.profile.get('master_tags', required='a set of authoritative tags that replace OSM values')
master_tags = set(self.profile.get('master_tags', required='a set of authoritative tags that replace OSM values'))
if update_tags(p.tags, sp.tags, master_tags):
p.action = 'modify'
source = self.profile.get('source', required='value of "source" tag for uploaded OSM objects')

View file

@ -10,7 +10,7 @@ no_dataset_id = True
# Using a name query with regular expressions
query = [('shop', 'supermarket'), ('name', '~Ашан|АШАН')]
# We don't parse opening hours yet, but it'd be cool if we did
master_tags = set(('name', 'opening_hours', 'phone'))
master_tags = ('name', 'opening_hours', 'phone')
# Empty dict so we don't add a fixme tag to unmatched objects
tag_unmatched = {}
# Coordinates are VERY approximate, so increasing max distance to ~1 km

View file

@ -28,7 +28,7 @@ tag_unmatched = {
'was:amenity': 'vending_machine'
}
# A set of authoritative tags to replace on matched objects
master_tags = set(('zone:parking', 'ref', 'contact:phone', 'contact:website', 'operator'))
master_tags = ('zone:parking', 'ref', 'contact:phone', 'contact:website', 'operator')
# A list of SourcePoint objects. Initialize with (id, lat, lon, {tags}).