Skip to main content

TransformPoint

This class provides a list-like interface for accessing and modifying specific coordinate pairs within a raster's geotransform. It maps properties such as origin, scale, and skew to their respective indices, allowing for direct manipulation of spatial parameters through x and y attributes. Changes made to these attributes are automatically synchronized back to the underlying raster object.

Attributes

AttributeTypeDescription
indicesdict = {"origin": (0, 3), "scale": (1, 5), "skew": (2, 4)}A dictionary mapping transformation property names to their corresponding coordinate index pairs within a GDAL geotransform array.

Constructor

Signature

def TransformPoint(
raster: object,
prop: string
) - > null

Parameters

NameTypeDescription
rasterobjectThe raster object containing the geotransform data.
propstringThe property key (origin, scale, or skew) used to look up indices in the geotransform.

Signature

def TransformPoint(
raster: Raster,
prop: string
)

Parameters

NameTypeDescription
rasterRasterThe raster object containing the geotransform array to be accessed and modified.
propstringThe property key (origin, scale, or skew) used to determine which indices to extract from the geotransform.

Methods


x()

@classmethod
def x(
value: float
) - > float

Gets or sets the X-coordinate component of the transform property, automatically updating the underlying raster's geotransform array upon assignment.

Parameters

NameTypeDescription
valuefloatThe new X-coordinate value to apply to the raster's geotransform at the appropriate index.

Returns

TypeDescription
floatThe current X-axis value for the specified transform property.

y()

@classmethod
def y(
value: float
) - > float

Gets or sets the Y-coordinate component of the transform property, ensuring changes are persisted back to the raster's geotransform metadata.

Parameters

NameTypeDescription
valuefloatThe new Y-coordinate value to apply to the raster's geotransform at the appropriate index.

Returns

TypeDescription
floatThe current Y-axis value for the specified transform property.