-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/Sidrcs/Elevation_OSM
- Loading branch information
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# OSMnxElevation | ||
**OSMnxElevation** is a lightweight Python package that binds elevation from raster datasets to nodes and edges of OpenStreetMaps (OSM) to create input network datasets that support elevation-based network analysis like walkability and bikeability in ArcGIS Pro (ESRI 2020). | ||
|
||
## Demo | ||
[Basic Demo Notebook](https://github.com/Sidrcs/osmnxelevation/blob/6d6d89f75d5714dac425f413e1f0a4ae807df43f/lib/Demo.ipynb) | ||
|
||
## How to Install and Use | ||
|
||
### Installation | ||
Step 1: Clone the repository | ||
``` | ||
git clone https://github.com/Sidrcs/osmnxelevation.git | ||
``` | ||
Step 2: Change the directory to lib folder | ||
``` | ||
cd lib | ||
``` | ||
Step 3: Install environment.yml to install dependencies using Conda | ||
``` | ||
conda env create -f environment.yml | ||
``` | ||
Step 4: Activate the Conda environment | ||
``` | ||
conda activate oxelev | ||
``` | ||
Step 5: Launch Jupyter Notebook from the terminal (Mac) or Anaconda prompt (Windows) | ||
``` | ||
jupyter-notebook | ||
``` | ||
### Usage | ||
1. Import the `NetworkDataset` module from `osmnxelevation` library.<br> | ||
2. Initialize the `NetworkDataset` instance with the required arguments: | ||
- `place`(str): City, County, State, Country [Eg: Madison, Dane, Wisconsin, US] | ||
- `raster_fpath`(str): Folder path containing Digital Elevation Models (DEMs) raster datasets. Try: [USGS TNM Downloader](https://apps.nationalmap.gov/downloader/) | ||
- `output_fpath`(str): Output folder path to store geopackage outputs after elevation binding | ||
3. Launch elevation binding to network using method `bind_elevation_to_network()` | ||
``` | ||
# import library | ||
import osmnxelevate as oe | ||
# Create an instance of NetworkDataset object | ||
ndst = oe.NetworkDataset(place = "Midland, Midland County, TX, USA", | ||
raster_fpath = "Elevation_OSM\Midland_DEM", | ||
output_fpath = "Elevation_OSM") | ||
# Binds elevation to nodes and edges | ||
ndst.bind_elevation_to_network() | ||
``` | ||
|
||
## Credits | ||
Boeing, G. 2017. "[OSMnx: New Methods for Acquiring, Constructing, Analyzing, and Visualizing Complex Street Networks](https://geoffboeing.com/publications/osmnx-complex-street-networks/)." _Computers, Environment and Urban Systems_ 65, 126-139. | ||
|
||
## LICENSE | ||
OSMnxElevation is open source and licensed under the MIT license. [License](https://github.com/Sidrcs/osmnxelevation/blob/6d6d89f75d5714dac425f413e1f0a4ae807df43f/lib/LICENSE) requires that derivative works provide proper attribution. |