gpsformats4j

GPS format conversions in Java.

License

License

Categories

Categories

ORM Data
GroupId

GroupId

com.github.fracpete
ArtifactId

ArtifactId

gpsformats4j
Last Version

Last Version

0.0.5
Release Date

Release Date

Type

Type

jar
Description

Description

gpsformats4j
GPS format conversions in Java.
Source Code Management

Source Code Management

https://github.com/fracpete/gpsformats4j

Download gpsformats4j

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.fracpete/gpsformats4j/ -->
<dependency>
    <groupId>com.github.fracpete</groupId>
    <artifactId>gpsformats4j</artifactId>
    <version>0.0.5</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.fracpete/gpsformats4j/
implementation 'com.github.fracpete:gpsformats4j:0.0.5'
// https://jarcasting.com/artifacts/com.github.fracpete/gpsformats4j/
implementation ("com.github.fracpete:gpsformats4j:0.0.5")
'com.github.fracpete:gpsformats4j:jar:0.0.5'
<dependency org="com.github.fracpete" name="gpsformats4j" rev="0.0.5">
  <artifact name="gpsformats4j" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.fracpete', module='gpsformats4j', version='0.0.5')
)
libraryDependencies += "com.github.fracpete" % "gpsformats4j" % "0.0.5"
[com.github.fracpete/gpsformats4j "0.0.5"]

Dependencies

compile (4)

Group / Artifact Type Version
org.apache.commons : commons-csv jar 1.4
commons-io : commons-io jar 2.5
net.sourceforge.argparse4j : argparse4j jar 0.6.0
ch.qos.logback : logback-classic jar 1.0.13

Project Modules

There are no modules declared in this project.

gpsformats4j

GPS format conversions in Java.

Very simple, very hacky. ;-) The main reason was to be able to convert TCX files exported from a proprietary app into GPX ones so the OsmAnd~ app can display them.

Supported formats

Currently the following formats are supported:

  • CSV (requires columns in this order: track, time, lat, lon, elevation)
  • GPX
  • TCX
  • KML (only LineString tag)

Example usage

Using it with the provided convert/convert.bat scripts:

./convert --in_file test.tcx --in_format TCX --out_file out.gpx --out_format GPX

Calling the Convert class directly:

java -cp "./lib/*" com.github.fracpete.gpsformats4j.Convert \
  --in_file test.tcx --in_format TCX --out_file out.gpx --out_format GPX

Using Java code:

import com.github.fracpete.gpsformats4j.Convert;
import java.io.File;
...
Convert convert = new Convert();
convert.setInputFile(new File("test.tcx"));
convert.setInputFormat("TCX");
convert.setOutputFile(new File("out.gpx"));
convert.setOutputFormat("GPX");
String msg = convert.execute();
// successful if null returned:
if (msg != null)
  System.err.println(msg);

Releases

The following releases are available:

Maven

Use the following dependency to include the library in your Maven project:

    <dependency>
      <groupId>com.github.fracpete</groupId>
      <artifactId>gpsformats4j</artifactId>
      <version>0.0.5</version>
    </dependency>

Versions

Version
0.0.5
0.0.4
0.0.2
0.0.1