layout: default title: Projection parent: Core Classes —

dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Model

Projection Class

A client-side projection engine for converting geometries from one SpatialReference to another. When projecting
geometries the starting spatial reference must be specified on the input geometry. You can specify a specific
geographic (datum) transformation for the project operation, or accept the default transformation if one is needed.
ArcGIS Maps SDK for JavaScript

public class Projection : dymaptic.GeoBlazor.Core.Model.LogicComponent

Inheritance System.Object 🡒 LogicComponent 🡒 Projection

Constructors

Projection(IJSRuntime, AuthenticationManager) Constructor

Default Constructor

public Projection(Microsoft.JSInterop.IJSRuntime jsRuntime, dymaptic.GeoBlazor.Core.Model.AuthenticationManager authenticationManager);

Parameters

jsRuntime Microsoft.JSInterop.IJSRuntime

Injected JavaScript Runtime reference

authenticationManager AuthenticationManager

Injected Identity Manager reference

Methods

Projection.GetTransformation(SpatialReference, SpatialReference, Extent) Method

Returns the default geographic transformation used to convert the geometry from the input spatial reference to the
output spatial reference. The default transformation is used when projecting geometries where the datum
transformation is required but not specified in the geographicTransformation parameter.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Objects.GeographicTransformation?> GetTransformation(dymaptic.GeoBlazor.Core.Components.Geometries.SpatialReference inSpatialReference, dymaptic.GeoBlazor.Core.Components.Geometries.SpatialReference outSpatialReference, dymaptic.GeoBlazor.Core.Components.Geometries.Extent extent);

Parameters

inSpatialReference SpatialReference

The input spatial reference from which to project geometries. This is the spatial reference of the input
geometries.

outSpatialReference SpatialReference

The spatial reference to which you are converting the geometries.

extent Extent

The optional spatial reference to which you are converting the geometries.

Returns

System.Threading.Tasks.Task<GeographicTransformation>
A geographic transformation.

Projection.GetTransformations(SpatialReference, SpatialReference, Extent) Method

Returns a list of all geographic transformations suitable to convert geometries from the input spatial reference to
the specified output spatial reference. The list is ordered in descending order by suitability, with the most
suitable being first in the list.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Objects.GeographicTransformation[]?> GetTransformations(dymaptic.GeoBlazor.Core.Components.Geometries.SpatialReference inSpatialReference, dymaptic.GeoBlazor.Core.Components.Geometries.SpatialReference outSpatialReference, dymaptic.GeoBlazor.Core.Components.Geometries.Extent extent);

Parameters

inSpatialReference SpatialReference

The spatial reference that the geometries are currently using.

outSpatialReference SpatialReference

The spatial reference to which you are converting the geometries.

extent Extent

An optional extent used to determine the suitability of the returned transformations. The extent will be
re-projected to the input spatial reference if necessary.

Returns

System.Threading.Tasks.Task<GeographicTransformation[]>
A collection of geographic transformation.

Projection.Project(Geometry, SpatialReference, GeographicTransformation) Method

Projects a geometry to the specified output spatial reference.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Geometry?> Project(dymaptic.GeoBlazor.Core.Components.Geometries.Geometry geometry, dymaptic.GeoBlazor.Core.Components.Geometries.SpatialReference spatialReference, dymaptic.GeoBlazor.Core.Objects.GeographicTransformation? geographicTransformation=null);

Parameters

geometry Geometry

The input geometry to project

spatialReference SpatialReference

The spatial reference to which you are converting the geometries’ coordinates.

geographicTransformation GeographicTransformation

The optional geographic transformation used to transform the geometries. Specify this parameter to project a
geometry when the default transformation is not appropriate for your requirements.

Returns

System.Threading.Tasks.Task<Geometry>
A projected geometry.

Projection.Project(Geometry[], SpatialReference, GeographicTransformation) Method

Projects an array of geometries to the specified output spatial reference.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Geometry[]?> Project(dymaptic.GeoBlazor.Core.Components.Geometries.Geometry[] geometries, dymaptic.GeoBlazor.Core.Components.Geometries.SpatialReference spatialReference, dymaptic.GeoBlazor.Core.Objects.GeographicTransformation? geographicTransformation=null);

Parameters

geometries Geometry[]

The input geometries to project

spatialReference SpatialReference

The spatial reference to which you are converting the geometries’ coordinates.

geographicTransformation GeographicTransformation

The optional geographic transformation used to transform the geometries. Specify this parameter to project a
geometry when the default transformation is not appropriate for your requirements.

Returns

System.Threading.Tasks.Task<Geometry[]>
A collection of projected geometries.