Skip to main content

GeoJsonFeature Class

Definition

Assembly:Avalonia.Controls.Charts
Package:Avalonia.Controls.Charts

Represents a parsed GeoJSON feature with its identifier and polygon paths.

public class GeoJsonFeature

Inheritance: object -> GeoJsonFeature

Constructors

NameDescription
GeoJsonFeature (2 overloads)No summary available.

GeoJsonFeature overloads

GeoJsonFeature Constructor

public GeoJsonFeature(string id, System.Collections.Generic.List<System.Collections.Generic.List<Avalonia.Point>> paths, System.Collections.Generic.Dictionary<string, object> properties)
Parameters

id string

paths System.Collections.Generic.List<System.Collections.Generic.List<Avalonia.Point>>

properties System.Collections.Generic.Dictionary<string, object>

GeoJsonFeature Constructor

public GeoJsonFeature(string id, System.Collections.Generic.List<System.Collections.Generic.List<System.Collections.Generic.List<Avalonia.Point>>> polygons, System.Collections.Generic.Dictionary<string, object> properties)
Parameters

id string

polygons System.Collections.Generic.List<System.Collections.Generic.List<System.Collections.Generic.List<Avalonia.Point>>>

properties System.Collections.Generic.Dictionary<string, object>

Methods

NameDescription
ContainsDetermines whether the viewport point is inside the feature's GeoJSON polygons.

Contains Method

Determines whether the viewport point is inside the feature's GeoJSON polygons.

public bool Contains(Avalonia.Point point)

Parameters

point Avalonia.Point

Returns

bool

Properties

NameDescription
BoundsGets the bounding box of the feature in viewport coordinates (0-200, 0-100).
CentroidGets the pre-calculated centroid of the feature (normalized to 0-200 x 0-100 viewport).
GeometryGets the pre-calculated geometry for this feature (normalized to 0-200 x 0-100 viewport).
IdGets the unique identifier of the feature.
PathsGets the list of polygon paths defining the feature shape.
PropertiesGets the collection of properties from GeoJSON.

Bounds Property

Gets the bounding box of the feature in viewport coordinates (0-200, 0-100).

public Avalonia.Rect Bounds { get; set; }

Centroid Property

Gets the pre-calculated centroid of the feature (normalized to 0-200 x 0-100 viewport).

public Avalonia.Point Centroid { get; set; }

Geometry Property

Gets the pre-calculated geometry for this feature (normalized to 0-200 x 0-100 viewport).

public Avalonia.Media.Geometry Geometry { get; set; }

Id Property

Gets the unique identifier of the feature.

public string Id { get; set; }

Paths Property

Gets the list of polygon paths defining the feature shape.

public System.Collections.Generic.List<System.Collections.Generic.List<Avalonia.Point>> Paths { get; set; }

Properties Property

Gets the collection of properties from GeoJSON.

public System.Collections.Generic.Dictionary<string, object> Properties { get; set; }