diff --git a/Makefile b/Makefile index d790891e7..d781ba6e0 100644 --- a/Makefile +++ b/Makefile @@ -17,18 +17,18 @@ # PACKAGE := org.osm_fieldwork.py -NAME := Osm-Fieldwork -VERSION := 0.3.2 +NAME := osm-fieldwork +VERSION := 0.3.3 # Make a python package for pip pip: zip -r $(NAME).zip . -pip-install: pip - pip3 install $(NAME).zip - -pip-uninstall: +uninstall: pip3 uninstall $(NAME) +install: + pip3 install -e . + check: pytest diff --git a/osm_fieldwork/.#odk2osm.py b/osm_fieldwork/.#odk2osm.py deleted file mode 120000 index 038f8d1f5..000000000 --- a/osm_fieldwork/.#odk2osm.py +++ /dev/null @@ -1 +0,0 @@ -rob@nomad.moongulch.net.240780:1689177873 \ No newline at end of file diff --git a/osm_fieldwork/__version__.py b/osm_fieldwork/__version__.py index f9aa3e110..e19434e2e 100644 --- a/osm_fieldwork/__version__.py +++ b/osm_fieldwork/__version__.py @@ -1 +1 @@ -__version__ = "0.3.2" +__version__ = "0.3.3" diff --git a/osm_fieldwork/odk_merge.py b/osm_fieldwork/odk_merge.py index 2f1c3bdfa..96248c6bb 100755 --- a/osm_fieldwork/odk_merge.py +++ b/osm_fieldwork/odk_merge.py @@ -221,6 +221,7 @@ def conflateWay(self, version = int(result[0][2]) + 1 attrs = {'id': int(result[0][0]), 'version': version} tags = result[0][1] + tags[f'old_{key}'] = value tags['fixme'] = "Probably a duplicate!" geom = mapping(shapely.from_wkt(result[0][3])) refs = list() @@ -267,6 +268,7 @@ def conflateNode(self, feature, dbindex): lon = coords.x attrs = {'id': int(result[0][0]), 'version': version, 'lat': lat, 'lon': lon} tags = result[0][1] + tags[f'old_{key}'] = value tags['fixme'] = "Probably a duplicate!" return {'attrs': attrs, 'tags': tags} return dict() @@ -285,6 +287,7 @@ def conflateById(self, feature, dbindex): version = int(result[0][2]) + 1 attrs = {'id': int(result[0][0]), 'version': version} tags = result[0][1] + # tags[f'old_{key}'] = value tags['fixme'] = "Probably a duplicate!" geom = mapping(shapely.from_wkt(result[0][3])) return {'attrs': attrs, 'tags': tags} @@ -297,6 +300,7 @@ def conflateById(self, feature, dbindex): version = int(result[0][2]) + 1 attrs = {'id': int(result[0][0]), 'version': version} tags = result[0][1] + # tags[f'old_{key}'] = value tags['fixme'] = "Probably a duplicate!" geom = mapping(shapely.from_wkt(result[0][3])) return {'attrs': attrs, 'tags': tags, 'refs': refs} diff --git a/osm_fieldwork/xforms.yaml b/osm_fieldwork/xforms.yaml index ee8a0ded1..e03b90fa5 100644 --- a/osm_fieldwork/xforms.yaml +++ b/osm_fieldwork/xforms.yaml @@ -1,15 +1,3 @@ -# This section corrently isn't being used yet, but will be used to -# test for tag completeness for some features. -validate: - - highway: - - smoothness - - surface - - tracktype - - smoothness - - leisure: - - firepit - - picnic_table - # This section is for simple tag translation. Sometimes the value from # the choices sheet of the XLSXForm is very close, but not an exact # match to an approved OSM tags. Many XLSXForms that used OMK tried @@ -90,6 +78,7 @@ convert: - toilets: amenity=toilets - amenity: - coffee: amenity=cafe,cuisine=coffee_shop + - goverment: amenity # All of the data that goes in a different non-OSM file private: @@ -174,36 +163,3 @@ multiple: - amenity_type - specialty -# This section matches values to the correct keyword. Often a multiple -# selection in the XLSXForm survey sheet may have values that don't -# all share the same keyword. This corrects that. -tags: - - leisure: - - firepit - - picnic_table - - fishing - - park - - resort - - tourism: - - picnic_table - - caravans - - camp_site - - camp_pitch - - viewpoint - - bear box: yes - - barbeque_grill: yes - - power_supply: yes - - path: - - sac_scale - - mtb:scale - - mtb:scale:imba - - internet_access: - - wlan - - cellular - - internet - - - toilets:disposal: - - flush - - urinal - - squat - - seated diff --git a/pyproject.toml b/pyproject.toml index 2bd7042f1..2a25d5c5c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,7 @@ pythonpath = "osm_fieldwork" [tool.commitizen] name = "cz_conventional_commits" -version = "0.3.2" +version = "0.3.3" version_files = [ "pyproject.toml:version", "osm_fieldwork/__version__.py",