Initial commit

This commit is contained in:
zyphlar
2022-10-23 14:35:04 -07:00
commit 6e640838a5
13 changed files with 357041 additions and 0 deletions
File diff suppressed because it is too large Load Diff
+1
View File
@@ -0,0 +1 @@
UTF-8
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
PROJCS["NAD_1983_HARN_StatePlane_Oregon_North_FIPS_3601_Feet_Intl",GEOGCS["GCS_North_American_1983_HARN",DATUM["D_North_American_1983_HARN",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",8202099.737532808],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-120.5],PARAMETER["Standard_Parallel_1",44.33333333333334],PARAMETER["Standard_Parallel_2",46.0],PARAMETER["Latitude_Of_Origin",43.66666666666666],UNIT["Foot",0.3048]]
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large Load Diff
+28
View File
@@ -0,0 +1,28 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis version="3.22.10-Białowieża">
<identifier>geopoints</identifier>
<parentidentifier></parentidentifier>
<language>ENG</language>
<type>dataset</type>
<title>geopoints</title>
<abstract></abstract>
<links/>
<fees></fees>
<encoding></encoding>
<crs>
<spatialrefsys>
<wkt>PROJCRS["NAD83(HARN) / Oregon North (ft)",BASEGEOGCRS["NAD83(HARN)",DATUM["NAD83 (High Accuracy Reference Network)",ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4152]],CONVERSION["SPCS83 Oregon North zone (International feet)",METHOD["Lambert Conic Conformal (2SP)",ID["EPSG",9802]],PARAMETER["Latitude of false origin",43.6666666666667,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8821]],PARAMETER["Longitude of false origin",-120.5,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8822]],PARAMETER["Latitude of 1st standard parallel",46,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8823]],PARAMETER["Latitude of 2nd standard parallel",44.3333333333333,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8824]],PARAMETER["Easting at false origin",8202099.738,LENGTHUNIT["foot",0.3048],ID["EPSG",8826]],PARAMETER["Northing at false origin",0,LENGTHUNIT["foot",0.3048],ID["EPSG",8827]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["foot",0.3048]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["foot",0.3048]],USAGE[SCOPE["Engineering survey, topographic mapping."],AREA["United States (USA) - Oregon - counties of Baker; Benton; Clackamas; Clatsop; Columbia; Gilliam; Grant; Hood River; Jefferson; Lincoln; Linn; Marion; Morrow; Multnomah; Polk; Sherman; Tillamook; Umatilla; Union; Wallowa; Wasco; Washington; Wheeler; Yamhill."],BBOX[43.95,-124.17,46.26,-116.47]],ID["EPSG",2913]]</wkt>
<proj4>+proj=lcc +lat_0=43.6666666666667 +lon_0=-120.5 +lat_1=46 +lat_2=44.3333333333333 +x_0=2500000.0001424 +y_0=0 +ellps=GRS80 +units=ft +no_defs</proj4>
<srsid>882</srsid>
<srid>2913</srid>
<authid>EPSG:2913</authid>
<description>NAD83(HARN) / Oregon North (ft)</description>
<projectionacronym>lcc</projectionacronym>
<ellipsoidacronym>EPSG:7019</ellipsoidacronym>
<geographicflag>false</geographicflag>
</spatialrefsys>
</crs>
<extent>
<spatial miny="44.13963100000000139" dimensions="2" maxy="45.29047299999999865" crs="EPSG:2913" maxz="0" minx="-124.18405799999999317" maxx="-121.95829399999999509" minz="0"/>
</extent>
</qgis>
BIN
View File
Binary file not shown.
+168
View File
@@ -0,0 +1,168 @@
# Salem Oregon Address Import
See [https://wiki.openstreetmap.org/wiki/Salem_Oregon_Address_Import](https://wiki.openstreetmap.org/wiki/Salem_Oregon_Address_Import)
## Data Source
- Salem GIS department's FTP server
- Also https://data.cityofsalem.net/datasets/salem::primary-address/explore
- No copyright, public domain
## Field Mapping
- ADD_NUM -> addr:housenumber
- FULL_ST_NA -> addr:street via getformattedstreetname(FULL_ST_NA)
- SUB_VAL -> addr:unit
- CITY -> addr:city via title(CITY)
- ZIP -> addr:postcode
- manually add addr:state "OR"
## Processing
- Use the below script in QGIS to do virtual field calculations.
- Export the layer to geojson with WGS84 projection.
- Save as `processed.geojson`
- Use VIM or similar to find-replace "ADD_NUM" to "addr:housenumber" etc.
## Import steps
- Load processed.geojson into JOSM
- Zoom in to the area you wish to work on and Download OSM data to a New Layer
- In the geojson layer, select one neighborhood or city block worth of addresses
- Click Edit > Merge Selection
- Switch to Data Layer 1 and run the JOSM Validator
- Fix all duplicate housenumber warnings and nearby street not found warnings
- Click Upload, verify there are no further warnings or errors in the changeset
- Make sure there are no erroneous Relations or other unwanted objects about to be uploaded.
- Upload with this changeset comment:
```
comment=Addresses near Salem Oregon #salemimport
import=yes
website=https://wiki.openstreetmap.org/wiki/Salem_Oregon_Address_Import
source=City of Salem GIS
source:url=https://data.cityofsalem.net/datasets/salem::primary-address/explore
```
- Review imported data in Achavi or Osmcha to ensure it looks proper.
## QGIS Processing script
```
from qgis.core import *
from qgis.gui import *
import re
@qgsfunction(args='auto', group='Custom', referenced_columns=[])
def getformattedstreetname(value1, feature, parent):
parts = value1.split()
parts = map(formatstreetname, parts)
return " ".join(parts)
@qgsfunction(args='auto', group='Custom', referenced_columns=[])
def getformattedstreetnamefromaddress(value1, feature, parent):
parts = value1.split()
parts.pop(0) # Ignore the first bit (i.e. "123" in "123 N MAIN ST")
parts = map(formatstreetname, parts)
return " ".join(parts)
def formatstreetname(name):
# Specific suffixes like "123th" we have lower
if re.search("[0-9]+TH", name):
return name.capitalize()
if re.search("[0-9]+ND", name):
return name.capitalize()
if re.search("[0-9]+ST", name):
return name.capitalize()
if re.search("[0-9]+RD", name):
return name.capitalize()
# Weird names like 123D we keep upper
if re.search("[0-9]+[A-Z]+", name):
return name
# Prefixes we want to keep uppercase
if name == "US":
return "US"
if name == "SR":
return "SR"
if name == "CR":
return "CR"
if name == "C":
return "C"
# Directions
if name == "N":
return "North"
if name == "NE":
return "Northeast"
if name == "E":
return "East"
if name == "SE":
return "Southeast"
if name == "S":
return "South"
if name == "SW":
return "Southwest"
if name == "W":
return "West"
if name == "NW":
return "Northwest"
# Suffixes
if name == "AV":
return "Avenue"
if name == "AVE":
return "Avenue"
if name == "BLVD":
return "Boulevard"
if name == "BND":
return "Bend"
if name == "CIR":
return "Circle"
if name == "CT":
return "Court"
if name == "DR":
return "Drive"
if name == "FLDS":
return "Fields"
if name == "GRV":
return "Grove"
if name == "HOLW":
return "Hollow"
if name == "HW":
return "Highway"
if name == "HWY":
return "Highway"
if name == "LN":
return "Lane"
if name == "LP":
return "Loop"
if name == "LOOP":
return "Loop"
if name == "PATH":
return "Path"
if name == "PL":
return "Place"
if name == "RD":
return "Road"
if name == "RUN":
return "Run"
if name == "ST":
return "Street"
if name == "TER":
return "Terrace"
if name == "TL":
return "Trail"
if name == "TRL":
return "Trail"
if name == "VW":
return "View"
if name == "WAY":
return "Way"
if name == "XING":
return "Crossing"
# Irish names
if name == "MCCRAY":
return "McCray"
if name == "MCKOWN":
return "McKown"
return name.capitalize()
```