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)

3
  • 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, 2015 at 9:14
  • @user30184 I have added example what I mean Aug 16, 2015 at 9:19
  • Perhaps you should use GetGeoTransform in addition to or instead of SetGeoTransform? Code here might help gis.stackexchange.com/questions/42790/…
    – user30184
    Aug 16, 2015 at 9:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.