Raster Pixel to Geographic Coordinate Converter

Convert GeoTIFF pixel rows and columns to map coordinates, latitude/longitude, or easting/northing and invert coordinates back to raster pixels with a GDAL GeoTransform.

GDAL Affine Formula Pixel Center or Corner Rotated Rasters QGIS, GDAL, Rasterio
Share this tool

Conversion

Center mode applies the 0.5 pixel offset used by many display and sampling workflows.

GeoTransform

Paste GT0, GT1, GT2, GT3, GT4, GT5 from GDAL, QGIS, Rasterio, or GeoTIFF metadata. North-up rasters usually use GT2 = 0, GT4 = 0, and negative GT5.

Pixel Location Map Coordinate

Formula

X = GT0 + Pixel * GT1 + Line * GT2 Y = GT3 + Pixel * GT4 + Line * GT5
Quick Load:

Converting...

Paste a GDAL GeoTransform and convert between raster pixel row/column coordinates and map coordinates.

How Raster Pixels Become Map Coordinates

A raster pixel coordinate is normally written as a column and row, or as GDAL calls them, pixel and line. The top-left pixel corner is usually pixel 0, line 0. A GeoTIFF geotransform connects that raster grid to the map coordinate system stored in the file. When the transform is in EPSG:4326, the output X/Y values usually mean longitude and latitude. When the transform is projected, they usually mean easting and northing in metres or feet.

pixel=2, line=2 Map X Map Y native CRS X Y

What Is a Raster Pixel Coordinate?

A raster image is a grid. The column number moves left to right, and the row number moves from the top of the raster downward. In GDAL terminology, column is often called pixel and row is often called line. Pixel coordinate 0,0 refers to the upper-left pixel corner under the standard GDAL convention. Many display tools and sampling APIs instead report the center of a cell, which is why this converter includes both pixel corner and pixel center modes.

How GDAL GeoTransform Converts Pixels to Map Coordinates

GDAL stores raster georeferencing as six affine coefficients: GT0, GT1, GT2, GT3, GT4, and GT5. The forward equations are X = GT0 + Pixel * GT1 + Line * GT2 and Y = GT3 + Pixel * GT4 + Line * GT5. For a typical north-up GeoTIFF, GT2 and GT4 are zero, GT1 is the pixel width, and GT5 is negative because raster rows increase downward while map Y normally increases upward.

Pixel Corner vs Pixel Center Coordinates

Corner mode follows GDAL's raw affine transform. If you enter pixel 10 and line 20, the converter maps the corner of that grid cell. Center mode adds 0.5 to both pixel and line before converting, so pixel 10 and line 20 become 10.5 and 20.5 in corner-space. This is usually the coordinate you want when sampling the value at the center of a raster cell.

Converting Map Coordinates Back to Raster Row and Column

The inverse calculation solves the same affine matrix in reverse. This matters for GIS automation, image chips, tile extraction, click-to-sample tools, and debugging Rasterio or GDAL scripts. For unrotated rasters the simplified formula is easy, but production data can include rotated transforms, so this calculator uses the full determinant-based inverse.

Why Rotated Rasters Need the Full Affine Formula

If GT2 or GT4 is non-zero, the raster grid is rotated or skewed relative to the map axes. In that case, Pixel = (X - GT0) / GT1 is wrong because line position also contributes to X, and pixel position also contributes to Y. The converter detects rotation terms and reports that it used the complete affine inverse.

Using This Converter with QGIS, GDAL, Rasterio, and GeoTIFF Metadata

In GDAL, use gdalinfo to inspect origin, pixel size, and corner coordinates. In Rasterio, the transform object contains the same affine coefficients. In QGIS, layer properties and metadata panels can expose raster extent, pixel size, and CRS information. If you need to inspect a GeoTIFF before using this converter, use the GeoTIFF Metadata Reader on this site, then copy the geotransform values here.

Frequently Asked Questions

How do I convert GeoTIFF pixel coordinates to latitude and longitude?

Use the GeoTIFF's six geotransform values and choose pixel-to-coordinate mode. If the raster CRS is EPSG:4326, the output X/Y values are longitude and latitude. If the raster is projected, convert to map X/Y first, then reproject separately.

Does this converter reproject coordinates?

No. It converts between raster pixel space and the raster's native coordinate reference system. Use a coordinate converter or GIS reprojection tool after this step if you need another CRS.

Can this handle rotated rasters?

Yes. The calculator supports GT2 and GT4 rotation terms and uses the full affine matrix inverse when converting map coordinates back to pixels.

Where do I find the six geotransform values?

GDAL, Rasterio, QGIS metadata, and many GeoTIFF inspection tools expose the transform. Look for origin X/Y, pixel width, pixel height, and any row or column rotation terms.

Authoritative References

These external GIS references document the same raster affine transform conventions used by this converter.