Skip to content

SatelliteApplicationsCatapult/osm_kml_search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Search OSM for tags inside a bounding box

Prints out the number of osm ways with the given feature tags inside the kml's polygon

Running

Needs to be given a KML file with the search area and a set of feature tags

The first time you run this in a shell you will need to activate the virtual environment.

Linux/WSL:

source ./venv/scripts/activate

Windows PowerShell:

.\venv\Scripts\activate.ps1

Windows CMD:

.\venv\Scripts\activate.bat

Now you can run the script for your input parameters. This should be roughly the same for all operating systems, though you may need to change the path separators depending on your shell in windows.

python -m osm_kml_search.main --kml /path/to/a.kml --features "\"landuse\"=\"quarry\"" --features "\"landuse\"=\"industrial\""

Setup

Open a shell/command prompt/terminal. Change the directory to where you want to set up this system.

You will need git installed. Have a look here if you dont: https://git-scm.com/downloads

git clone https://github.com/SatelliteApplicationsCatapult/osm_kml_search.git 

You will need python, at least version 3.8. Have a look here if you need instructions. https://wiki.python.org/moin/BeginnersGuide/Download

Now you should be able to run the following to verify that its working

python --version

Create and activate a virtual environment

python -m venv venv

Now follow the instructions above for activating your virtual environment. You should see a change in your prompt when you do this.

Now install the dependencies

python setup.py install

At this point you should be ready to start using the script.

About

search osm by kml file and tags

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages