Table of Contents

Class GeographyUtils

Provides geography-related utility methods.

public static class GeographyUtils
Inheritance
GeographyUtils
Inherited Members

Methods

ToCircumferencePositions(MapCoordinate, Distance, int)

Calculates the circumference positions that approximate a circle on the map, given its center and radius. Useful for rendering a circle as a GeoJSON polygon ring.

public static List<MapCoordinate> ToCircumferencePositions(MapCoordinate center, Distance radius, int segments = 360)

Parameters

center MapCoordinate

The center of the circle.

radius Distance

The radius of the circle.

segments int

The number of segments used to approximate the circle (default 360).

Returns

List<MapCoordinate>

A closed ring of positions approximating the circle's circumference.

ToDegrees(double)

Converts radians to degrees.

public static double ToDegrees(this double radians)

Parameters

radians double

Returns

double

ToRadians(double)

Converts degrees to radians.

public static double ToRadians(this double degrees)

Parameters

degrees double

Returns

double