[gdal-dev] Warp a file from two separate Lat and Long
Joaquim Luis
jluis at ualg.pt
Thu Feb 18 12:22:14 EST 2010
Luisa,
I normally restrain to propose GMT solutions here, but I'll open one
more exception now as this problem seams easy to solve with it and also
because I have o idea how to do it with GDAL.
For this, if your grids are not in netCDF, you will need a GMT built
with GDAL support (I have one for Windows in Mirone's download page)
Use grd2xyz to construct a x,y,z (lon,lat,val) that will be
instantaneously "georeferenced"
# Below the '=gd' is not part of the file's name but instead the
instruction to direct GMT to use GDAL to read the grids
# No need for this if grids are netCDF
grd2xyz grid_withd_data=gd -Z > val.z
grd2xyz grid_withd_lon=gd -Z > lon.x
grd2xyz grid_withd_lat=gd -Z > lat.y
# Now paste the 3 columns
paste lon.x lat.y val.z > data.xyz
Probably at this point you will need to interpolate the "data.xyz" file
to create a new grid as the lon & lats are likely not north-south
aligned (satellite data?) and not equispaced.
Joaquim Luis
> Greetings
>
> I've used GDAL a few times but this is the first time that I'm lost on
> what I can do with GDAL to solve my problem. I have 3 separate files,
> one with my data, other with Lattitude and another with Longitude.
> They have the same size and, as an example, it means that Pixel (1,1)
> of data is located in latitude retrieved from Pixel (1,1) from
> latitude and longitude (pixel (1,1) from longitude). All of them are
> in WGS84 but without GCP's points.
> I need to create a georreferenced/rectified Geotiff with this data
> and, to do that, I need lat and Long. How can I do this?
>
> Thanks
>
> Best regards,
> Luisa Peña
> S.Paulo, Brazil
>
>
> _______________________________________________
> 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/20100218/5b4d566e/attachment.html
More information about the gdal-dev
mailing list