Table of Contents

Class GridGeoreferencer

Namespace
EncDotNet.S100.Pipelines.Coverage
Assembly
EncDotNet.S100.Core.dll

Encapsulates the grid-to-world coordinate transform for a sampled coverage. Converts grid cell (row, col) positions to geographic coordinates in the grid's native CRS.

public sealed class GridGeoreferencer
Inheritance
GridGeoreferencer
Inherited Members

Constructors

GridGeoreferencer(GridMetadata, string)

Creates a georeferencer for a grid.

public GridGeoreferencer(GridMetadata metadata, string crs)

Parameters

metadata GridMetadata

The grid geometry (origin and spacing in the native CRS).

crs string

Identifier of the grid's native CRS (e.g. "EPSG:4326", "EPSG:32608").

Properties

CRS

The EPSG code or identifier of the grid's native CRS (e.g. "EPSG:4326", "EPSG:32608").

public string CRS { get; }

Property Value

string

Metadata

The underlying grid metadata.

public GridMetadata Metadata { get; }

Property Value

GridMetadata

Methods

ToGrid(double, double)

Inverse: converts native CRS coordinates to the nearest grid cell.

public (int Row, int Col) ToGrid(double x, double y)

Parameters

x double
y double

Returns

(int Row, int Col)

ToNative(int, int)

Converts a grid cell position to coordinates in the grid's native CRS. For geographic CRS, returns (longitude, latitude). For projected CRS (e.g. UTM), returns (easting, northing).

public (double X, double Y) ToNative(int row, int col)

Parameters

row int
col int

Returns

(double X, double Y)