pre-import refresh

This commit is contained in:
zyphlar 2023-11-10 00:56:22 -08:00
parent 727a67050f
commit d9db5c1391
3 changed files with 88923 additions and 88674 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -23,7 +23,7 @@ See [https://wiki.openstreetmap.org/wiki/Salem_Oregon_Address_Import](https://wi
- Get `Primary_Addresses.geojson` from the City GIS server linked above.
- Open the file in QGIS and open the layer attribute table
- Use the field calculator and the below script to add new virtual fields per the mapping above.
- Use the field calculator and the below script to add new virtual fields per the mapping above. (You may have to hit Save and Load Functions again to refresh QGIS's memory)
- Export the layer to geojson with "EPSG:4326 - WGS 84" projection. Deselect all fields besides those above.
- Save as `processed.geojson`
@ -78,6 +78,10 @@ def getstreetfromaddress(value1, feature, parent):
@qgsfunction(args='auto', group='Custom', referenced_columns=[])
def formatstreet(value1, feature, parent):
parts = value1.split()
# Handle the special case of a street name starting with "ST"
# which is almost always "Saint __" and not "Street __"
if parts[0] == "ST":
parts[0] = "Saint"
parts = map(formatstreetname, parts)
return " ".join(parts)