gpsaltprofile4j

Little library for turning GPS traces with altitude information into altitude profiles.

License

License

GroupId

GroupId

com.github.fracpete
ArtifactId

ArtifactId

gpsaltprofile4j
Last Version

Last Version

0.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

gpsaltprofile4j
Little library for turning GPS traces with altitude information into altitude profiles.
Source Code Management

Source Code Management

https://github.com/fracpete/gpsaltprofile4j

Download gpsaltprofile4j

How to add to project

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

Dependencies

compile (4)

Group / Artifact Type Version
com.github.fracpete : gpsformats4j jar 0.0.5
net.sf.trove4j : trove4j jar 3.0.3
com.github.grumlimited » geocalc jar 0.5.7
org.jfree : jfreechart jar 1.0.19

Project Modules

There are no modules declared in this project.

gpsaltprofile4j

Little Java library for turning GPS traces with altitude information into altitude profiles.

Uses Spherical law of cosines for calculating distances between points of the trace, using the geocalc library.

Supported formats

Currently the following input formats are supported (using gpsformats4j):

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

Current supported output formats:

  • CSV (columns: track, time, distance, elevation)
  • PNG (options: width, height)

Example usage

Using it with the provided generate.sh/generate.bat scripts (custom dimensions for image):

./generate.sh --in_file test.gpx --in_format GPX --out_file out.csv --out_format PNG --out_options "width=2000 height=400"

Calling the Generate class directly:

java -cp "./lib/*" com.github.fracpete.gpsaltprofile4j.Generate \
  --in_file test.gpx --in_format GPX \
  --out_file out.png --out_format PNG --out_options "width=2000 height=400"

Using Java code:

import com.github.fracpete.gpsaltprofile4j.Generate;
import java.io.File;
...
Genreate generate = new Generate();
generate.setInputFile(new File("test.gpx"));
generate.setInputFormat("GPX");
generate.setOutputFile(new File("out.png"));
generate.setOutputFormat("PNG");
generate.setOutputOptions("width=2000 height=400");
String msg = generate.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>gpsaltprofile4j</artifactId>
      <version>0.0.1</version>
    </dependency>

Screenshot

Example profile:

Example profile

Versions

Version
0.0.1