org.geotools.geometry.jts
Class GeometryClipper
Object
GeometryClipper
public class GeometryClipper
- extends Object
A stateful geometry clipper, can clip linestring on a specified rectangle. Trivial benchmarks
report a speedup factor between 20 and 60 compared to JTS generic intersection algorithm. The
class is not thread safe.
- Author:
- Andrea Aime - OpenGeo
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GeometryClipper
public GeometryClipper(Envelope bounds)
getBounds
public Envelope getBounds()
clip
public Geometry clip(Geometry g,
boolean ensureValid)
- Clips the geometry on the specified bounds.
- Parameters:
g
- The geometry to be clippedensureValid
- If false there is no guarantee the polygons returned will be valid according to
JTS rules (but should still be good enough to be used for pure rendering)
- Returns:
Copyright © 1996-2014 Geotools. All Rights Reserved.