I'm writing some software that allows users to draw polygons over the raster from a geotiff file.
I can calculate the area of the polygon in pixels; in fact, this calculation is a byproduct of finding the polygon's centroid (which I also report).
However, I would like to convert area in pixels to acres.
Presumably geotiffs have some metadata linking the raster to real world units. I'm vaguely familiar with the concept that internally geotiffs use a "Model (M)" and "Raster (R)" and that there is metadata relating them.
I'm trying to find exactly what metadata there is, and how to query it (using libgeotiff).
For example, if I had a value correlating pixels to square metres, it should be straight forward math to go from pixels -> metres -> acres.
If it is not possible to get an exact correspondence between pixels and real-world units, a method to calculate a reasonable approximation would suffice.