GeoFeature Class

A feature: a geometry, its properties and its identifier, such as a country, a road or a city.

public sealed class GeoFeature

Constructors

NameDescription
GeoFeature(GeoGeometry?, IReadOnlyDictionary<string, object?>?, string?)Initializes a new instance of the GeoFeature class.

GeoFeature(GeoGeometry?, IReadOnlyDictionary<string, object?>?, string?)

GeoFeature.cs

Initializes a new instance of the GeoFeature class.

public GeoFeature(GeoGeometry? geometry, IReadOnlyDictionary<string, object?>? properties = null, string? id = null)

Parameters

geometry GeoGeometry?
The geometry, or null for a feature without a location.
properties IReadOnlyDictionary<string, object?>?
The properties, or null for none.
id string?
The identifier, or null.

Properties

NameDescription
GeometryGets the geometry, or null for a feature without a location.
IdGets the identifier, or null. A numeric identifier, as GeoJSON allows, is written as text.
PropertiesGets the properties. The readers give a String, a Double, a Boolean or null; each format documents the other types it gives. The writers accept these types, the other numeric types, dates and times, and write the other values as their text.

Gets the geometry, or null for a feature without a location.

public GeoGeometry? Geometry { get; }

Property value

GeoGeometry?

Gets the identifier, or null. A numeric identifier, as GeoJSON allows, is written as text.

public string? Id { get; }

Property value

string?

Properties

GeoFeature.cs

Gets the properties. The readers give a String, a Double, a Boolean or null; each format documents the other types it gives. The writers accept these types, the other numeric types, dates and times, and write the other values as their text.

public IReadOnlyDictionary<string, object?> Properties { get; }