[Geotiff] Geotiff Api

Frank Warmerdam warmerdam at pobox.com
Thu Dec 15 21:22:34 EST 2005


On 12/15/05, Roni <roni at afrigis.co.za> wrote:
>
> Dear,
> Is there any API of geotiff which will return a map according to the lat/lon
> bounding box and size passes through parameter?

Roni,

This functionality is not part of libgeotiff.

Is the GeoTIFF in question in a geographic coordinate
system, or a projected coordinate system?  If it is in
geographic (lat/long) coordinates you could use a tool
such as gdal_translate to extract the window.

eg.
gdal_translate -projwin 20 -14 21 -15 in.tif out.tif

would extract the region from 20E,14S to 21E,15S.

If you wanted to extract such a lat/long window from a
projected file, you could use the gdalwarp utility to
extract and reproject the desired area.

eg.
gdalwarp -te 20 -15 21 -14 -t_srs WGS84 in.tif out.tif

  http://www.gdal.org/

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the Geotiff mailing list