improved josm; snapping

This commit is contained in:
zyphlar
2026-07-08 14:57:47 -07:00
parent 37398aac8c
commit cc925fd345
5 changed files with 805 additions and 9 deletions
+17 -1
View File
@@ -13,7 +13,6 @@ TODO:
- ignore points outside of lines
- put properties properly on removed roads, so they're visible in JOSM
- handle polygons properly (on previous geojson step?) for circular roads
- include OneWay=Y
- handle C 44a -> County Road 44A
- handle Trce -> Trace/Terrace?
"""
@@ -400,6 +399,11 @@ class RoadComparator:
elif key == 'StreetClas':
highway_type = qgisfunctions.gethighwaytype(value, None, None)
properties['highway'] = highway_type if highway_type else 'residential'
elif key == 'Oneway':
if value == 'FT':
properties['oneway'] = 'yes'
elif value == 'TF':
properties['oneway'] = '-1'
elif is_sumter_county:
# Sumter County field mappings
for key, value in original_properties.items():
@@ -417,6 +421,18 @@ class RoadComparator:
properties['highway'] = 'primary'
else:
properties['highway'] = 'residential'
elif key == 'OneWayCode':
if value == 'F':
properties['oneway'] = 'yes'
elif value == 'T':
properties['oneway'] = '-1'
elif key == 'LANES':
try:
num_value = int(float(value)) if value is not None else 0
if num_value > 0:
properties['lanes'] = str(num_value)
except (ValueError, TypeError):
pass
else:
# Unknown format - try common field names
name = original_properties.get('NAME') or original_properties.get('FullStreet') or original_properties.get('name')