IdentityCRSTransformer#
- class IdentityCRSTransformer[source]#
Bases:
CRSTransformer
Transformer for when map coordinates are already in pixel coordinates.
This is useful for non-georeferenced imagery.
- __init__(transform: Optional[Any] = None, image_crs: Optional[str] = None, map_crs: Optional[str] = None)#
Methods
__init__
([transform, image_crs, map_crs])map_to_pixel
(inp)Transform input from pixel to map coords.
pixel_to_map
(inp)Transform input from pixel to map coords.
- __init__(transform: Optional[Any] = None, image_crs: Optional[str] = None, map_crs: Optional[str] = None)#
- map_to_pixel(inp)#
Transform input from pixel to map coords.
- Parameters
inp – (x, y) tuple or Box or rasterio Window or shapely geometry in pixel coordinates. If tuple, x and y can be single values or array-like.
- Returns
Coordinate-transformed input in the same format.
- pixel_to_map(inp)#
Transform input from pixel to map coords.
- Parameters
inp – (x, y) tuple or Box or shapely geometry in pixel coordinates. If tuple, x and y can be single values or array-like.
- Returns
Coordinate-transformed input in the same format.