[gdal-dev] Coordinate space to pixel space with image rotation in python
even.rouault at spatialys.com
Tue Jan 28 09:30:32 PST 2020
> It's easy to go from coordinate space to pixel space in python using
> something like.
> pixel_x = int(-124114.3 - geo_transform)/geo_transform)
> What is the trick when there is an image rotation?
Compute the inverse geotransform with
(gdal.InvGeoTransform(gt) in Python )
And then use the coordinates in coordinate space as the input for this inverse geotransform
column = inv_gt + X * inv_gt + Y * inv_gt
row = inv_gt + X * inv_gt + Y * inv_gt
> Also, as a second
> very beginner question, what is the difference between geo_transform
> and geo_transform?
There are defined by the relationships at
Spatialys - Geospatial professional services
More information about the gdal-dev