org.n52.oxf.feature
Class OXFFeatureCollection

java.lang.Object
  extended by org.n52.oxf.feature.OXFFeature
      extended by org.n52.oxf.feature.OXFFeatureCollection
All Implemented Interfaces:
Iterable<OXFFeature>, org.opengis.feature.Feature

public class OXFFeatureCollection
extends OXFFeature
implements Iterable<OXFFeature>

Author:
Arne Broering

Field Summary
protected  Collection<OXFFeature> features
           
 
Constructor Summary
OXFFeatureCollection(String id, OXFFeatureType featureType)
           
OXFFeatureCollection(String id, OXFFeatureType featureType, Collection<OXFFeature> features)
           
 
Method Summary
 void add(Collection<OXFFeature> fCollection)
           
 void add(OXFFeature f)
           
 void add(OXFFeature[] fArray)
           
 boolean contains(org.opengis.feature.Feature f)
          Checks if the given feature is a member of this collection.
 boolean containsAll(Collection<org.opengis.feature.Feature> c)
          Checks if every feature in the given collection is also a member of this feature collection.
 com.vividsolutions.jts.geom.Geometry getBoundingBox()
           
 OXFFeature getFeature(String gmlID)
           
 OXFFeature getFeatureAtPoint(double worldX, double worldY)
           
 OXFFeature getFeatureAtPoint(double worldX, double worldY, double worldZ)
           
 boolean isEmpty()
          Returns true if this collection contains no Features.
 Iterator<OXFFeature> iterator()
          Returns an iterator that enumerates all of the features in this collection.
static void main(String[] args)
           
 String produceDescription()
           
 int size()
          Returns the size of the collection.
 org.opengis.feature.Feature[] toArray()
          Creates a Feature array and populates it.
 List<OXFFeature> toList()
           
 Set<OXFFeature> toSet()
           
 
Methods inherited from class org.n52.oxf.feature.OXFFeature
equals, getAttribute, getAttribute, getBounds, getFeatureType, getGeometry, getID, getParent, getSpecifiedAttributes, setAttribute, setAttribute, setGeometry, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

features

protected Collection<OXFFeature> features
Constructor Detail

OXFFeatureCollection

public OXFFeatureCollection(String id,
                            OXFFeatureType featureType)
Parameters:
id -
featureType -

OXFFeatureCollection

public OXFFeatureCollection(String id,
                            OXFFeatureType featureType,
                            Collection<OXFFeature> features)
Parameters:
id -
featureType -
features -
Method Detail

getFeatureAtPoint

public OXFFeature getFeatureAtPoint(double worldX,
                                    double worldY)
Parameters:
worldX -
worldY -
Returns:

getFeatureAtPoint

public OXFFeature getFeatureAtPoint(double worldX,
                                    double worldY,
                                    double worldZ)
Parameters:
worldX -
worldY -
Returns:

getFeature

public OXFFeature getFeature(String gmlID)

getBoundingBox

public com.vividsolutions.jts.geom.Geometry getBoundingBox()
Overrides:
getBoundingBox in class OXFFeature
Returns:
the computed BoundingBox of all contained OXFFeatures. or null if this object does not contain any features or the contained features have no geometry.

iterator

public Iterator<OXFFeature> iterator()
Returns an iterator that enumerates all of the features in this collection.

Specified by:
iterator in interface Iterable<OXFFeature>

toList

public List<OXFFeature> toList()
Returns:
a List containing all OXFFeatures of this OXFFeatureCollection.

toSet

public Set<OXFFeature> toSet()
Returns:
a Set containing all OXFFeatures of this OXFFeatureCollection.

toArray

public org.opengis.feature.Feature[] toArray()
                                      throws OutOfMemoryError
Creates a Feature array and populates it.

Throws:
OutOfMemoryError - if the feature collection is too large to fit into memory.

isEmpty

public boolean isEmpty()
Returns true if this collection contains no Features.


size

public int size()
Returns the size of the collection.


add

public void add(OXFFeature[] fArray)
Parameters:
fArray -

add

public void add(Collection<OXFFeature> fCollection)
Parameters:
fCollection -

add

public void add(OXFFeature f)
Parameters:
f -

contains

public boolean contains(org.opengis.feature.Feature f)
Checks if the given feature is a member of this collection.


containsAll

public boolean containsAll(Collection<org.opengis.feature.Feature> c)
Checks if every feature in the given collection is also a member of this feature collection.


produceDescription

public String produceDescription()
Overrides:
produceDescription in class OXFFeature

main

public static void main(String[] args)


Copyright © 2005 - 2010 52°North Initiative for Geospatial Open Source Software GmbH. All rights reserved.