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 parameter
P - 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 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 bbox
      features - the features
      comparator - the comparator
    • GeoJsonFeatureCollection

      public GeoJsonFeatureCollection(double[] bbox, Collection<? extends GeoJsonFeature<G,P>> features)
      Instantiates a new geo json feature collection.
      Parameters:
      bbox - the bbox
      features - the features
    • GeoJsonFeatureCollection

      public GeoJsonFeatureCollection(Collection<? extends GeoJsonFeature<G,P>> features, boolean calculateBounds)
      Instantiates a new Geo json feature collection.
      Parameters:
      features - the features
      calculateBounds - 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 features
      calculateBounds - the calculate bounds
      comparator - the comparator
    • GeoJsonFeatureCollection

      public GeoJsonFeatureCollection(boolean withBoundingBox, Comparator<GeoJsonFeature<G,P>> comparator)
      Instantiates a new Geo json feature collection.
      Parameters:
      withBoundingBox - the with bounding box
      comparator - the comparator
    • GeoJsonFeatureCollection

      public GeoJsonFeatureCollection(boolean withBoundingBox)
      Instantiates a new geo json feature collection.
      Parameters:
      withBoundingBox - the with bounding box
  • Method Details

    • getType

      public final String getType()
      Gets type.
      Returns:
      the type
    • getBbox

      public double[] getBbox()
      Return the bounding box of the GeoJSON object or null if there is no such object (see Bounding Box).
      Returns:
      the bounding box
    • getFeatures

      public List<GeoJsonFeature<G,P>> getFeatures()
      Gets features.
      Returns:
      the features
    • add

      public void add(GeoJsonFeature<G,P> feature)
      Add.
      Parameters:
      feature - the feature
    • addAll

      public void addAll(Collection<? extends GeoJsonFeature<G,P>> features)
      Add all.
      Parameters:
      features - the features
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class org.bremersee.geojson.model.UnknownAware
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class org.bremersee.geojson.model.UnknownAware
    • toString

      public String toString()
      Overrides:
      toString in class org.bremersee.geojson.model.UnknownAware