I'm currently trying to read a raster file with GDAL and C#. The reading part is fine, but I have troubles with reading the correct bounding box of the raster to map it correctly to the screen. If the coordinates are in lat, long then it's fine. However, if they're in pixel values (for example with EPSG:3857 Web Mercator), I can't read them out correctly. I know Gdalinfo include the original bounding box (see below).
Driver: GTiff/GeoTIFF
Files: F:\ArcGis\Gdal\NE1_50M_SR_W\DensityMaps\Pop1Warpped.tif
Size is 141988, 60942
Coordinate System is:
PROJCS["World_Mollweide",
GEOGCS["GCS_WGS_1984",
DATUM["D_WGS_1984",
SPHEROID["WGS_1984",6378137.0,298.257223563]],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.017453292519943295]],
PROJECTION["Mollweide"],
PARAMETER["False_Easting",0.0],
PARAMETER["False_Northing",0.0],
PARAMETER["Central_Meridian",0.0],
UNIT["Meter",1.0]]
Origin = (-17619594.547443531000000,8750529.461868489200000)
Pixel Size = (250.000000000000000,-250.000000000000000)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
COMPRESSION=LZW
INTERLEAVE=BAND
Corner Coordinates:
Upper Left (-17619594.547, 8750529.462) ( 4d35'30.71"W, 83d37'50.88"N)
Lower Left (-17619594.547,-6484970.538) (107d 3'58.73"E, 55d59' 2.97"S)
Upper Right (17877405.453, 8750529.462) ( 15d11'38.88"E, 83d37'50.88"N)
Lower Right (17877405.453,-6484970.538) (103d21'55.35"W, 55d59' 2.97"S)
Center ( 128905.453, 1132779.462) ( 1d17'47.23"E, 9d10'35.76"N)
As you can see the upper left includes the coordinates in lat, long as well. Is there anyway I can read it out programmatically?