FeatureCollection

@Serializable(with = FeatureCollectionSerializer::class)
data class FeatureCollection<out G : Geometry?, out P> @JvmOverloads constructor(val features: List<Feature<G, P>> = emptyList(), val bbox: BoundingBox? = null) : Collection<Feature<G, P>> , GeoJsonObject(source)

A FeatureCollection object is a collection of Feature objects. This class implements the Collection interface and can be used as a collection directly. The list of Feature objects contained in this FeatureCollection is also accessible through the features property.

See RFC 7946 Section 3.3 for the full specification.

Constructors

Link copied to clipboard
constructor(features: List<Feature<G, P>> = emptyList(), bbox: BoundingBox? = null)
constructor(vararg features: Feature<G, P>, bbox: BoundingBox? = null)

Constructs a FeatureCollection from a vararg of Feature objects.

Types

Link copied to clipboard
object Companion

Factory methods for creating and serializing FeatureCollection objects.

Properties

Link copied to clipboard
open override val bbox: BoundingBox?

An optional BoundingBox used to represent the limits of the object's Geometry.

Link copied to clipboard

The collection of Feature objects stored in this FeatureCollection

Link copied to clipboard
open override val size: Int

Functions

Link copied to clipboard
open operator override fun contains(element: Feature<G, P>): Boolean
Link copied to clipboard
open override fun containsAll(elements: Collection<Feature<G, P>>): Boolean
Link copied to clipboard
operator fun get(index: Int): Feature<G, P>

Get the feature at the specified index.

Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open operator override fun iterator(): Iterator<Feature<G, P>>