Class FeatureCollection

java.lang.Object
com.massifmaps.geometry.FeatureCollection
Direct Known Subclasses:
VectorTileFeatureCollection

public class FeatureCollection extends Object
A collection of features.
  • Constructor Details

    • FeatureCollection

      public FeatureCollection(FeatureVector features)
      Constructs a FeatureCollection from a vector of features.
      Parameters:
      features - The features for the collection.
  • Method Details

    • getFeatureCount

      public int getFeatureCount()
      Returns the number of features in this container.
      Returns:
      The number of features.
    • getFeature

      public Feature getFeature(int index)
      Returns the feature at the specified index. Index must be between 0 and getFeatureCount (exclusive).
      Parameters:
      index - The index of the feature to get.
      Returns:
      The feature at specified index.
      Throws:
      IndexOutOfBoundsException - If the index is out of range.