![]() OSMnx lets you download street network data and build topologically-corrected street networks, project and plot the networks, and save the street network as SVGs, GraphML files, or shapefiles for later use. But what about for bulk, automated analysis? And what about informal paths and pedestrian circulation that Tiger/Line ignores? And what about street networks outside the United States? OSMnx handles all of these uses. ![]() To acquire street network GIS data, one must typically track down Tiger/Line roads from the US census bureau, or individual data sets from other countries or cities. You can do this with cities, states, countries or any other geographic entities: Or you can pass multiple places into a single query to save a single shapefile or geopackage from their geometries. Place2 = ox.geocode_to_gdf('Cook County, Illinois') Place1 = ox.geocode_to_gdf('Manhattan, New York City, New York, USA') ![]() You can just as easily get other place types, such as neighborhoods, boroughs, counties, states, or nations – any place geometry in OpenStreetMap: With OSMnx, you can download place shapes from OpenStreetMap (as geopandas GeoDataFrames) in one line of Python code – and project them to UTM (zone calculated automatically) and visualize in just one more line of code:Ĭity = ox.geocode_to_gdf('Berkeley, California') But what about for bulk or automated acquisition and analysis? There must be an easier way than clicking through numerous web pages to download shapefiles one at a time. To acquire administrative boundary GIS data, one must typically track down shapefiles online and download them. Get administrative place boundaries and shapefiles Analyze street networks: routing, visualization, and calculating network statsġ.Save street networks to disk as shapefiles, GraphML, or SVG.Automatically download administrative place boundaries and shapefiles.I’ll demonstrate 5 basic use cases for OSMnx in this post: There are many usage examples and tutorials in the examples repo. Plot figure-ground diagrams of street networks and/or building footprints.Visualize travel distance and travel time with isoline and isochrone maps.Visualize street network as a static map or interactive leaflet web map.Calculate and visualize shortest-path routes that minimize distance, travel time, elevation, etc.Calculate and visualize street bearings and orientations.Conduct topological and spatial analyses to automatically calculate dozens of indicators.Save/load street network to/from a local.Save networks to disk as shapefiles, GeoPackages, and GraphML.Fast map-matching of points, routes, or trajectories to nearest graph edges or nodes.Simplify and correct the network’s topology to clean-up nodes and consolidate intersections.Impute missing speeds and calculate graph edge travel times.Download node elevations and calculate edge grades (inclines).Download drivable, walkable, bikeable, or all street networks.Download by city name, polygon, bounding box, or point/address + network distance.Download other infrastructure types, place boundaries, building footprints, and points of interest.Download street networks anywhere in the world with a single line of code.OSMnx featuresĬheck out the documentation and usage examples for details on using each of the following features: If you’re interested in OSMnx but don’t know where to begin, check out this guide to getting started with Python. OSMnx is on GitHub and you can install it with conda. For the latest, see the official documentation and usage examples.) Installing OSMnx ( Note that this blog post is not updated with every new release of OSMnx. Ox.plot_graph(ox.graph_from_place('Modena, Italy')) In a single line of code, OSMnx lets you download, model, and visualize the street network for, say, Modena Italy: If you use OSMnx in your work, please download/cite the paper here. You can just as easily download and work with amenities/points of interest, building footprints, elevation data, street bearings/orientations, and network routing. Users can download and model walkable, drivable, or bikeable urban networks with a single line of Python code, and then easily analyze and visualize them. OSMnx is a Python package to retrieve, model, analyze, and visualize street networks from OpenStreetMap. Check out the journal article about OSMnx.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |