You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**JPX** is a Java library for creating, reading and writing [GPS](https://en.wikipedia.org/wiki/Global_Positioning_System) data in [GPX](https://en.wikipedia.org/wiki/GPS_Exchange_Format) format. It is a *full* implementation of version [1.1](http://www.topografix.com/GPX/1/1/) and version [1.0](http://www.topografix.com/gpx_manual.asp) of the GPX format. The data classes are completely immutable and allows a functional programming style. They are working also nicely with the Java [Stream](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/stream/Stream.html) API. It is also possible to convert the location information into strings which are compatible to the [ISO 6709](http://en.wikipedia.org/wiki/ISO_6709) standard.
7
+
**JPX** is a Java library for creating, reading and writing [GPS](https://en.wikipedia.org/wiki/Global_Positioning_System) data in [GPX](https://en.wikipedia.org/wiki/GPS_Exchange_Format) format. It is a *full* implementation of version [1.1](http://www.topografix.com/GPX/1/1/) and version [1.0](http://www.topografix.com/gpx_manual.asp) of the GPX format. The data classes are completely immutable and allows a functional programming style. They are working also nicely with the Java [Stream](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/stream/Stream.html) API. It is also possible to convert the location information into strings which are compatible to the [ISO 6709](http://en.wikipedia.org/wiki/ISO_6709) standard.
8
8
9
9
Besides the basic functionality of reading and writing GPX files, the library also allows manipulating the read GPX object in a functional way.
10
10
11
11
12
12
## Dependencies
13
13
14
-
No external dependencies are needed by the _JPX_ library. It only needs **Java 17** to compile and run. It also runs and compiles with **Java 21**.
14
+
The _JPX_ library needs no external dependencies. It only needs **Java 17** to compile and run. It also runs and compiles with **Java 21** and **Java 23**.
15
15
16
16
17
17
## Building JPX
18
18
19
-
For building the JPX library you have to check out the `master` branch from GitHub.
19
+
For building the JPX library, you have to check out the `master` branch from GitHub.
20
20
21
21
$ git clone https://github.com/jenetics/jpx.git
22
22
@@ -32,22 +32,22 @@ For building the JPX library you have to check out the `master` branch from GitH
This example writes a given `GPX` object to a file, reads it again and prints the `WayPoint`s of all tracks and all track-segments to the console.
76
76
77
77
```java
78
-
GPX.write(gpx, "track.gpx");
78
+
GPX.write(gpx, Path.of("track.gpx"));
79
79
GPX.read("gpx.xml").tracks()
80
80
.flatMap(Track::segments)
81
81
.flatMap(TrackSegment::points)
@@ -145,7 +145,7 @@ final GPX gpx11 = gpx10.toBuilder()
145
145
.build();
146
146
147
147
// Writing GPX to file.
148
-
GPX.write(gpx11, "track-v11.gpx");
148
+
GPX.write(gpx11, Path.of("track-v11.gpx"));
149
149
```
150
150
151
151
### ISO 6709 location strings
@@ -283,7 +283,7 @@ final GPX gpx1 = gpx.toBuilder()
283
283
284
284
### XML configuration
285
285
286
-
The _JPX_ library uses the XML classes available in the Java [`java.xml`](https://docs.oracle.com/en/java/javase/11/docs/api/java.xml/module-summary.html) module. This API is highly configurable and it is possible to replace the underlying implementation. Especially for Android, using different XML implementation is a necessity. _JPX_ uses three _factory_ classes for reading/writing GPX files:
286
+
The _JPX_ library uses the XML classes available in the Java [`java.xml`](https://docs.oracle.com/en/java/javase/11/docs/api/java.xml/module-summary.html) module. This API is highly configurable, and it is possible to replace the underlying implementation. Especially for Android, using different XML implementation is a necessity. _JPX_ uses three _factory_ classes for reading/writing GPX files:
287
287
288
288
1.[`XMLInputFactory`](https://docs.oracle.com/en/java/javase/11/docs/api/java.xml/javax/xml/stream/XMLInputFactory.html): This class is needed for reading GPX files.
289
289
1.[`XMLOutputFactory`](https://docs.oracle.com/en/java/javase/11/docs/api/java.xml/javax/xml/stream/XMLOutputFactory.html): This class is needed for writing GPX files.
@@ -304,7 +304,7 @@ final class ValidatingDocumentBuilder extends XMLProvider {
304
304
}
305
305
}
306
306
```
307
-
And don't forget to create a `META-INF/services/io.jenetics.jpx.XMLProvider` file with the following content:
307
+
And remember to create a `META-INF/services/io.jenetics.jpx.XMLProvider` file with the following content:
0 commit comments