You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For crash datasets that are on a county level, we'd like to exclude crashes outside of the city polygon.
First, a city polygon should be written to the city's data directory, e.g. data/boston/processed/maps in geojson format (in 4326 projection). That way, we won't have to get the city polygon twice.
The city polygon is sometimes generated in src/data/osm_create_maps.py (once the buffer_polygon branch is merged into master), if the city needed buffering. I think we should get the polygon even if the city didn't need buffering, and then if there's no city polygon in open street maps, also get a polygon of circle with radius around the center point given.
Then, in util.read_records, add an optional polygon argument (or maybe polygon filename), and only add records whose points are within the polygon (you'll need to reproject into 3857 projection to do this check).
Then in join_segments_crash_concern, there are two calls made to read_records. One is with record_type 'crash' and one with record_type 'concern'. You'd modify the call with record_type crash to take the polygon.
The text was updated successfully, but these errors were encountered:
For crash datasets that are on a county level, we'd like to exclude crashes outside of the city polygon.
First, a city polygon should be written to the city's data directory, e.g. data/boston/processed/maps in geojson format (in 4326 projection). That way, we won't have to get the city polygon twice.
The city polygon is sometimes generated in src/data/osm_create_maps.py (once the buffer_polygon branch is merged into master), if the city needed buffering. I think we should get the polygon even if the city didn't need buffering, and then if there's no city polygon in open street maps, also get a polygon of circle with radius around the center point given.
Then, in util.read_records, add an optional polygon argument (or maybe polygon filename), and only add records whose points are within the polygon (you'll need to reproject into 3857 projection to do this check).
Then in join_segments_crash_concern, there are two calls made to read_records. One is with record_type 'crash' and one with record_type 'concern'. You'd modify the call with record_type crash to take the polygon.
The text was updated successfully, but these errors were encountered: