Class GridGeoreferencer
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
metadataGridMetadataThe grid geometry (origin and spacing in the native CRS).
crsstringIdentifier 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
Metadata
The underlying grid metadata.
public GridMetadata Metadata { get; }
Property Value
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
Returns
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)