Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

convert GPX files to GSSI's proprietary DZG format

Project description

gpx2dzg

PyPI version License: GPL v3

This software takes GPS waypoint information stored in GPX files, tries to align waypoints with user marks in GSSI's proprietary DZX file format, and outputs the results to DZG (an ASCII file containing a mix of RMC and/or GGA NMEA strings and "NMEA-like" GSSI proprietary strings). The purpose of this translation is to artifically create GPS-aware ground-penetrating radar (GPR) projects.

Sadly, at the moment this software only works with GSSI control units that produce DZX files. This means it should work for projects created with the SIR-4000, but not with the SIR-3000. SIR-3000 support is coming soon (see future), but requires slightly more mathematical finesse, since the 3000 stores marks above the time-zero band of the GPR array instead of in a separate file.

Note:

GPX and DZX files MUST contain the same number of marks for this process to work. If they do not, the script will bring up a plot showing GPX marks plotted by distance, DZX marks plotted by scan number, and velocity between GPX points for comparison. You can modify either GPX or DZX using a standard text editor, and add or remove marks based on your survey notes. I will do what I can to help, but ultimately I am not responsible for missed GPS or GPR marks in your radar surveys (sorry!)

installation

Installation should be simple. If you've installed python packages before you may not need this. If you're uncomfortable installing python packages, read on. All requirements are on the Python Package Interface (PyPI), which means that you do not need to install anything else in order for this to work. Simply download this repository using the "Clone or download" button above. Unzip the package to your Downloads folder, then execute the following command in an Anaconda Prompt or bash terminal to install:

pip install ~/Downloads/gpx2dzg

If that doesn't work, you may need to unzip differently. Try making a folder called gpx2dzg in your Downloads folder, then unzip all of the contents of this package to it, so that setup.py is located at ~/Downloads/gpx2dzg/setup.py.

usage

in python

>>> import gpx2dzg.gpx2dzg as g2d
>>> g2d.convert(dzx='/path/to/dzx.DZX', gpx='/path/to/gpx.gpx')

sanity check plotting

This software contains the ability to plot GPX and DZX marks next to each other, along with speed over ground, in order to visually check which points may have been missed or created erroneously in the field.

This will happen automatically if GPX and DZX mark numbers are not equal. An example is shown below:

Sanity check plot with differing mark counts

To force the sanity check plot, simply add plot=True.

>>> g2d.convert(dzx='/path/to/dzx.DZX', gpx='/path/to/gpx.gpx', plot=True)

Sanity check plot with identical mark counts

This might not seem like a "sane" way to do a sanity check, but if you have a better idea I would love to hear from you.

on a bash or Anaconda Prompt command line

gpx2dzg -d /path/to/dzx.DZX -g /path/to/gpx.gpx

sanity check plotting

Simply add the -g flag.

gpx2dzg -d /path/to/dzx.DZX -g /path/to/gpx.gpx -g

usage notes:

If no GPX file is specified, the software will look for a GPX named the same as the DZX (for example, if the DZX is named file.DZX, the script will look for a file named file.gpx).

future:

  • SIR-3000 support (please create an issue if you would like this to happen sooner rather than later)

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
gpx2dzg-0.0.1-py3-none-any.whl (23.5 kB) Copy SHA256 hash SHA256 Wheel py3
gpx2dzg-0.0.1.tar.gz (9.9 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page