vincentneo / CoreGPX

A library for parsing and creation of GPX location files. Purely Swift.
https://www.vincent-neo.com
MIT License
261 stars 57 forks source link

Support for enforced and/or filtered attributes #66

Open dkcas11 opened 4 years ago

dkcas11 commented 4 years ago

Hi,

From reading the documentation it doesn't seem to be possible apply external rules to the parser. I'd like to make sure that all points gathered all contain elevation too, and not reiterate over the points again once the parser is complete but rather inject this logic.

Basically inject logic into the check of data, to either ensure the data is correct and throw an error, or simply filter out the "bad" data that doesn't contain what you as the developer would like the data to contain.

What do you think about this idea?

Best regards, Casper

vincentneo commented 4 years ago

Hi Casper,

That does sound like a nice idea, though not sure if it would be easy to implement. I'll probably get to it after #63 is done.