Skip to content

t-kelsey/OpenStreetMapCLI

Repository files navigation

Finding the Closest OSM Objects to me

This tool is for getting OSM objects and sorting them by distance.

Quick Start

pip install -r requirements.txt
sudo snap install ollama
ollama create qwen2.5:translate -f system_prompt_translate
python3 main.py <your_osm_tag> '<your_address>'

Use python3 main.py --help for more information. OSM tags can be found here: https://wiki.openstreetmap.org/wiki/Map_features. See below for detailed installation instructions.

Summary

OSM stands for OpenStreetMap, and is an open-source project with the goal of being a "free, editable map of the whole world made by people like you".

The tool consists of a command-line tool, and a jupyter notebook 'demo' tool that plots the results.

Currently, due to data and scope limitations, this tool only allows locations in Germany.

Examples of the jupyter notebook plots:

drawing

drawing

drawing

Installation from clean Ubuntu

Install git

sudo apt install git

Authenticate yourself to git. Clone this repository, then cd into it.

Setting up the environment

Install Virtualenv or Anaconda. Install Virtualenv with these commands:

sudo apt update
sudo apt install python3-virtualenv

Create the virtual environment.

python3 -m virtualenv myvenv
source myvenv/bin/activate

Install the required libraries:

pip install -r requirements.txt

Setting up the chatbot

Install ollama from the ollama download page.

Run these commands:

ollama create qwen2.5:translate -f system_prompt_translate

Ollama is really bad at freeing ram for itself. If it gives you an 'out of ram' error, try freeing up some ram manually.

Running the program

There are two parts to this program: a jupyter notebook file (main.ipynb) and a CLI-functional file (main.py). Both take ~30-60s to run, so be patient!

Running the jupyter notebook:

jupyter notebook

Click on the browser link, then open main.ipynb and run it.

Running the CLI program:

python3 main.py healthcare=psychotherapist 'lehener str 90 freiburg'

will look for all psychotherapists near 'lehener str 90'. OSM tags can be found here: https://wiki.openstreetmap.org/wiki/Map_features Use python3 main.py --help for more information.

Credits

This is currently a solo project, but feel free to join in.

About

A CLI tool for finding things with OpenStreetMap

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors