0

I have GDAL raster dataset. I want to extract raw values from it. All is working correctly, but problem is with top left coorinates. If I extract data from GDALRasterBand, point[0,0] is at topLeft. How can I change this? I can "move" extracted values, but I rather want some direct solution, that I extract values correctly.

I have tried SetGeoTransform, but with no effect.

UPDATE:

For example I extract data and pixel [0,0] has coordinate lon: 0.2, lat: 90.1. I want it to have lon: 180.0, lat: 80.0 (step is 0.5 degree, so next pixesl are offseted with this step)

Martin Perry
  • 491
  • 2
  • 14
  • Could you verify what do you mean with correct result? What would you like to have instead of [0,0] at the top left? Perhaps projected, georeferenced coordinates instead of pixel coordinates? – user30184 Aug 16 '15 at 09:14
  • @user30184 I have added example what I mean – Martin Perry Aug 16 '15 at 09:19
  • Perhaps you should use GetGeoTransform in addition to or instead of SetGeoTransform? Code here might help http://gis.stackexchange.com/questions/42790/gdal-and-python-how-to-get-coordinates-for-all-cells-having-a-specific-value – user30184 Aug 16 '15 at 09:44

0 Answers0