salem.Grid.transform
- Grid.transform(x, y, z=None, crs=<Other Coordinate Operation Transformer: longlat> Description: PROJ-based coordinate operation Area of Use: - undefined, nearest=False, maskout=False)[source]
Converts any coordinates into the local grid.
- Parameters:
- xndarray
the grid coordinates of the point(s) you want to convert
- yndarray
the grid coordinates of the point(s) you want to convert
- zNone
ignored (but necessary since some shapes have a z dimension)
- crscrs
reference system of x, y. Could be a pyproj.Proj instance or a Grid instance. In the latter case (x, y) are actually (i, j). (Default: lonlat in wgs84).
- nearestbool
set to True if you wish to return the closest i, j coordinates instead of subpixel coords.
- maskoutbool
set to true if you want to mask out the transformed coordinates that are not within the grid.
- Returns:
- (i, j) coordinates of the points in the local grid.