Propose isParallel as new module
See original GitHub issuePropose @turf/boolean-parallel
module
To complement the boolean
themed modules, this would only input (Multi)LineString geometry types and should be able to detect if the two inputs are parallel or not.
The majority of the code is already built in @turf/line-offset
in isParallel()
which was inspired by node-intersection
.
The only trick with this module would be to support LineString inputs with more than 2 vertices, @turf/line-segment
can help iterate over both inputs.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
A new meta-module design for efficient reconfiguration of ...
Abstract. We propose a new meta-module design for two important classes of modular robots. The new meta-modules are three-dimensional, robust ...
Read more >Module 24 Flashcards - Quizlet
What is parallel processing? The processing of many aspects of a problem simultaneously; the brain's natural mode of information processing for many ...
Read more >Parallel running - Wikipedia
Parallel running is a strategy for system changeover where a new system slowly assumes the roles of the older system while both systems...
Read more >CSS Flexible Box Layout Module Level 1 - W3C
This module introduces a new layout mode, flex layout , which is designed for laying out more complex applications and webpages.
Read more >Development of Variable Viscoelastic Joint Module ... - MDPI
Versatility: New robotic systems can be quickly built, or new functionalities can be enabled by connecting a few identical or similar modules in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@dpmcmlxxvi
What function would you use to calculate the distance? I can’t think of one Why would you avoid angles, what kind of issues do you think might arise?
Additional thought, would two parallel
rhumb-lines
have always the same (rhumb
, I guess) distance?What about Great-Circle lines? Maybe these can’t be parallel…?
I’d say yes.
To me this seems to be maybe too restrictive; two multi-segment
LineString
would be parallel only in case of a translation, as you pointed out. At this point comparing just the bearings makes it very convenient in my opinion.I would leave to the user how to define how to compare complex geometries; I feel like it would be kind of a guessing and most of the time a waist of resources in trying a lot of different combinations. However we can implement this part at any later time if necessary.
I’d recommend working up a definition for “parallel” for the various cases first:
LineString
it’s a little vague how the parallel postulate would be applied. Would it be sequential segments that are parallel? Does each sequential pair have to be of the same length? If they do, are you really looking for anequal
geometry that has just been shifted?MultiLineString
you could define parallel as being that everyLineString
inMultiLineString #1
has a uniqueLineString
inMultiLineString #2
to which it is parallel, and vice versa.Lots of things to think through. Would be interesting to see if there is an agreed upon definition for these types of geometries out there.