I have added an element in my GPX file and would like this element to be available when doing map-matching. I have been looking at the JAVA source code but couldn’t figure out how this is done by GH.
I believe the function that creates GPX entries based on a file is the:
public static List<GPXEntry> createGPXList(InstructionList instructions)
inside the GpxConversions.java file. However, I can’t find the function that parses the GPX file itself.
Any help/suggestion is greatly appreciated.
EDIT: I’m a C++ developer and not very familiar with Java so please be kind.
So I am thinking of adding this driven distance data in the GPX file in addition to the lon, lat and time (e.g. lon, lat, time and driven distance). I can then just read the GPX file and add the driven distance data in the observation class. However, I can’t seem to figure out how GH is reading input GPX files.
The code that reads the gpx file for the match command is here:
So it is just XML deserialization and it should be easy to adjust the Gpx.java file so it includes a field for the property you like to add to the gpx file.