Python3 scripts to filter geocaches bounded to a certain area.
.gitignore | ||
create_polygon.py | ||
find_centre.py | ||
gc_area.py | ||
README.md |
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
- Determine the OpenStreetMap relation ID. To do this, go to openstreetmap.org and search for your area.
- 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.
- Install the required Python3 packages:
pip install -r requirements.txt
Using the Scripts
- Create the polygon describing your area (replace
<osm-relation-id>
with your ID):
$ python3 create_polygon.py <osm-relation-id>
For more options, see python3 create_polygon.py --help
.
- Filter out any geocaches outside this area (replace with your GPX file and with desired result GPX file):
$ python3 gc_area.py <input-file> <output-file>
For more options, see python3 gc_area.py --help
.