3

A relative novice here so help will be much appreciated. I'm going through the process of classifying station areas internationally using the connectivity metrics in OSMnx. I need to get the street networks within 400m euclidean buffers from each station point. i.e. a simple buffer from a station.

It appears to me that the only way to get street networks within a distance from a point is by using ox.graph_from_point() and specifying either a network distance or a bounding box.

Is it impossible to get a euclidean distance from a point? Or do I need a work around i.e. creating buffer polygons in ArcMap and using them with OSMnx. In either case, any advice on what code or command I need will be appreciated!

Cheers.

4

1 回答 1

2

You can do this all directly with OSMnx:

import osmnx as ox
from shapely.geometry import Point
station_point = (-71.083364, 42.341586)
projected_point, projection_crs = ox.project_geometry(Point(station_point))
projected_buffer = projected_point.buffer(400)
buffer, latlong_crs = ox.project_geometry(projected_buffer, crs=projection_crs, to_latlong=True)
G = ox.graph_from_polygon(buffer)

Define a station point, project it to meters (UTM), buffer it with a 400 m radius, project buffer back to lat-long, then get the street network within it.

于 2019-03-07T14:57:35.327 回答