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/boolean-valid is not part of turf and fails to build due to missing depedency #1918

Closed
JamesLMilner opened this issue Jun 17, 2020 · 3 comments

Comments

@JamesLMilner
Copy link
Collaborator

Firstly thanks for all your hard work on this fantastic library.

I wanted to point out a couple issues with boolean-valid. If boolean-valid does not seem to be be part of @turf/turf. I'm not sure if this is intentional? To reproduce do npm install @turf/turf and try and use turf.booleanValid.

Also, there appears to be a dependency on boolean-disjoint. I'm not sure if this should be specified in the depdencies here

?

To reproduce second issue:

import { Feature } from 'geojson';

import booleanValid from '@turf/boolean-valid';

export function featureIsValid(feature: Feature): boolean {
    return booleanValid(feature);
}

Without install boolean-disjoint results in:

ERROR in ../node_modules/@turf/boolean-disjoint/index.js
Module build failed: Error: ENOENT: no such file or directory, open '/home/james/Code/dentreality/customer-portal/node_modules/@turf/boolean-disjoint/index.js'
 @ ../node_modules/@turf/boolean-valid/dist/es/index.js 3:0-53 107:13-28
@rowanwins
Copy link
Member

Hey @JamesLMilner

There is some history back here #1302 regarding this, it was pretty rough when it got merged which is why it never made it into main package.

Sounds like you found a legit issue with an easy fix for the dependencies, but on the whole the module probably needs some more love.

Is there a particular validation you're after out of interest?

@JamesLMilner
Copy link
Collaborator Author

@rowanwins thanks for follow up, helpful to know. Does sound like an easy fix, I could look at raising it if you'd like?

Nothing in particular, we just had issues where we went to save invalid geometries and were looking for something that would help us prevent that from happening and this seemed like a good module to achieve that. Basically we were just looking to make sure LineStrings and Polygons in particular were well formed (i.e. had minimum number of coordinates and closed correctly)

sipris added a commit to DisyInformationssysteme/turf that referenced this issue Jun 15, 2021
sipris added a commit to DisyInformationssysteme/turf that referenced this issue Jun 23, 2021
mfedderly pushed a commit that referenced this issue Jun 23, 2021
@mfedderly
Copy link
Collaborator

I think this was fixed by #2094

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

3 participants