Code Monkey home page Code Monkey logo

osm_graphml_downloader's Introduction

OSM GraphML Downloader

Download .graphml of various network types from OpenStreetMap. This tool extends the fabulous osmnx library from Geoff Boeing.

Installation

Unhelpful Instructions

Download this repository

Install osmnx (v0.11+) and click

Anaconda

This tool has been tested most using Anaconda to manage the dependencies. An example of you might setup an environment using Anaconda's conda CLI tool is:

conda create -n osm_graphml_downloader
activate osm_graphml_downloader
conda install osmnx>=0.11 click -y

Then you can use your new environment to run this tool.

CLI

-x  --network_type  required  Network type: walk, bike, drive, drive_service, all, all_private, none
-o  --out_dir       required  Path to directory where you want the results to go
-f  --filename                Name of .graphml output file
-n  --north         required  Area of interest north extent
-s  --south         required  Area of interest south extent
-e  --east          required  Area of interest east extent
-w  --west          required  Area of interest west extent
--reproject                   Option to reproject graph from WGS84 to something else
--epsg_code                   EPSG code value. Only used if --reproject flag is used
--simplify                    Option to download a simplified network
--compress                    Compress final output using gzip

Usage Examples

Minimal Example

This example demonstrates CLI command using only the minimum required options.

python osm_graphml_downloader_cli.py -x walk -o "C:\Data Directory" -n 35.802884 -s 35.793138 -e -78.597478 -w -78.612413

# C:\Data Directory\graph_walk.graphml

All options

This example demonstrates what the CLI call would look like if set values for all the options.

python osm_graphml_downloader_cli.py -x walk -o "C:\Data Directory" -f neighborhood_walk_2264 -n 35.802884 -s 35.793138 -e -78.597478 -w -78.612413 --reproject --epsg_code 2264 --simplify --compress

# C:\Data Directory\neighborhood_walk_2264.graphml.gz

osm_graphml_downloader's People

Contributors

maptastik 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.