[gdal-dev] Transform pixel coordinates

Artur Bercik vbubbly21 at gmail.com
Sat Oct 25 03:00:09 PDT 2014


On Sat, Oct 25, 2014 at 5:05 PM, Andre Joost <andre+joost at nurfuerspam.de>
wrote:

> Am 25.10.2014 um 09:29 schrieb Artur Bercik:
>
>
>>>  sorry, yes the pixel size are in degrees,0.047 deg.(5 km approx. at
>> equator), in GCS and WGS84.
>>
>>
> Ok, then it is easy. Using the values from your other post:
>
> upperLeftX, upperLeftY = 150.1234, 50.1234 (They are in GCS with WGS84
> datum)
> pixelWidth, pixelHeight = 0.047, 0.047
> totalColumns, TotalRows = 270, 406
>
> and assuming the coordinates are East and North positive. To georeference
> the image, set the extent in gdal_translate with -a_srs EPSG:4326 and
> -a_ullr ulx uly lrx lry
>
> ulx and uly are known, the others are
> lrx = ulx + 270 * 0.047
> lry = uly - 406 * 0.047
>
> This does not work if your image is not North-orientated.
>
> HTH,
>
> André Joost
>

Thank you very much, I have adopted it.

>
>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20141025/897c25fc/attachment.html>


More information about the gdal-dev mailing list