FeatureCollection

@Serializable(with = FeatureCollectionSerializer::class)
data class FeatureCollection(val features: List<Feature<Geometry>> = emptyList(), val bbox: BoundingBox? = null, val foreignMembers: Map<String, Any> = emptyMap()) : Collection<Feature<Geometry>> , GeoJson

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 features contained in this collection are also accessible through the features property.

See also

Constructors

Link copied to clipboard
constructor(vararg features: Feature<Geometry>, bbox: BoundingBox? = null, foreignMembers: Map<String, Any> = emptyMap())
constructor(features: List<Feature<Geometry>> = emptyList(), bbox: BoundingBox? = null, foreignMembers: Map<String, Any> = emptyMap())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val bbox: BoundingBox? = null

An optional bounding box used to represent the limits of the object's geometry.

Link copied to clipboard

The collection of Feature objects stored in this collection

Link copied to clipboard
open override val foreignMembers: Map<String, Any>

Members not described by specification ("foreign members") MAY be used in a GeoJSON document. NOTE: Every custom type, which is added as a value will be represented also as a Map<String, Any>. If deserialization of custom types are desired, this hast to be done by consumer.

Functions

Link copied to clipboard
open override fun json(): String

Gets a JSON representation of this object.

Link copied to clipboard
open override fun toString(): String