Coder Social home page Coder Social logo

amauryval / osmgt Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 2.0 147.46 MB

Python library to extract roads network on Open Street Map (and POIs) in order to create a graph with graph-tools and/or computing shortest paths and isochrones

Home Page: https://github.com/amauryval/osmgt/wiki/OsmGT-Wiki

License: GNU General Public License v3.0

Python 100.00%
graph topology graph-tools openstreetmap point-of-interest topology-graph pois isochrones shortest-paths geopandas

osmgt's Introduction

OsmGT

This package will not be maintain: a new package OsmRx based on rustworkx has been built and is currently developed!

CI codecov Code style: black

Anaconda-Server Badge Anaconda-Server Badge

Anaconda-Server Badge

Anaconda-Server Badge

OpenStreetMap (OSM) network analysis based on graph-tools (GT):

  • load data from a location name or a bounding box (roads and pois)
  • graph creation (and topology processing)
  • isochrone builder
  • shortest path

Demo

To play with the notebook on binder: Binder

If you do not want to wait (OsmGt docker building takes time here on myBinder), you can find the html version of the jupyter notebook : click here to get the result

Documentation

Open the wiki

Releases

  • 0.8.12:

Code cleaning...

  • 0.8.4:

First usable version

How to install it

Only on Linux

conda install -c amauryval osmgt

How to run the dockerfile

docker build -t osmgt . && docker run -p 8888:8888 osmgt:latest

osmgt's People

Contributors

amauryval avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

robinlzw pnposch

osmgt's Issues

TypeError: GeometryCollection geom type not compatible (l155 - osmgt/geometry/geom_helpers.py in convert_to_polygon(polygon_geom))

Exception returned due to GeometryCollection type.

Workflow used:

from osmgt import OsmGt
from shapely.geometry import Point
import geopandas as gpd

pt = Point(3.930914582537432, 43.612687207093416)
source_nodes = gpd.GeoDataFrame(index=[0], crs='epsg:4326', geometry=[pt])

isochrones_polygon_values = {
    250: "#d9ef8b",
    500: "#fee08b",
    750: "#f46d43"
}

isochrones_lines_values = {
    250: "#668100",
    500: "#e2a803",
    750: "#962603"
}

trip_speed = 3.6  # km/h

location_points = list(source_nodes["geometry"])
# location_points.extend(location_points)

isochrones_polygons, isochrones_lines = OsmGt.isochrone_distances_from_nodes(
    location_points,
    list(isochrones_polygon_values.keys()),
    trip_speed,
    mode="pedestrian"
)

GeometryCollection should be supported ! (extract [multi]polygon(s) parts ?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.