Package com.mapbox.turf.models
Class LineIntersectsResult.Builder
java.lang.Object
com.mapbox.turf.models.LineIntersectsResult.Builder
- Enclosing class:
- LineIntersectsResult
Build a new
LineIntersectsResult instance and define its features by passing in
information through the offered methods.- Since:
- 3.0.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a new instance of aLineIntersectsResultclass.horizontalIntersection(Double horizontalIntersection) If the lines intersect, use this method to get the intersecting pointXvalue.onLine1(boolean onLine1) Determine if the intersecting point lands on line 1 or not.onLine2(boolean onLine2) Determine if the intersecting point lands on line 2 or not.verticalIntersection(Double verticalIntersection) If the lines intersect, use this method to get the intersecting pointYvalue.
-
Method Details
-
horizontalIntersection
If the lines intersect, use this method to get the intersecting pointXvalue.- Parameters:
horizontalIntersection- the x coordinates intersection point- Returns:
- the
Xvalue where the lines intersect - Since:
- 3.0.0
-
verticalIntersection
If the lines intersect, use this method to get the intersecting pointYvalue.- Parameters:
verticalIntersection- the y coordinates intersection point- Returns:
- the
Yvalue where the lines intersect - Since:
- 3.0.0
-
onLine1
Determine if the intersecting point lands on line 1 or not.- Parameters:
onLine1- true if the points land on line one, else false- Returns:
- true if the intersecting point is located on line 1, otherwise false
- Since:
- 3.0.0
-
onLine2
Determine if the intersecting point lands on line 2 or not.- Parameters:
onLine2- true if the points land on line two, else false- Returns:
- true if the intersecting point is located on line 2, otherwise false
- Since:
- 3.0.0
-
build
Builds a new instance of aLineIntersectsResultclass.- Returns:
- a new instance of
LineIntersectsResult - Since:
- 3.0.0
-