NOAA-OWP / inundation-mapping

Flood inundation mapping and evaluation software configured to work with U.S. National Water Model.
Other
95 stars 30 forks source link

[21pt] Simplify OSM bridges #1254

Closed CarsonPruitt-NOAA closed 1 month ago

CarsonPruitt-NOAA commented 2 months ago

https://github.com/andycarter-pe/tx-bridge/blob/5eb0d18f35d53a180d1bae39921cc26b27dd275c/src/get_osm_bridge_lines_from_shp.py#L89-L92

ZahraGhahremani commented 2 months ago

I replaced feature_from_polygon with graph_from_polygon in the data/bridges/pull_osm_bridges.py and compared the results. There are differences in the attribute table fields.

Attribute Table in dev: image

Attribute Table after using Simplify: image

CarsonPruitt-NOAA commented 2 months ago

This is a potential solution for #1147.

ZahraGhahremani commented 2 months ago

The new script works very well in terms of displaying a single linestring for each bridge. Current version: image

Previous version: image

image

However, in some areas, it is unable to detect the bridges (see the figure). The green lines are bridges in both current and old version, the red lines are bridges only in the old version.

image

CarsonPruitt-NOAA commented 2 months ago

It seems like these missing bridges may not be roads. Are they railroads?

ZahraGhahremani commented 2 months ago

I tried dissolve function to merge touching lines. While it works well for addressing the previous issue, it also combines some bridges that should not be considered as a single bridge based on the current dev version and simplify technique.

Current dev: image

Using dissolve: image

Using dissolve- bridge lines are not merged based on the current dev version and simplify technique: image

image

ZahraGhahremani commented 1 month ago

@AliForghani-NOAA The last bridge is in HUC 05030101 (Lat 40.5126 N, long: 80.1354 W).

CarsonPruitt-NOAA commented 1 month ago

As part of this task, can you also look into bridges that we're healing that are no longer there. An example was provided by the field for Honeoye Falls, NY ( HNYN6 / 04130003).

We need to figure out if our OSM bridge query is pulling "historical" bridges and how we can avoid that.

Image

CarsonPruitt-NOAA commented 1 month ago

FYI, it's not appearing in the OSM online map, so there's got to be a way to filter these out. Image

ZahraGhahremani commented 1 month ago

These bridges are labeled as "abandoned" bridges and we can filter them out based on their bridge field. image

image

CarsonPruitt-NOAA commented 1 month ago

Great find!

CarsonPruitt-NOAA commented 1 month ago

Can you also check to make sure this bridge is being removed from Churchville, NY in HUC 04130003 (CHRN6). image

ZahraGhahremani commented 1 month ago

Yes. That bridge is an abandoned bridge too.

image

image

ZahraGhahremani commented 1 month ago

Here are some examples from HUC 04130003 after removing abandoned bridges. Red lines are abandoned bridges that don't appear in the new data (green lines).

image

image