Feature<T extends Geometry> class

A feature is a geospatial entity with id, properties and geometry.

Implements also Bounded.

Supports representing data from GeoJSON (https://geojson.org/) features.

Inheritance
Implemented types
Annotations
  • @immutable

Constructors

Feature({Object? id, Map<String, Object?>? properties, T? geometry, Bounds<Point<num>>? bounds})
A new feature of optional id, properties, geometry and bounds.
const

Properties

bounds Bounds<Point<num>>?
The bounds for this object (could be calculated if not explicitely set).
no setter
boundsExplicit Bounds<Point<num>>?
The explicit bounds for this object when available.
no setter
geometry Geometry?
An optional geometry for this feature.
no setter
hashCode int
The hash code for this object.
no setteroverride
id Object?
An optional identifier (null, int, BigInt or String) for this feature.
no setter
properties Map<String, Object?>
Required properties for this feature (allowed to be empty).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
project<R extends Point<num>>(Projection projection, {required CreatePosition<R> to}) Feature<Geometry>
Returns a new feature with geometry projected using projection.
override
toString() String
A string representation of this object.
override
toStringAs({TextWriterFormat<FeatureContent> format = GeoJSON.feature, int? decimals}) String
A string representation of this object, with an optional format applied.
inherited
transform(TransformPosition transform) Feature<T>
Returns a new feature with geometry transformed using transform.
override
writeTo(FeatureContent writer) → void
Writes this feature object to writer.
override

Operators

operator ==(Object other) bool
The equality operator.
override