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
| Attribute | Type | Description |
|---|---|---|
| indices | dict = {"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
| Name | Type | Description |
|---|---|---|
| raster | object | The raster object containing the geotransform data. |
| prop | string | The property key (origin, scale, or skew) used to look up indices in the geotransform. |
Signature
def TransformPoint(
raster: Raster,
prop: string
)
Parameters
| Name | Type | Description |
|---|---|---|
| raster | Raster | The raster object containing the geotransform array to be accessed and modified. |
| prop | string | The 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
| Name | Type | Description |
|---|---|---|
| value | float | The new X-coordinate value to apply to the raster's geotransform at the appropriate index. |
Returns
| Type | Description |
|---|---|
float | The 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
| Name | Type | Description |
|---|---|---|
| value | float | The new Y-coordinate value to apply to the raster's geotransform at the appropriate index. |
Returns
| Type | Description |
|---|---|
float | The current Y-axis value for the specified transform property. |