-
Notifications
You must be signed in to change notification settings - Fork 943
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
New module @turf/boolean-parallel
#941
Conversation
* @param {string} name of the variable | ||
* @returns {string} Feature's type | ||
*/ | ||
function getType(geojson, name) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stebogit This private looks great, we should add this to @turf/invariant
.
Similar to getGeomType
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I always wondered why we didn't have that there 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I'll add it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks great!
@@ -13,7 +13,6 @@ test('turf-boolean-parallel', t => { | |||
const [line1, line2] = geojson.features; | |||
const result = booleanParallel(line1, line2); | |||
|
|||
if (process.env.SHAPELY) shapely.contains(line1, line2).then(result => t.true(result, '[true] shapely - ' + name)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DenisCarriere out of curiosity why did you remove this?
Many other boolean modules have that, some of them also have
if (process.env.JSTS) t.false(booleanJSTS('within', feature1, feature2), '[false] JSTS - ' + name);
What's their use exactly?
Woo-hoo!! 😄:+1: |
Ref. #735
The module supports only
LineStrings
(feature or geometry), leaving the user to decide how to apply the comparison among multi lines.Note: the definition of comparison is based on segment having the same slope on the map plain, i.e. equal
rhumb-bearing
.I don't know which definition has, if existing, parallelism on a sphere, but I feel it would be beyond Turf applications.