Features
A geometry with properties. Created with kind feature.
| Type | Class |
|---|---|
"feature" | Feature |
"feature" — Feature
{"type": "feature", "geometry": …, "properties": …}
| Key | Type | Always required | Notes |
|---|---|---|---|
geometry | object std::shared_ptr<Geometry> | yes | an id of kind geometry, or an inline spec |
properties | struct Variant | yes |
| Property | Type | Access | Description |
|---|---|---|---|
geometry | object geometry.Geometry | read-only | Returns the geometry of the feature. |
geometryGeoJSON | string | read-only | Returns the feature's geometry as a GeoJSON string, in its own coordinates. Serialising a geometry otherwise means constructing a GeoJSONGeometryWriter in the binding, which every binding then does differently and, in a scripting one, slowly. |
properties | variant | read-only | Returns the properties of the feature. |