dymaptic.GeoBlazor.Pro

dymaptic.GeoBlazor.Pro.Model

GeometryEngineProExtensions Class

Additional methods for GeometryEngine only available in GeoBlazor Pro.

public static class GeometryEngineProExtensions

Inheritance System.Object 🡒 GeometryEngineProExtensions

Methods

GeometryEngineProExtensions.Densify(this GeometryEngine, IEnumerable, double, Nullable, CancellationToken) Method

Densify geometries by plotting points between existing vertices.

public static System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Geometry[]> Densify(this dymaptic.GeoBlazor.Core.Model.GeometryEngine geometryEngine, System.Collections.Generic.IEnumerable<dymaptic.GeoBlazor.Core.Components.Geometries.Geometry> geometries, double maxSegmentLength, System.Nullable<dymaptic.GeoBlazor.Core.Enums.GeometryEngineLinearUnit> maxSegmentLengthUnit=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

geometryEngine GeometryEngine

The geometry engine to use.

geometries System.Collections.Generic.IEnumerable<Geometry>

The geometries to be densified.

maxSegmentLength System.Double

The maximum segment length allowed. Must be a positive value.

maxSegmentLengthUnit System.Nullable<GeometryEngineLinearUnit>

Measurement unit for maxSegmentLength. Defaults to the units of the input geometry.

cancellationToken System.Threading.CancellationToken

The cancellation token to use for the operation.

Returns

System.Threading.Tasks.Task<Geometry[]>
The densified geometries.

GeometryEngineProExtensions.FlipHorizontal(this GeometryEngine, IReadOnlyList, Point, CancellationToken) Method

Flips a geometry on the horizontal axis. Can optionally be flipped around a point.

public static System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Geometry[]> FlipHorizontal(this dymaptic.GeoBlazor.Core.Model.GeometryEngine geometryEngine, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Geometries.Geometry> geometries, dymaptic.GeoBlazor.Core.Components.Geometries.Point? flipOrigin=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

geometryEngine GeometryEngine

The geometry engine to use.

geometries System.Collections.Generic.IReadOnlyList<Geometry>

The input geometries to be flipped.

flipOrigin Point

Point to flip the geometry around. Defaults to the centroid of the geometry.

cancellationToken System.Threading.CancellationToken

The cancellation token to use for the operation.

Returns

System.Threading.Tasks.Task<Geometry[]>
The flipped geometries.

GeometryEngineProExtensions.FlipVertical(this GeometryEngine, IReadOnlyList, Point, CancellationToken) Method

Flips a geometry on the vertical axis. Can optionally be flipped around a point.

public static System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Geometry[]> FlipVertical(this dymaptic.GeoBlazor.Core.Model.GeometryEngine geometryEngine, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Geometries.Geometry> geometries, dymaptic.GeoBlazor.Core.Components.Geometries.Point? flipOrigin=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

geometryEngine GeometryEngine

The geometry engine to use.

geometries System.Collections.Generic.IReadOnlyList<Geometry>

The input geometries to be flipped.

flipOrigin Point

Point to flip the geometry around. Defaults to the centroid of the geometry.

cancellationToken System.Threading.CancellationToken

The cancellation token to use for the operation.

Returns

System.Threading.Tasks.Task<Geometry[]>
The flipped geometries.

GeometryEngineProExtensions.Generalize(this GeometryEngine, IReadOnlyList, double, Nullable, Nullable, CancellationToken) Method

Performs the generalize operation on the geometries in the cursor. Point and Multipoint geometries are left unchanged. Envelope is converted to a Polygon and then generalized.

public static System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Geometry[]> Generalize(this dymaptic.GeoBlazor.Core.Model.GeometryEngine geometryEngine, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Geometries.Geometry> geometries, double maxDeviation, System.Nullable<bool> removeDegenerateParts=null, System.Nullable<dymaptic.GeoBlazor.Core.Enums.GeometryEngineLinearUnit> maxDeviationUnit=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

geometryEngine GeometryEngine

The geometry engine to use.

geometries System.Collections.Generic.IReadOnlyList<Geometry>

The input geometries to be generalized.

maxDeviation System.Double

The maximum allowed deviation from the generalized geometry to the original geometry.

removeDegenerateParts System.Nullable<System.Boolean>

When true the degenerate parts of the geometry will be removed from the output (may be undesired for drawing).

maxDeviationUnit System.Nullable<GeometryEngineLinearUnit>

Measurement unit for maxDeviation. Defaults to the units of the input geometry.

cancellationToken System.Threading.CancellationToken

The cancellation token to use for the operation.

Returns

System.Threading.Tasks.Task<Geometry[]>
The generalized geometries.

GeometryEngineProExtensions.GeodesicBufferMultipoint(this GeometryEngine, Multipoint, double, CancellationToken) Method

Creates geodesic buffer polygons at a specified distance around the input geometries. When calculating distances, this method takes the curvature of the earth into account, which provides highly accurate results when dealing with very large geometries and/or geometries that spatially vary on a global scale where one projected coordinate system could not accurately plot coordinates and measure distances for all the geometries.

public static System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Polygon?> GeodesicBufferMultipoint(this dymaptic.GeoBlazor.Core.Model.GeometryEngine geometryEngine, dymaptic.GeoBlazor.Pro.Components.Geometries.Multipoint geometry, double distance, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

geometryEngine GeometryEngine

The geometry engine to use.

geometry Multipoint

The buffer input geometry

distance System.Double

The specified distance for buffering.

cancellationToken System.Threading.CancellationToken

The cancellation token to use for the operation.

Returns

System.Threading.Tasks.Task<Polygon>
The resulting buffers

Remarks

This method only works with WGS84 (wkid: 4326) and Web Mercator spatial references. In general, if your input geometries are assigned one of those two spatial references, you should always use geodesicBuffer() to obtain the most accurate results for those geometries. If needing to buffer points assigned a projected coordinate system other than Web Mercator, use buffer() instead. If the input geometries have a geographic coordinate system other than WGS84 (wkid: 4326), use geometryService.buffer().

GeometryEngineProExtensions.GeodesicDensify(this GeometryEngine, IReadOnlyList, double, Nullable, CancellationToken) Method

Returns a geodesically densified version of the input geometry. Use this function to draw the line(s) of the geometry along great circles.

public static System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Geometry?[]> GeodesicDensify(this dymaptic.GeoBlazor.Core.Model.GeometryEngine geometryEngine, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Geometries.Geometry> geometries, double maxSegmentLength, System.Nullable<dymaptic.GeoBlazor.Core.Enums.GeometryEngineLinearUnit> maxSegmentLengthUnit, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

geometryEngine GeometryEngine

The geometry engine to use.

geometries System.Collections.Generic.IReadOnlyList<Geometry>

Polylines and polygons to densify.

maxSegmentLength System.Double

The maximum segment length allowed (in meters if a maxSegmentLengthUnit is not provided). This must be a positive value.

maxSegmentLengthUnit System.Nullable<GeometryEngineLinearUnit>

Measurement unit for maxSegmentLength. If not provided, the unit will default to meters.

cancellationToken System.Threading.CancellationToken

The cancellation token to use for the operation.

Returns

System.Threading.Tasks.Task<Geometry[]>
Returns the densified geometries.

GeometryEngineProExtensions.GeodesicDensify(this GeometryEngine, IReadOnlyList, double, CancellationToken) Method

Returns a geodesically densified version of the input geometry. Use this function to draw the line(s) of the geometry along great circles.

public static System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Geometry?[]> GeodesicDensify(this dymaptic.GeoBlazor.Core.Model.GeometryEngine geometryEngine, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Geometries.Geometry> geometries, double maxSegmentLength, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

geometryEngine GeometryEngine

The geometry engine to use.

geometries System.Collections.Generic.IReadOnlyList<Geometry>

Polylines and polygons to densify.

maxSegmentLength System.Double

The maximum segment length allowed (in meters if a maxSegmentLengthUnit is not provided). This must be a positive value.

cancellationToken System.Threading.CancellationToken

The cancellation token to use for the operation.

Returns

System.Threading.Tasks.Task<Geometry[]>
Returns the densified geometries.

GeometryEngineProExtensions.Rotate(this GeometryEngine, Geometry, double, CancellationToken) Method

Rotates a geometry counterclockwise by the specified number of degrees. Rotation is around the centroid.

public static System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Geometry> Rotate(this dymaptic.GeoBlazor.Core.Model.GeometryEngine geometryEngine, dymaptic.GeoBlazor.Core.Components.Geometries.Geometry geometry, double angle, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

geometryEngine GeometryEngine

The geometry engine to use.

geometry Geometry

The geometry to rotate.

angle System.Double

The rotation angle in degrees.

cancellationToken System.Threading.CancellationToken

The cancellation token to use for the operation.

Returns

System.Threading.Tasks.Task<Geometry>
The rotated geometry.

GeometryEngineProExtensions.Rotate(this GeometryEngine, IReadOnlyList, double, Point, CancellationToken) Method

Rotates a set of geometries counterclockwise by the specified number of degrees. Rotation is around the given rotation point, or the centroid of the combined geometries.

public static System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Geometry> Rotate(this dymaptic.GeoBlazor.Core.Model.GeometryEngine geometryEngine, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Geometries.Geometry> geometries, double angle, dymaptic.GeoBlazor.Core.Components.Geometries.Point? rotationOrigin, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

geometryEngine GeometryEngine

The geometry engine to use.

geometries System.Collections.Generic.IReadOnlyList<Geometry>

The geometries to rotate.

angle System.Double

The rotation angle in degrees.

rotationOrigin Point

Point to rotate the geometry around. Defaults to the centroid of the geometry.

cancellationToken System.Threading.CancellationToken

The cancellation token to use for the operation.

Returns

System.Threading.Tasks.Task<Geometry>
The rotated geometries.

GeometryEngineProExtensions.Rotate(this GeometryEngine, IReadOnlyList, double, CancellationToken) Method

Rotates a set of geometries counterclockwise by the specified number of degrees. Rotation is around the centroid of the combined geometries.

public static System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Geometry> Rotate(this dymaptic.GeoBlazor.Core.Model.GeometryEngine geometryEngine, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Geometries.Geometry> geometries, double angle, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

geometryEngine GeometryEngine

The geometry engine to use.

geometries System.Collections.Generic.IReadOnlyList<Geometry>

The geometries to rotate.

angle System.Double

The rotation angle in degrees.

cancellationToken System.Threading.CancellationToken

The cancellation token to use for the operation.

Returns

System.Threading.Tasks.Task<Geometry>
The rotated geometries.

GeometryEngineProExtensions.Simplify(this GeometryEngine, IReadOnlyList, CancellationToken) Method

Performs the simplify operation on the geometry, which alters the given geometries to make their definitions topologically legal with respect to their geometry type. At the end of a simplify operation, no polygon rings or polyline paths will overlap, and no self-intersection will occur.

public static System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Geometry?[]> Simplify(this dymaptic.GeoBlazor.Core.Model.GeometryEngine geometryEngine, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Geometries.Geometry> geometries, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

geometryEngine GeometryEngine

The geometry engine to use.

geometries System.Collections.Generic.IReadOnlyList<Geometry>

The geometries to be simplified.

cancellationToken System.Threading.CancellationToken

The cancellation token to use for the operation.

Returns

System.Threading.Tasks.Task<Geometry[]>
The simplified geometries.