Code Monkey home page Code Monkey logo

geocaching-gpx-converter's Introduction

CSV-to-GPX-Converter for geocaching.com

This python script converts coordinates from a CSV to a GPX file. Using the two provided GSAK scripts, you can then easily upload your coordinates to geocaching.com. The provided scripts automatically update the coordinates for each geocache.

Input

You have to provide the GC number and the coordinates for each geocache within the CSV file. Thats the minimal requirement for a successful upload via the geocaching.com API.

The python script is configured to work with this pattern:

GC-Code;LAT;LON
GC10020;N33° 41.876;W117° 57.297

If you know some Python you can easily adjust it to your needs. You can also contact me if you need help.

Output

The python script creates a GPX file with this format

<gpx>
	<wpt lat="33.697933" lon="117.954950"><name>GC10020</name></wpt>
</gpx>

Configuration

The config.txt file contains the configuration parameters for the script. The input parameter specifies the relative path the input file having the raw input. The gpx output file will be saved in the same location with the same filename.

The parameter delimiter lets you define the data delimiter. In the above example, if was a semicolon.

Setup GSAK

Download and install GSAK

Install macros

Install these two macros in GSAK: SetCorrectedFlag and CorrectedCoord2GCcom. Both can be found under gsak-scripts.

In GSAK, go to Macro -> Execute -> Install or press CTRL+M -> Install. Select a .gsk file and click install. Repeat for the second macro.

Upload with GSAK

  • First, import the converted GPX file in GSAK (CTRL+O)
  • Run the macro SetCorrectedFlag (CTRL+M and doubleclick on it). This will set a flag on all your imported geocaches so the next macro can pick them up for upload.
  • Then, run the macro CorrectedCoord2GCcom and wait until all coordinates are uploaded.

Docker build

You can also use the provided Dockerfile to build and run the python script.

docker build --rm -t gpx-converter .
docker run gpx-converter

# copy gpx to host (replace container id with the real one.)
docker ps -a
docker cp <containerid>:/data/example_input.gpx ./output.gpx

Support

If this saved you some time, you may want to support me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.