sdk-common / com.tomtom.online.sdk.common.geojson / Feature

Feature

open class Feature : GeoJsonObject, Visitable<GeoJsonObjectVisitor!>, Serializable

Represents a spatially bound entity. Consists of a Geometry object and an id. Both are optional. If geometry is absent, the feature is unlocated.

Types

FeatureBuilder

open class FeatureBuilder

Constructors

<init>

Feature()

Represents a spatially bound entity. Consists of a Geometry object and an id. Both are optional. If geometry is absent, the feature is unlocated.

Inherited Properties

boundingBox

var boundingBox: Optional<BoundingBox!>!

type

val type: String!

Functions

accept

open fun accept(visitor: GeoJsonObjectVisitor!): Unit

getGeometry

open fun getGeometry(): Optional<Geometry!>!

Get the Geometry describing this feature. If geometry is absent, the Feature is unlocated.

getId

open fun getId(): Optional<String!>!

Get a commonly used identifier, if such exists.

getProperties

open fun getProperties(): Optional<Properties!>!

Get the Properties describing this feature properties.

Inherited Functions

getBoundingBox

open fun getBoundingBox(): Optional<BoundingBox!>!

A bounding box enclosing all geometries contained in this GeoJsonObject. Might be undefined.

setBoundingBox

open fun setBoundingBox(boundingBox: BoundingBox!): Unit

toJson

open fun toJson(): String!

Represent GeoJSON as a String compatible with RFC 7946 specification.