togpx
togpx copied to clipboard
times nesting in multilines fix
Times in nested multiLineStrings are usually nested too (@mapbox/togeojson generates this, for example). It's important to get them in subarrays at each segment.
Example of GeoJSON code needs to be correctly converted:
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"coordTimes": [
[
"2015-05-08T06:59:14Z",
"2015-05-08T07:05:34Z"
],
[
"2015-05-08T07:31:29Z",
"2015-05-08T07:31:38Z",
"2015-05-08T07:31:39Z"
]
]
},
"geometry": {
"type": "MultiLineString",
"coordinates": [
[
[34.4010477327, 44.6769682411, 13.6],
[34.3997246493, 44.6748953965, 29.46]
],
[
[34.4003802817, 44.6736188326, 18.88],
[34.4003147352, 44.6734232828, 23.21],
[34.4003174175, 44.6734021604, 23.69]
]
]
}
}
]
}