org.deegree.geometry.validation
Class GeometryValidator

java.lang.Object
  extended by org.deegree.geometry.validation.GeometryValidator

public class GeometryValidator
extends Object

Performs topological validation of Geometry objects.

The tested topological properties depend on the type of geometry:

Points

No constraints, Point geometries are always topologically valid.

Curves

Rings

The above events are also generated for Ring geometries (as they are a generally just closed Curve s). Additionally, the following events may occur:

PolygonPatches (= planar surfaces)

The boundaries of a PolygonPatch are Rings, which are tested and may generate the above events. Additionally, the following events may occur:

Version:
$Revision: 31641 $, $Date: 2011-08-24 21:24:55 +0200 (Wed, 24 Aug 2011) $
Author:
Markus Schneider , last edited by: $Author: mschneider $

Constructor Summary
GeometryValidator(GeometryValidationEventHandler eventHandler)
          Creates a new GeometryValidator which performs callbacks on the given GeometryValidationEventHandler in case of errors.
 
Method Summary
 boolean validateGeometry(Geometry geom)
          Performs a topological validation of the given Geometry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeometryValidator

public GeometryValidator(GeometryValidationEventHandler eventHandler)
Creates a new GeometryValidator which performs callbacks on the given GeometryValidationEventHandler in case of errors.

Parameters:
eventHandler - callback handler for errors
Method Detail

validateGeometry

public boolean validateGeometry(Geometry geom)
Performs a topological validation of the given Geometry.

Contained geometry objects and geometry particles are recursively checked (e.g. the members of a MultiGeometry) and callbacks to the associated GeometryValidationEventHandler are performed for each detected issue.

Parameters:
geom - geometry to be validated
Returns:
true, if the geometry is valid, false otherwise (depends on the GeometryValidationEventHandler implementation)


Copyright © 2011. All Rights Reserved.