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

use npm version of marchingsquares (isobands/isolines) #1801

Closed
wants to merge 4 commits into from

Conversation

Eh2406
Copy link

@Eh2406 Eh2406 commented Dec 3, 2019

This closes #1797 by moving to the maintained version of marchingsquares on npm.

The test are updated to match the new observed behavior. Is there a good way to recheck that it is still the correct answer?

@Eh2406
Copy link
Author

Eh2406 commented Dec 3, 2019

Look like the CI failure is unrelated.

smallsaucepan added a commit to smallsaucepan/turf that referenced this pull request Nov 1, 2023
…s library from NPM. This commit supercedes PR Turfjs#1801 which is a few years old now. Resolves Turfjs#1797 based on a test case mentioned in that issue (added to unit tests in isobands). Slight changes to resulting coordinates in most fixtures, though all fixtures verified visually using geojson.io
smallsaucepan added a commit to smallsaucepan/turf that referenced this pull request Nov 3, 2023
…s library from NPM. This commit supercedes PR Turfjs#1801 which is a few years old now. Resolves Turfjs#1797 based on a test case mentioned in that issue (added to unit tests in isobands). Slight changes to resulting coordinates in most fixtures, though all fixtures verified visually using geojson.io
smallsaucepan added a commit to smallsaucepan/turf that referenced this pull request Nov 9, 2023
…s library from NPM. This commit supercedes PR Turfjs#1801 which is a few years old now. Resolves Turfjs#1797 based on a test case mentioned in that issue (added to unit tests in isobands). Slight changes to resulting coordinates in most fixtures, though all fixtures verified visually using geojson.io
smallsaucepan added a commit that referenced this pull request Nov 9, 2023
…st break" bug (#2527)

* Migrating isobands and isolines to use the third party marchingsquares library from NPM. This commit supercedes PR #1801 which is a few years old now. Resolves #1797 based on a test case mentioned in that issue (added to unit tests in isobands). Slight changes to resulting coordinates in most fixtures, though all fixtures verified visually using geojson.io

* Fixing turf-isolines to no longer ignore the first break passed. Where it looked like the unit tests have had a 0 break added as a work around e.g. 5 breaks but only 4 break properties, have removed the presumed workaround and reviewed test fixture output. Resolves #2129.

* Rolling back cloning workaround from commit d7c5322. This appears to have been unnecessary, possibly already having been fixed by adding linearRing: false to the isoContours call.
@smallsaucepan
Copy link
Member

Thanks for submitting this @Eh2406. Have reimplemented the marching squares integration and merged this as PR #2527. Will close this PR in favour of that one.

Though if you're still around are you able to run us through the background of the clean up to orderByArea?

@Eh2406
Copy link
Author

Eh2406 commented Nov 9, 2023

I am still around, and happy to answer questions. I do not remember the context. Do you have any links that might jar my memory?

@smallsaucepan
Copy link
Member

Thankyou! It's this commit "small clean up to orderByArea": 88b159a

Was that only to map-ify the code and make it more readable? Or was it to fix a bug? Looks like the old code might not have actually been comparing the area values?

@Eh2406
Copy link
Author

Eh2406 commented Nov 10, 2023

I think they are both correct. The old code did compare values, in the sort. The old code is O(n^2) and the new code is O(N*ln(N)), but I don't know if it matters for the size input.

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.

2 participants