GEOS: geos::geom::prep::PreparedLineStringIntersects Class Reference

Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

# geos::geom::prep::PreparedLineStringIntersects Class Reference

Computes the `intersects` spatial relationship predicate for a target PreparedLineString relative to all other Geometry classes. More...

`#include <PreparedLineStringIntersects.h>`

List of all members.

## Public Member Functions
| PreparedLineStringIntersects (PreparedLineString &prep)
bool | intersects (const geom::Geometry *g) const
## Static Public Member Functions
static bool | intersects (PreparedLineString &prep, const geom::Geometry *geom)
## Protected Member Functions
bool | isAnyTestPointInTarget (const geom::Geometry *testGeom) const
| PreparedLineStringIntersects (const PreparedLineStringIntersects &other)
PreparedLineStringIntersects & | operator= (const PreparedLineStringIntersects &rhs)
## Protected Attributes
PreparedLineString & | prepLine

## Detailed Description

Computes the `intersects` spatial relationship predicate for a target PreparedLineString relative to all other Geometry classes.

Uses short-circuit tests and indexing to improve performance.

Author:
  Martin Davis

## Constructor & Destructor Documentation

geos::geom::prep::PreparedLineStringIntersects::PreparedLineStringIntersects | ( | PreparedLineString & | prep ) | `[inline]`

Todo:
  FIXME - mloskot: Why not taking linestring through const reference?

geos::geom::prep::PreparedLineStringIntersects::PreparedLineStringIntersects | ( | const PreparedLineStringIntersects & | other ) | `[protected]`

This could be optimized by using the segment index on the lineal target. However, it seems like the L/P case would be pretty rare in practice.

## Member Function Documentation

static bool geos::geom::prep::PreparedLineStringIntersects::intersects | ( | PreparedLineString & | prep,
|  | const geom::Geometry * | geom
| ) |  | `[inline, static]`

Computes the intersects predicate between a PreparedLineString and a Geometry.

Parameters:

  prep | the prepared linestring
  geom | a test geometry

Returns:
  true if the linestring intersects the geometry

References intersects().

Referenced by intersects().

bool geos::geom::prep::PreparedLineStringIntersects::intersects | ( | const geom::Geometry * | g ) | const

Tests whether this geometry intersects a given geometry.

Parameters:

  geom | the test geometry

Returns:
  true if the test geometry intersects

bool geos::geom::prep::PreparedLineStringIntersects::isAnyTestPointInTarget | ( | const geom::Geometry * | testGeom ) | const`[protected]`

Tests whether any representative point of the test Geometry intersects the target geometry. Only handles test geometries which are Puntal (dimension 0)

Parameters:

  geom | a Puntal geometry to test

Returns:
  true if any point of the argument intersects the prepared geometry

The documentation for this class was generated from the following file:

- PreparedLineStringIntersects.h