geoutils.Raster.coords#
- Raster.coords(grid=True, shift_area_or_point=None, force_offset=None)[source]#
Get coordinates (x,y) of all pixels in the raster.
- Parameters:
grid (
bool
) – Whether to return mesh grids of coordinates matrices.shift_area_or_point (
bool
|None
) – Whether to shift with pixel interpretation, which shifts to center of pixel coordinates if self.area_or_point is “Point” and maintains corner pixel coordinate if it is “Area” or None. Defaults to True. Can be configured with the global setting geoutils.config[“shift_area_or_point”].force_offset (
str
|None
) – Ignore pixel interpretation and force coordinate to a certain offset: “center” of pixel, or any corner (upper-left “ul”, “ur”, “ll”, lr”). Default coordinate of a raster is upper-left.
- Returns x,y:
Arrays of the (x,y) coordinates.
- Return type:
tuple
[ndarray
[Any
,dtype
[Union
[floating
[Any
],integer
[Any
]]]],ndarray
[Any
,dtype
[Union
[floating
[Any
],integer
[Any
]]]]]