Package com.mapbox.turf.models
Class LineIntersectsResult
java.lang.Object
com.mapbox.turf.models.LineIntersectsResult
if the lines intersect, the result contains the x and y of the intersection (treating the lines
as infinite) and booleans for whether line segment 1 or line segment 2 contain the point.
- Since:
- 1.2.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuild a newLineIntersectsResultinstance and define its features by passing in information through the offered methods. -
Method Summary
Modifier and TypeMethodDescriptionstatic LineIntersectsResult.Builderbuilder()Builds a new instance of a lineIntersection.booleaninthashCode()If the lines intersect, use this method to get the intersecting pointXvalue.booleanonLine1()Determine if the intersecting point lands on line 1 or not.booleanonLine2()Determine if the intersecting point lands on line 2 or not.Convert current instance values into another Builder to quickly change one or more values.toString()If the lines intersect, use this method to get the intersecting pointYvalue.
-
Method Details
-
builder
Builds a new instance of a lineIntersection. This class is mainly used internally for other turf objects to recall memory when performing calculations.- Returns:
LineIntersectsResult.Builderfor creating a new instance- Since:
- 3.0.0
-
horizontalIntersection
If the lines intersect, use this method to get the intersecting pointXvalue.- Returns:
- the
Xvalue where the lines intersect - Since:
- 1.2.0
-
verticalIntersection
If the lines intersect, use this method to get the intersecting pointYvalue.- Returns:
- the
Yvalue where the lines intersect - Since:
- 1.2.0
-
onLine1
public boolean onLine1()Determine if the intersecting point lands on line 1 or not.- Returns:
- true if the intersecting point is located on line 1, otherwise false
- Since:
- 1.2.0
-
onLine2
public boolean onLine2()Determine if the intersecting point lands on line 2 or not.- Returns:
- true if the intersecting point is located on line 2, otherwise false
- Since:
- 1.2.0
-
toString
-
equals
-
hashCode
public int hashCode() -
toBuilder
Convert current instance values into another Builder to quickly change one or more values.- Returns:
- a new instance of
LineIntersectsResultusing the newly defined values - Since:
- 3.0.0
-