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

@turf/idw bad property name #774

Closed
dpmcmlxxvi opened this issue May 30, 2017 · 3 comments
Closed

@turf/idw bad property name #774

dpmcmlxxvi opened this issue May 30, 2017 · 3 comments

Comments

@dpmcmlxxvi
Copy link
Collaborator

dpmcmlxxvi commented May 30, 2017

The documentation for IDW states that the output interpolated value property for each grid cell will be added to a point property called IDW. However, the implementation is actually saving it to a property named z. Fixing this would break the API so should be targeted for next major release.

A short term fix could be to change the docs to reflect the name of the actual parameter. However, the name z is misleading since the interpolated value doesn't need ot have anything with the z coordinate. So long term the property name should be fixed.

@DenisCarriere
Copy link
Member

DenisCarriere commented May 30, 2017

Agreed that the docs are incorrect.

Instead of using z or IDW as the new property, why not return the same given valueField as the IDW value.

Example: Provide points using a population value => apply IDW => Polygons with population IDW value.

@dpmcmlxxvi
Copy link
Collaborator Author

Yeah, the valueField is good too.

DenisCarriere pushed a commit that referenced this issue Jun 19, 2017
* renamed property named passed to output

* fixed bench; added contributor

* Dynamic test fixtures
- Update Typescript URL
- Add validation
- Add dynamic tests fixtures

* Update bench tests with dynamic fixtures

* truncate fixtures

* Drop deepEqual from testing
@stebogit
Copy link
Collaborator

Fixed by PR #800

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants