[gdal-dev] Re: how to create a latitude map

Yann Chemin yann.chemin at gmail.com
Wed Jul 9 06:41:37 EDT 2008


...answering to it:

double geomx[6]={0.0};
double longitude, latitude;
if(GDALGetGeoTransform(hDataset1,geomx)==CE_None){
             /* Do Nothing */
} else {
             printf("ERROR: Projection acquisition problem from Band1\n");
             exit(1);
}
latitude = geomx[3] + geomx[4] * col + geomx[5] * row;



2008/7/9 Yann Chemin <yann.chemin at gmail.com>:
> Hello,
>
> how would you go to write a GDAL-based code to return latitude (or
> longitude) as pixel values?
>
> Thanks,
> Yann
>
> --
> Yann Chemin
> International Rice Research Institute
> Office: http://www.irri.org/gis
> Perso: http://www.freewebs.com/ychemin
> ---------------------------------------------------
> Opportunities are usually disguised as hard work,
> so most people don't recognize them.
>



-- 
Yann Chemin
International Rice Research Institute
Office: http://www.irri.org/gis
Perso: http://www.freewebs.com/ychemin
---------------------------------------------------
Opportunities are usually disguised as hard work,
so most people don't recognize them.


More information about the gdal-dev mailing list