Giter Site home page Giter Site logo

osm2rn's Introduction

OSM2RN

A simple Python code to extract road network (in Shapefile) from OpenStreetMap (OSM).

It serves as a fundamental data for trajectory map matching and other usages.

The generated road network is used for TPTK and DeepMG.

Usage

  1. Download OSM data from Geofabrik in .osm.pbf format.

  2. Clip the data according to your region of interest.

python osm_clip.py --input_path china-latest.osm.pbf --output_path interest_region.osm.pbf --min_lat 39.8451 --min_lng 116.2810 --max_lat 39.9890 --max_lng 116.4684
  1. Construct and store the road network from the clipped data.
python osm_to_rn.py --input_path interest_region.osm.pbf --output_path interest_region

Requirements

OSM2RN uses the following dependencies with Python 3.6

  • networkx==2.3

  • GDAL==2.3.2

  • osmium==2.15.3

Other packages can be easily installed using conda install or pip install, while the following scripts are recommended for gdal.

conda install -c conda-forge gdal==2.3.2

osm2rn's People

Contributors

sjruan avatar

Watchers

James Cloos avatar

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.