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

Do not modify source data, include geojson from file and compute bbox consistently #139

Merged
merged 11 commits into from
Sep 12, 2021

Conversation

mattijn
Copy link
Owner

@mattijn mattijn commented Sep 12, 2021

This PR fix #137 and #138 and a bit more.
The source data of from json-dicts are deepcopied on feature collection level, so cannot be modified anymore.
The load-from-topojson-code is moved to a serialize_as_topojson() function. In this function there is code introduced to get the bbox even when the arcs are quantised and delta encoded.
Also modifications are added that this bbox is correctly computed in case of toposimplify and topoquantize.

Also this PR introduce the ability to directly parse GeoJSON type FeatureCollection from json without the use of geojson module.
Since geojson data from file can now directly be read from json module also update the docs to reflect on this. Link: https://mattijn.github.io/topojson/example/input-types.html#geojson-data-from-file

@mattijn mattijn merged commit 0dd31e8 into master Sep 12, 2021
@mattijn mattijn deleted the fix-modify-source-data branch June 9, 2022 12:21
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

Successfully merging this pull request may close these issues.

Topology modifies source data
1 participant