[gdal-dev] gdal_translate and TIFF resolutions(?)

Frank Warmerdam warmerdam at pobox.com
Thu Dec 15 16:26:00 EST 2011


Mike,

Can you provide the output of tiffinfo, and tiffdump on the
file produced by gdal_translate?  GDAL does have support
for setting the resolution fields if particular source metadata
is provided but normally that metadata is not available and
no resolution fields should be written at all.

I'd also like to know what version of gdal you are using.

Best regards,
Frank

On Thu, Dec 15, 2011 at 12:50 PM, Mike O'Malley
<mike.omalley at nextcentury.com> wrote:
> Hi,
>
>    I’m using gdal_translate to chip out TIFFs from a NITF using the command
> line:
>
> gdal_translate -ot Int32 -of Gtiff  -strict  -outsize 3000 3000 –srcwin 0 0
> 3000 3000 c:\data\image.ntf c:\data\output_image.tiff
>
>
>
>    Tiffinfo (which throws an error) has a problem with the resolution field-
> the x and y resolutions seem to be unset.  Irfanview will display the image,
> but also shows the resolution to be blank.  When I modify the resolution
> within Irfanview, I’m able to load the image using any app- paint.net,
> photoshop, MS Paint, programmatically with OpenCV, etc.
>
>    How can I force gdal_translate to set that resolution field?  I’m not a
> TIFF expert, but it seems like it would be a standard field if tiffinfo
> throws an error when it’s not populated.
>
>
>
>    Thanks,
>
>                 Mike
>
>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev



-- 
---------------------------------------+--------------------------------------
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 Software Developer


More information about the gdal-dev mailing list