Combine two different GeoAttrs (which must have the same cellsizes).
Combine two different GeoAttrs (which must have the same cellsizes). The result is a new extent at the same resolution.
TODO: this version currently warps the grid. we need two versions.
TODO: relatedly, the translate version should require the grids to be properly aligned.
Compare this object with another GeoAttrs object, as per the comparison rules in Extent#compare.
Determine if the underlying extent contains the given point.
Gets the GridBounds for this RasterExtent that is the smallest subgrid containing all points within the extent.
Gets the GridBounds for this RasterExtent that is the smallest subgrid containing all points within the extent. The extent is considered inclusive on it's north and west borders, exclusive on it's east and south borders. See RasterExtent for a discussion of grid and extent boundary concepts.
The map coordinate of a grid cell is the center point.
Convert map coordinate tuple (x,y) to grid coordinates (col,row).
Convert map coordinates (x,y) to grid coordinates (col,row).
Convert map coordinate x to grid coordinate column.
Convert map coordinate y to grid coordinate row.
The size of the extent, e.
The size of the extent, e.g. cols * rows.
(rasterExtent: StringAdd).self
(rasterExtent: StringFormat).self
(rasterExtent: ArrowAssoc[RasterExtent]).x
(Since version 2.10.0) Use leftOfArrow
instead
(rasterExtent: Ensuring[RasterExtent]).x
(Since version 2.10.0) Use resultOfEnsuring
instead
RasterExtent objects represent the geographic extent (envelope) of a raster.
The Raster extent has two coordinate concepts involved: map coordinates and grid coordinates. Map coordinates are what the Extent class uses, and specifies points using an X coordinate and a Y coordinate. The X coordinate is oriented along west to east such that the larger the X coordinate, the more eastern the point. The Y coordinate is along south to north such that the larger the Y coordinate, the more Northern the point.
This contrasts with the grid coordinate system. The grid coordinate system does not actually reference points on the map, but instead a cell of the raster that represents values for some square area of the map. The column axis is similar in that the number gets larger as one goes from west to east; however, the row axis is inverted from map coordinates: as the row number increases, the cell is heading south. The top row is labeled as 0, and the next 1, so that the highest indexed row is the southern most row of the raster. A cell has a height and a width that is in terms of map units. You can think of it as each cell is itself an extent, with width cellwidth and height cellheight. When a cell needs to be represented or thought of as a point, the center of the cell will be used. So when gridToMap is called, what is returned is the center point, in map coordinates.
Map points are considered to be 'inside' the cell based on these rules:
Note that based on these rules, the eastern and southern borders of an Extent are not actually considered to be part of the RasterExtent.