lineintersector

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2023 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LineIntersectsLine

func LineIntersectsLine(strategy Strategy, line1Start, line1End, line2Start, line2End geom.Coord) lineintersection.Result

LineIntersectsLine tests if the first line (line1Start,line1End) intersects the second line (line2Start, line2End) and returns a data structure that indicates if there was an intersection, the type of intersection and where the intersection was. See lineintersection.Result for a more detailed explanation of the result object

func PointIntersectsLine

func PointIntersectsLine(strategy Strategy, point, lineStart, lineEnd geom.Coord) (hasIntersection bool)

PointIntersectsLine tests if point intersects the line

Types

type NonRobustLineIntersector

type NonRobustLineIntersector struct {
}

NonRobustLineIntersector is a performant but non robust line intersection implementation.

type RobustLineIntersector

type RobustLineIntersector struct {
}

RobustLineIntersector is a less performant implementation when compared to the non robust implementation but provides more consistent results in extreme cases

type Strategy

type Strategy interface {
	// contains filtered or unexported methods
}

Strategy is the line intersection implementation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL