Feature class

A GeoJSON Feature object - a JSON object representing a spatially bounded entity. The full description is detailed in RFC 7946.

Constructors

Feature(G, P, string | number, BoundingBox)

Constructs a Feature.

Properties

bbox

The bounding box of the feature.

geometry

The geometry of the feature.

id

The id of the feature.

properties

The properties of the feature.

type

A GeoJSON type descriptor with value "Feature".

TYPE

A static GeoJSON type descriptor for the Feature class to be used in runtime comparisons.

Constructor Details

Feature(G, P, string | number, BoundingBox)

Constructs a Feature.

new Feature(geometry: G, properties?: P, id?: string | number, bbox?: BoundingBox)

Parameters

geometry

G

The geometry of the feature.

properties

P

The properties of the feature.

id

string | number

The id of the feature.

bbox
BoundingBox

The bounding box of the feature.

Property Details

bbox

The bounding box of the feature.

bbox?: BoundingBox

Property Value

geometry

The geometry of the feature.

geometry: G

Property Value

G

id

The id of the feature.

id?: string | number

Property Value

string | number

properties

The properties of the feature.

properties?: P

Property Value

P

type

A GeoJSON type descriptor with value "Feature".

type: string

Property Value

string

TYPE

A static GeoJSON type descriptor for the Feature class to be used in runtime comparisons.

static TYPE: string

Property Value

string