# What is the unit used by Gdal.GetGeoTransform?

I tried to retrieve the resolution of a raster image with Gdal in a python notebook to convert surfaces from pixels to hectares.

``````import gdal
from osgeo import osr

src = gdal.Open(map_raster)
proj = osr.SpatialReference(wkt=src.GetProjection())
_, resx, _, _, _, resy  = src.GetGeoTransform()
src = None
``````

I expected `resx` to be in meter but a `print(resx)` gave me `0.00025000000000000017` which would be very small if expressed in meters.

So my question is how can I know the unit system used by the `GetGeoTransform` function ?

EDIT
the `proj` value is :

``````GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9122"]],
AXIS["Latitude",NORTH],
AXIS["Longitude",EAST],
AUTHORITY["EPSG","4326"]]
``````
• but if it's using the 'degree' unit then it's absolutely not a distance .... Is there a way to get a distance with gdal ? Commented Jul 23, 2020 at 7:41
• – Bera
Commented Jul 23, 2020 at 7:47
• The equivalence is given at the level of the equator, it is no longer valid if I change my latitude, isn't it? Commented Jul 23, 2020 at 8:18

The units used in `GetGeoTransform` are 100% related to your coordinate system. Perhaps you can read-up about coordinate systems (there are various coordinate systems for various applications).
What you want to do is re-project your raster image to a projected coordinate system (one that is specific to the area of you image, most commonly used is the universal transverse mercator (utm), you just need to know your zone). Once the image is re-projected into a projected coordinate system your pixel size from `GetGeoTransform` will be in meters.