org.geotools.validation.relate
Class OverlapsIntegrity

java.lang.Object
  extended by org.geotools.validation.DefaultIntegrityValidation
      extended by org.geotools.validation.relate.RelationIntegrity
          extended by org.geotools.validation.relate.OverlapsIntegrity
All Implemented Interfaces:
IntegrityValidation, Validation

public class OverlapsIntegrity
extends RelationIntegrity

OverlapsIntegrity

Version:

Puropse:

Tests to see if a Geometry overlaps, partially or entirely, with another Geometry. Description:

If only one layer is provided, the geometries of that layer are compared with each other. If two layers are provided, then the geometries are compared across the layers.

Usage:

OverlapsIntegrity overlap = new OverlapsIntegrity(); overlap.setExpected(false); overlap.setGeomTypeRefA("my:line"); Map map = new HashMap(); try { map.put("my:line", mds.getFeatureSource("line")); } catch (IOException e1) { e1.printStackTrace(); } try { assertFalse(overlap.validate(map, lineBounds, vr)); } catch (Exception e) { e.printStackTrace(); }

Author:
bowens, ptozer
Created Apr 27, 2004

Field Summary
 
Fields inherited from class org.geotools.validation.relate.RelationIntegrity
EMPTY, expected
 
Fields inherited from interface org.geotools.validation.Validation
ALL, PRIORITY_COMPLEX, PRIORITY_INVOLVED, PRIORITY_SIMPLE, PRIORITY_TRIVIAL
 
Constructor Summary
OverlapsIntegrity()
          OverlapsIntegrity Constructor
 
Method Summary
static org.opengis.filter.Filter filterBBox(com.vividsolutions.jts.geom.Envelope bBox, org.opengis.feature.simple.SimpleFeatureType ft)
          Try and Filter by the provided bbox, will default to Filter.EXCLUDE if null
 boolean validate(java.util.Map layers, ReferencedEnvelope envelope, ValidationResults results)
          Check FeatureType for ...
 
Methods inherited from class org.geotools.validation.relate.RelationIntegrity
getGeomTypeRefA, getGeomTypeRefB, getTypeRefs, isExpected, setExpected, setExpected, setGeomTypeRefA, setGeomTypeRefB
 
Methods inherited from class org.geotools.validation.DefaultIntegrityValidation
getDescription, getName, getPriority, setDescription, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OverlapsIntegrity

public OverlapsIntegrity()
OverlapsIntegrity Constructor

Method Detail

validate

public boolean validate(java.util.Map layers,
                        ReferencedEnvelope envelope,
                        ValidationResults results)
                 throws java.lang.Exception
Description copied from class: DefaultIntegrityValidation
Check FeatureType for ...

Detailed description...

Specified by:
validate in interface IntegrityValidation
Overrides:
validate in class DefaultIntegrityValidation
Parameters:
layers - Map of FeatureSource by "dataStoreID:typeName"
envelope - The bounding box that encloses the unvalidated data
results - Used to coallate results information
Returns:
true if all the features pass this test.
Throws:
java.lang.Exception - DOCUMENT ME!

filterBBox

public static org.opengis.filter.Filter filterBBox(com.vividsolutions.jts.geom.Envelope bBox,
                                                   org.opengis.feature.simple.SimpleFeatureType ft)
                                            throws FactoryRegistryException,
                                                   IllegalFilterException
Try and Filter by the provided bbox, will default to Filter.EXCLUDE if null

Throws:
FactoryRegistryException
IllegalFilterException


Copyright © 1996-2010 Geotools. All Rights Reserved.