JTS Topology Suite version 1.12

com.vividsolutions.jts.geom.prep
Class PreparedLineString

java.lang.Object
  extended by com.vividsolutions.jts.geom.prep.PreparedLineString
All Implemented Interfaces:
PreparedGeometry

public class PreparedLineString
extends java.lang.Object

A prepared version for Lineal geometries.

Author:
mbdavis

Constructor Summary
PreparedLineString(Lineal line)
           
 
Method Summary
 boolean contains(Geometry g)
          Default implementation.
 boolean containsProperly(Geometry g)
          Default implementation.
 boolean coveredBy(Geometry g)
          Default implementation.
 boolean covers(Geometry g)
          Default implementation.
 boolean crosses(Geometry g)
          Default implementation.
 boolean disjoint(Geometry g)
          Standard implementation for all geometries.
protected  boolean envelopeCovers(Geometry g)
          Determines whether the envelope of this geometry covers the Geometry g.
protected  boolean envelopesIntersect(Geometry g)
          Determines whether a Geometry g interacts with this geometry by testing the geometry envelopes.
 Geometry getGeometry()
          Gets the original Geometry which has been prepared.
 FastSegmentSetIntersectionFinder getIntersectionFinder()
           
 java.util.List getRepresentativePoints()
          Gets the list of representative points for this geometry.
 boolean intersects(Geometry g)
          Default implementation.
 boolean isAnyTargetComponentInTest(Geometry testGeom)
          Tests whether any representative of the target geometry intersects the test geometry.
 boolean overlaps(Geometry g)
          Default implementation.
 java.lang.String toString()
           
 boolean touches(Geometry g)
          Default implementation.
 boolean within(Geometry g)
          Default implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PreparedLineString

public PreparedLineString(Lineal line)
Method Detail

getIntersectionFinder

public FastSegmentSetIntersectionFinder getIntersectionFinder()

intersects

public boolean intersects(Geometry g)
Default implementation.

Specified by:
intersects in interface PreparedGeometry
Parameters:
g - the Geometry to test
Returns:
true if this Geometry intersects the given Geometry
See Also:
Geometry.intersects(Geometry)

getGeometry

public Geometry getGeometry()
Description copied from interface: PreparedGeometry
Gets the original Geometry which has been prepared.

Specified by:
getGeometry in interface PreparedGeometry
Returns:
the base geometry

getRepresentativePoints

public java.util.List getRepresentativePoints()
Gets the list of representative points for this geometry. One vertex is included for every component of the geometry (i.e. including one for every ring of polygonal geometries)

Returns:
a List of Coordinate

isAnyTargetComponentInTest

public boolean isAnyTargetComponentInTest(Geometry testGeom)
Tests whether any representative of the target geometry intersects the test geometry. This is useful in A/A, A/L, A/P, L/P, and P/P cases.

Parameters:
geom - the test geometry
repPts - the representative points of the target geometry
Returns:
true if any component intersects the areal test geometry

envelopesIntersect

protected boolean envelopesIntersect(Geometry g)
Determines whether a Geometry g interacts with this geometry by testing the geometry envelopes.

Parameters:
g - a Geometry
Returns:
true if the envelopes intersect

envelopeCovers

protected boolean envelopeCovers(Geometry g)
Determines whether the envelope of this geometry covers the Geometry g.

Parameters:
g - a Geometry
Returns:
true if g is contained in this envelope

contains

public boolean contains(Geometry g)
Default implementation.

Specified by:
contains in interface PreparedGeometry
Parameters:
g - the Geometry to test
Returns:
true if this Geometry contains the given Geometry
See Also:
Geometry.contains(Geometry)

containsProperly

public boolean containsProperly(Geometry g)
Default implementation.

Specified by:
containsProperly in interface PreparedGeometry
Parameters:
g - the Geometry to test
Returns:
true if this Geometry properly contains the given Geometry
See Also:
Geometry.contains(com.vividsolutions.jts.geom.Geometry)

coveredBy

public boolean coveredBy(Geometry g)
Default implementation.

Specified by:
coveredBy in interface PreparedGeometry
Parameters:
g - the Geometry to test
Returns:
true if this Geometry is covered by the given Geometry
See Also:
Geometry.coveredBy(Geometry)

covers

public boolean covers(Geometry g)
Default implementation.

Specified by:
covers in interface PreparedGeometry
Parameters:
g - the Geometry to test
Returns:
true if this Geometry covers the given Geometry
See Also:
Geometry.covers(Geometry)

crosses

public boolean crosses(Geometry g)
Default implementation.

Specified by:
crosses in interface PreparedGeometry
Parameters:
g - the Geometry to test
Returns:
true if this Geometry crosses the given Geometry
See Also:
Geometry.crosses(Geometry)

disjoint

public boolean disjoint(Geometry g)
Standard implementation for all geometries. Supports GeometryCollections as input.

Specified by:
disjoint in interface PreparedGeometry
Parameters:
g - the Geometry to test
Returns:
true if this Geometry is disjoint from the given Geometry
See Also:
Geometry.disjoint(Geometry)

overlaps

public boolean overlaps(Geometry g)
Default implementation.

Specified by:
overlaps in interface PreparedGeometry
Parameters:
g - the Geometry to test
Returns:
true if this Geometry overlaps the given Geometry
See Also:
Geometry.overlaps(Geometry)

touches

public boolean touches(Geometry g)
Default implementation.

Specified by:
touches in interface PreparedGeometry
Parameters:
g - the Geometry to test
Returns:
true if this Geometry touches the given Geometry
See Also:
Geometry.touches(Geometry)

within

public boolean within(Geometry g)
Default implementation.

Specified by:
within in interface PreparedGeometry
Parameters:
g - the Geometry to test
Returns:
true if this Geometry is within the given Geometry
See Also:
Geometry.within(Geometry)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

JTS Topology Suite version 1.12