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
Want to Simplify a GPX track, which includes not only lat+lon but also timestamps and other properties. After simplification, I want to retain these additional properties (most likely only the timestamp, the others need to be recalculated).
Alternatively, can you make it possible to retain the original array keys of the Polyline?
(e.g. $simplified->getPoints(): [ 0 => [...], 3 => [...], 9 => [...] ])
PS. the Github example for Simplify does not work, the one in the documentation does.
The text was updated successfully, but these errors were encountered:
Alternatively: how can I modify the class? A la the example class MyPoint implements PointInterface mentioned here: https://github.com/emcconville/point-reduction-algorithms This way I can load points that include other properties, where getCoordinates is modified to get lat & lon from the custom Point.
Hi, that's currently not possible and I think that's out of scope for this library. For the time being you've to split the location data from other meta, simplify locations and merge both parts together again.
Extending the geometry classes (Coordinate, Polyline, etc.) is currently not possible. That would required the extensive use of interfaces instead of concrete classes in many places. I'd like to see such an abstraction introduced, but it's definitely a task for a new major release.
Want to Simplify a GPX track, which includes not only lat+lon but also timestamps and other properties. After simplification, I want to retain these additional properties (most likely only the timestamp, the others need to be recalculated).
Looking at the documentation: https://phpgeo.marcusjaschen.de/Transformations_and_Processing/Simplifying_a_Polyline.html
How can I create a Polyline to be used by Simplify, which includes not only lat+lon, but additional properties? A la
Alternatively, can you make it possible to retain the original array keys of the Polyline?
(e.g.
$simplified->getPoints(): [ 0 => [...], 3 => [...], 9 => [...] ]
)PS. the Github example for Simplify does not work, the one in the documentation does.
The text was updated successfully, but these errors were encountered: