Re: [gdal-dev] Problem with pixel/line coordinates

2010-06-18 Thread Alexander Bruy
Thanks for your explanation, Frank! Now it works fine On Thu, 17 Jun 2010 13:59:46 -0400 Frank Warmerdam warmer...@pobox.com wrote: Alexander, I believe the addition of 0.5 in the above is incorrect. In the simple, non-rotated case, all values from geoTransform[0] to geoTransform[0] +

[gdal-dev] Problem with pixel/line coordinates

2010-06-17 Thread Alexander Bruy
Hi, I use next code to translate real coordinates (lat/lon) to the pixel/line coordinates def mapToPixel( mX, mY, geoTransform ): if geoTransform[ 2 ] + geoTransform[ 4 ] == 0: pX = ( mX - geoTransform[ 0 ] ) / geoTransform[ 1 ] pY = ( mY - geoTransform[ 3 ] ) / geoTransform[ 5 ]

Re: [gdal-dev] Problem with pixel/line coordinates

2010-06-17 Thread Frank Warmerdam
On Thu, Jun 17, 2010 at 1:40 PM, Alexander Bruy alexander.b...@gmail.com wrote: Hi, I use next code to translate real coordinates (lat/lon) to the pixel/line coordinates def mapToPixel( mX, mY, geoTransform ):  if geoTransform[ 2 ] + geoTransform[ 4 ] == 0:    pX = ( mX - geoTransform[ 0 ]