Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

field order #1

Open
missinglink opened this issue Nov 24, 2015 · 0 comments
Open

field order #1

missinglink opened this issue Nov 24, 2015 · 0 comments

Comments

@missinglink
Copy link
Member

ensure we maintain field order (eg. the id must come first).

this 'just works' right now because js magically maintains the order of elements added to an object (this should not be relied upon), so when using decode and encode it works, but manipulating fields could cause them to be re-ordered.

maintaining field order is easy to implement, just need to cycle over the keys in the keymap and add them in order. in this case we need to consider what to do about fields not defined in the spec, either discard them or append them to the line.

tags seem to be added in the order they were inserted in to the osm database and so there is no way we can ensure any sort of consistency there. the spec should force them to be alphabetically ordered so that a decode+encode operation is idempotent and consistent (helpful in testing)

@missinglink missinglink changed the title property order field order Nov 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant