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, then feature is not placed on the map.

Types

FeatureBuilder

open class FeatureBuilder

Constructors

<init>

Feature()

Empty constructor for the Feature.

Feature(properties: Optional<Properties!>!, geometry: Optional<Geometry!>!, id: Optional<String!>!)

Default constructor for the Feature object.

Inherited Properties

boundingBox

var boundingBox: Optional<BoundingBox!>!

type

val type: String!

Functions

accept

open fun accept(visitor: GeoJsonObjectVisitor!): Unit

builder

open static fun builder(): Feature.FeatureBuilder!

Creates a new instance of FeatureBuilder.

getGeometry

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

Get the Geometry describing this feature. If geometry is absent, then feature is not placed on the map.

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's 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.