Skip to content

jwass/geopandas_osm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

geopandas_osm

A GeoPandas interface to query OpenStreetMap Overpass API

Quick start

Assuming you have a polygon for a boundary

import json

import shapely.geometry
import geopandas_osm.osm

with open('boundary.geojson') as f:
    data = json.load(f)

poly = shapely.geometry.shape(data['features'][0]['geometry'])
df = geopandas_osm.osm.query_osm('way', poly, recurse='down', tags='highway')

roads = df[df.type == 'LineString'][['highway', 'name', 'geometry']]

Project skeleton based on http://github.com/mapbox/pyskel

About

Query the OSM Overpass API and get a GeoDataFrame

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages