Package org.bremersee.geojson
Class GeoJsonFeatureCollection<G extends org.locationtech.jts.geom.Geometry,P>
java.lang.Object
org.bremersee.geojson.model.UnknownAware
org.bremersee.geojson.GeoJsonFeatureCollection<G,P>
- Type Parameters:
G- the geometry type parameterP- the properties type parameter
public class GeoJsonFeatureCollection<G extends org.locationtech.jts.geom.Geometry,P>
extends org.bremersee.geojson.model.UnknownAware
A GeoJSON object with the type
FeatureCollection is a feature collection object (see
rfc7946 section 3.3).- Author:
- Christian Bremer
-
Constructor Summary
ConstructorsConstructorDescriptionGeoJsonFeatureCollection(boolean withBoundingBox) Instantiates a new geo json feature collection.GeoJsonFeatureCollection(boolean withBoundingBox, Comparator<GeoJsonFeature<G, P>> comparator) Instantiates a new Geo json feature collection.GeoJsonFeatureCollection(double[] bbox, Collection<? extends GeoJsonFeature<G, P>> features) Instantiates a new geo json feature collection.GeoJsonFeatureCollection(double[] bbox, Collection<? extends GeoJsonFeature<G, P>> features, Comparator<GeoJsonFeature<G, P>> comparator) Instantiates a new Geo json feature collection.GeoJsonFeatureCollection(Collection<? extends GeoJsonFeature<G, P>> features, boolean calculateBounds) Instantiates a new Geo json feature collection.GeoJsonFeatureCollection(Collection<? extends GeoJsonFeature<G, P>> features, boolean calculateBounds, Comparator<GeoJsonFeature<G, P>> comparator) Instantiates a new Geo json feature collection. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(GeoJsonFeature<G, P> feature) Add.voidaddAll(Collection<? extends GeoJsonFeature<G, P>> features) Add all.booleandouble[]getBbox()Return the bounding box of the GeoJSON object ornullif there is no such object (see Bounding Box).List<GeoJsonFeature<G, P>> Gets features.final StringgetType()Gets type.inthashCode()toString()Methods inherited from class org.bremersee.geojson.model.UnknownAware
canEqual, findUnknown, findUnknownList, findUnknownMap, hasUnknown, unknown, unknown, unknown
-
Constructor Details
-
GeoJsonFeatureCollection
public GeoJsonFeatureCollection(double[] bbox, Collection<? extends GeoJsonFeature<G, P>> features, Comparator<GeoJsonFeature<G, P>> comparator) Instantiates a new Geo json feature collection.- Parameters:
bbox- the bboxfeatures- the featurescomparator- the comparator
-
GeoJsonFeatureCollection
Instantiates a new geo json feature collection.- Parameters:
bbox- the bboxfeatures- the features
-
GeoJsonFeatureCollection
public GeoJsonFeatureCollection(Collection<? extends GeoJsonFeature<G, P>> features, boolean calculateBounds) Instantiates a new Geo json feature collection.- Parameters:
features- the featurescalculateBounds- the calculate bounds
-
GeoJsonFeatureCollection
public GeoJsonFeatureCollection(Collection<? extends GeoJsonFeature<G, P>> features, boolean calculateBounds, Comparator<GeoJsonFeature<G, P>> comparator) Instantiates a new Geo json feature collection.- Parameters:
features- the featurescalculateBounds- the calculate boundscomparator- the comparator
-
GeoJsonFeatureCollection
public GeoJsonFeatureCollection(boolean withBoundingBox, Comparator<GeoJsonFeature<G, P>> comparator) Instantiates a new Geo json feature collection.- Parameters:
withBoundingBox- the with bounding boxcomparator- the comparator
-
GeoJsonFeatureCollection
public GeoJsonFeatureCollection(boolean withBoundingBox) Instantiates a new geo json feature collection.- Parameters:
withBoundingBox- the with bounding box
-
-
Method Details
-
getType
Gets type.- Returns:
- the type
-
getBbox
public double[] getBbox()Return the bounding box of the GeoJSON object ornullif there is no such object (see Bounding Box).- Returns:
- the bounding box
-
getFeatures
Gets features.- Returns:
- the features
-
add
Add.- Parameters:
feature- the feature
-
addAll
Add all.- Parameters:
features- the features
-
equals
- Overrides:
equalsin classorg.bremersee.geojson.model.UnknownAware
-
hashCode
public int hashCode()- Overrides:
hashCodein classorg.bremersee.geojson.model.UnknownAware
-
toString
- Overrides:
toStringin classorg.bremersee.geojson.model.UnknownAware
-