Create new project design plans

This commit is contained in:
zyphlar
2026-08-28 14:23:26 -07:00
parent a7d6db8177
commit 7ce73f19c5
22 changed files with 2682 additions and 263 deletions
+16 -1
View File
@@ -155,6 +155,7 @@ class AddressComparator:
if best_match is not None and distance_m <= self.tolerance_meters:
existing_addresses.append({
'geometry': local_point,
'osm_geometry': osm_gdf.iloc[best_match].geometry,
'local_data': dict(local_row.drop('geometry')),
'osm_data': dict(osm_gdf.iloc[best_match].drop('geometry')),
'distance_meters': distance_m,
@@ -218,8 +219,22 @@ class AddressComparator:
print(f"Saved {len(removed_addresses)} potentially removed to {output_dir}/addresses-potentially-removed.geojson")
if existing_addresses:
# Keeps both county city fields (postal community and legal
# city/jurisdiction - they can differ) plus OSM's addr:city, and
# the OSM point's coordinates, so the "Generate City Boundaries
# Report" step can build its report from this file alone without
# repeating the spatial match.
existing_simple = [
{'geometry': a['geometry'], 'distance_meters': a['distance_meters'], 'status': 'existing'}
{
'geometry': a.get('osm_geometry') or a['geometry'],
'distance_meters': a['distance_meters'],
'addr:housenumber': a['local_data'].get('addr:housenumber'),
'addr:street': a['local_data'].get('addr:street'),
'addr:unit': a['local_data'].get('addr:unit'),
'county_postal_community': a['local_data'].get('county_postal_community'),
'county_city': a['local_data'].get('county_city'),
'osm_city': a['osm_data'].get('addr:city'),
}
for a in existing_addresses
]
gpd.GeoDataFrame(existing_simple).to_file(