1

I have a Modis image and i load this image in Python using gdal library

from osgeo import gdal, ogr
INPUT_raster_1 = "C:\\myimage_1km.tif"
ds_1 = gdal.Open(INPUT_raster_1, gdal.GA_ReadOnly)
geoMatrix_1 = ds_1.GetGeoTransform()
(-1770002.4756305092, 926.6254331383334, 0.0, 7444752.081661087, 0.0, -926.6254331383334)

with

top left x (x Origin) = -1770002.4756305092
top left y (y Origin) = 7444752.081661087

when i open the same image in Arcmap 10.0 and i look the layer propreties the origins are differents

enter image description here

with

 top left x (x Origin) = -1769539.16291 
 top left y (y Origin) = 7444288.76894

this is the two origins (GDAL and Arcmap/GIS software). The GDAL is translate outside the image

enter image description here

2
  • Can you say exactly which MODIS data set image, so we can try to replicate? What does the command like gdalinfo show?
    – BradHards
    Jan 22, 2015 at 6:15
  • Note that MODIS rasters can be rotated, so the upper left pixel may not be descriebd by the top and left extent values.
    – AndreJ
    Jan 22, 2015 at 6:45

1 Answer 1

4

It looks like GDAL is describing the outer edge of the 'origin pixel' and Arcmap is refering to the center of the origin pixel. If you add half the resolution of a pixel they'll match fine.

This definition is often different with different software, it doesnt really matter, though you should know what you're looking at so you can take it into account. One benifit of describing the outer edge like GDAL does is that the origin (and boundingbox) are independent of the resolution.

3
  • I posted a new image. You can see the GDAL origin is translate outside the image border
    – Gianni
    Jan 22, 2015 at 20:39
  • That's not really possible i think. Because, by definition, the image starts at the origin. Isn't this more of a visualization issue? What kind of viewer are you using? Jan 23, 2015 at 8:17
  • i am using Arcmap. I create two shapefile points one with the coordinate of the origin of Arcmap and one of the GDAL. If you view the point shapefile in Arcmap you got this.
    – Gianni
    Jan 24, 2015 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.