Package mil.nga.sf.geojson
Class FeatureCollection
- java.lang.Object
-
- mil.nga.sf.geojson.GeoJsonObject
-
- mil.nga.sf.geojson.FeatureCollection
-
- All Implemented Interfaces:
Serializable,Iterable<Feature>
public class FeatureCollection extends GeoJsonObject implements Iterable<Feature>
Feature Collection- Author:
- yutzlejp
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FeatureCollection()ConstructorFeatureCollection(Collection<Feature> features)ConstructorFeatureCollection(Feature feature)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFeature(Feature feature)Add a featurevoidaddFeatures(Collection<Feature> features)Add the featuresbooleanequals(Object obj)FeaturegetFeature(int i)Get the feature at the indexList<Feature>getFeatures()Get the featuresGeometryTypegetGeometryType()Get the geometry typeMap<String,String>getPropertiesMap()Get the properties mapGeometrygetSimpleGeometry()Get the simple feature geometryStringgetType()Get the GeoJSON object typeinthashCode()Iterator<Feature>iterator()intnumFeatures()Get the number of featuresvoidsetFeatures(Collection<Feature> features)Set the features-
Methods inherited from class mil.nga.sf.geojson.GeoJsonObject
getBbox, getForeignMember, getForeignMembers, hasForeignMember, hasForeignMembers, setBbox, setForeignMember
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
FeatureCollection
public FeatureCollection()
Constructor
-
FeatureCollection
public FeatureCollection(Feature feature)
Constructor- Parameters:
feature- feature
-
FeatureCollection
public FeatureCollection(Collection<Feature> features)
Constructor- Parameters:
features- collection of features
-
-
Method Detail
-
setFeatures
public void setFeatures(Collection<Feature> features)
Set the features- Parameters:
features- collection of features
-
addFeature
public void addFeature(Feature feature)
Add a feature- Parameters:
feature- feature
-
addFeatures
public void addFeatures(Collection<Feature> features)
Add the features- Parameters:
features- collection of features
-
numFeatures
public int numFeatures()
Get the number of features- Returns:
- feature count
-
getFeature
public Feature getFeature(int i)
Get the feature at the index- Parameters:
i- index- Returns:
- feature
-
getSimpleGeometry
public Geometry getSimpleGeometry()
Get the simple feature geometry- Specified by:
getSimpleGeometryin classGeoJsonObject- Returns:
- simple feature geometry
-
getGeometryType
public GeometryType getGeometryType()
Get the geometry type- Returns:
- geometry type
- Since:
- 3.0.0
-
getPropertiesMap
public Map<String,String> getPropertiesMap()
Get the properties map- Returns:
- properties map
-
getType
public String getType()
Get the GeoJSON object type- Specified by:
getTypein classGeoJsonObject- Returns:
- GeoJSON object type
-
hashCode
public int hashCode()
- Overrides:
hashCodein classGeoJsonObject
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classGeoJsonObject
-
-