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 void
addFeature(Feature feature)
Add a featurevoid
addFeatures(Collection<Feature> features)
Add the featuresboolean
equals(Object obj)
Feature
getFeature(int i)
Get the feature at the indexList<Feature>
getFeatures()
Get the featuresGeometryType
getGeometryType()
Get the geometry typeMap<String,String>
getPropertiesMap()
Get the properties mapGeometry
getSimpleGeometry()
Get the simple feature geometryString
getType()
Get the GeoJSON object typeint
hashCode()
Iterator<Feature>
iterator()
int
numFeatures()
Get the number of featuresvoid
setFeatures(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:
getSimpleGeometry
in 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:
getType
in classGeoJsonObject
- Returns:
- GeoJSON object type
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classGeoJsonObject
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classGeoJsonObject
-
-