phpGPX icon indicating copy to clipboard operation
phpGPX copied to clipboard

Removal of Summarizable and toArray

Open Sibyx opened this issue 1 year ago • 2 comments

As part of the new major release, I propose the removal of the Summarizable interface along with its toArray method. This decision stems from my belief that all models should instead implement the JsonSerializable interface, thereby returning a GeoJSON compatible result where feasible.

The usage of arrays in this context seems antiquated and unnecessarily complex, hence it doesn't align with the direction of our project. I anticipate that the removal of these features won't be a significant loss for the users. However, I welcome any thoughts and potential concerns about this proposed change.

Originally posted by @Sibyx in https://github.com/Sibyx/phpGPX/discussions/67#discussioncomment-6644721

Sibyx avatar Oct 01 '23 09:10 Sibyx

Exporting in GeoJSON is a must. This library could then act as a GPX to GeoJSON converter (like some others - not much - but with the other features like the stats that make this library charming).

miqwit avatar Mar 08 '24 07:03 miqwit

Yep, totally agree. There is already some implementation started in develop.

Sibyx avatar Mar 08 '24 12:03 Sibyx