Add README.md

This commit is contained in:
Pim Kunis 2023-08-27 13:44:15 +02:00
parent 8f5fc80fd4
commit cd96054e0b

31
README.md Normal file
View file

@ -0,0 +1,31 @@
# gc_area
Python3 scripts to filter geocaches bounded to a certain area.
The area is an OpenStreetMap "relation" consisting of ways that make up the area.
This OSM relation is then converted to a polygon.
The polygon is then used to determine whether a geocache lies within the area or not.
## Usage
### Prerequisites
1. Determine the OpenStreetMap relation ID. To do this, go to [openstreetmap.org](https://www.openstreetmap.org) and search for your area.
2. Create a GPX file containing at least all geocaches in the area. You can do this by simply going to the Geocaching website, creating a filter and add filtered geocaches to a list. Then go to your lists page and download the GPX file for this list.
3. Install the required Python3 packages:
```cli
pip install -r requirements.txt
```
### Using the Scripts
1. Create the polygon describing your area (replace `<osm-relation-id>` with your ID):
```cli
$ python3 create_polygon.py <osm-relation-id>
```
For more options, see `python3 create_polygon.py --help`.
2. Filter out any geocaches outside this area (replace <input-file> with your GPX file and <output-file> with desired result GPX file):
```cli
$ python3 gc_area.py <input-file> <output-file>
```
For more options, see `python3 gc_area.py --help`.