Skip to content

Commit

Permalink
Port locationtech/jts#717 Improve IsSimpleOp design and performance
Browse files Browse the repository at this point in the history
  • Loading branch information
pramsey committed Jun 8, 2021
1 parent 02f9128 commit 7136961
Show file tree
Hide file tree
Showing 5 changed files with 535 additions and 411 deletions.
14 changes: 14 additions & 0 deletions include/geos/algorithm/LineIntersector.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,20 @@ class GEOS_DLL LineIntersector {
return result != NO_INTERSECTION;
}


/**
* Gets an endpoint of an input segment.
*
* @param segmentIndex the index of the input segment (0 or 1)
* @param ptIndex the index of the endpoint (0 or 1)
* @return the specified endpoint
*/
const geom::Coordinate*
getEndpoint(std::size_t segmentIndex, std::size_t ptIndex) const
{
return inputLines[segmentIndex][ptIndex];
}

/// Returns the number of intersection points found.
///
/// This will be either 0, 1 or 2.
Expand Down
Loading

0 comments on commit 7136961

Please sign in to comment.