I am performing GDAL ogr2org operation with ST_union(Geometry) on tracks from GPX file to split those at intersection points. Track points have elevation and depth info. In GPX track point entry looks like this:
<trkpt lat="51.1012332738" lon="20.916904"> <ele>130</ele> <extensions> <depth>12.3</depth> </extensions> </trkpt>
The command being executed is this:
ogr2ogr -nlt MULTILINESTRING -dsco GPX_USE_EXTENSIONS=YES -lco FORCE_GPX_TRACK=YES -f GPX "%output_gpx%" "%input_gpx%" -dialect sqlite -sql "select ST_union(Geometry) from tracks"
The problem is that resulting GPX file looses depth and elevation data. The question is how to keep depth and elevation data in resulting GPX file after ST_union(Geometry)?
Sample GPX file: DOWNLOAD