Class Feature
A single geographic feature.
public sealed class Feature
- Inheritance
-
Feature
- Inherited Members
Properties
Attributes
Feature attributes as key-value pairs.
public IReadOnlyDictionary<string, object?> Attributes { get; init; }
Property Value
Geometry
Feature geometry as a GeoServices JSON dictionary.
public IReadOnlyDictionary<string, object?>? Geometry { get; init; }
Property Value
GlobalId
Stable UUID identity independent of the integer feature ID.
public string GlobalId { get; init; }
Property Value
Id
Feature ID.
public long Id { get; init; }
Property Value
NtsGeometry
NetTopologySuite geometry carried with the feature; preferred over parsing the GeoServices JSON dictionary.
public Geometry? NtsGeometry { get; init; }
Property Value
- Geometry
Methods
ToGeometry()
Returns the feature geometry as a NetTopologySuite geometry, or null when the feature has none.
public Geometry? ToGeometry()
Returns
- Geometry
WithGeometry(Geometry, IReadOnlyDictionary<string, object?>?, long, HonuaSpatialReference?)
Creates a feature from a NetTopologySuite geometry so the write path skips the dictionary round-trip.
public static Feature WithGeometry(Geometry geometry, IReadOnlyDictionary<string, object?>? attributes = null, long id = 0, HonuaSpatialReference? spatialReference = null)
Parameters
geometryGeometryattributesIReadOnlyDictionary<string, object>idlongspatialReferenceHonuaSpatialReference