Re: [gdal-dev] gdal_translate -scale

2020-12-14 Thread Rahkonen Jukka (MML)
Hi, Please remember to use reply-to-all for sending a copy to the list as well. -Jukka- -Alkuperäinen viesti- Lähettäjä: jesus.mo...@solute.es Lähetetty: maanantai 14. joulukuuta 2020 14.27 Vastaanottaja: Rahkonen Jukka (MML) Aihe: RE: [gdal-dev] gdal_translate -scale Hi, Thank you

Re: [gdal-dev] gdal_translate -scale

2020-12-14 Thread jratike80
Hi, If your output is 8 bit you can just use -scale without min/max values. From https://gdal.org/programs/gdal_translate.html: "Rescale the input pixels values from the range src_min to src_max to the range dst_min to dst_max. If omitted the output range is 0 to 255. If omitted the input range i

[gdal-dev] gdal_translate -scale

2020-12-14 Thread jesus.moran
Hello GDAL team and thank you for welcome me. I have an issue with the gdal_translate command. I would like to use the “STATISTICS_MIN” and “STATISTICS_MAX” metadata key values in the -scale parameter of the program, so I don’t need to specify it manually every time I want to scale the output.

Re: [gdal-dev] gdal_translate -scale with PNG

2011-07-28 Thread Stephen Mather
I thought I'd tried that and it failed, but it looks to be just a problem of stale statistics. Thanks Marius. Steve On Wed, Jul 27, 2011 at 10:16 PM, Marius Jigmond wrote: > On 07/27/2011 04:16 PM, Stephen Mather wrote: > > Hi All, > I'm using gdal_translate (version 1.6.3 on Ubuntu) wit

Re: [gdal-dev] gdal_translate -scale with PNG

2011-07-27 Thread Marius Jigmond
On 07/27/2011 04:16 PM, Stephen Mather wrote: Hi All, I'm using gdal_translate (version 1.6.3 on Ubuntu) with a scale factor to stretch float values to 16-bit integer values. It works fine with tif output, but with PNG it stretches the values to 8-bit: gdal_translate -of PNG -scale 0 15

[gdal-dev] gdal_translate -scale with PNG

2011-07-27 Thread Stephen Mather
Hi All, I'm using gdal_translate (version 1.6.3 on Ubuntu) with a scale factor to stretch float values to 16-bit integer values. It works fine with tif output, but with PNG it stretches the values to 8-bit: gdal_translate -of PNG -scale 0 1550 0 65535 N2140615.txt N2140615.png Is this a kno

Re: [gdal-dev] gdal_translate -scale and negative values

2010-02-15 Thread Hermann Peifer
didn't you notice that... Not really. I must have been blind. Thanks for your hint. This works fine. Hermann Original Message Subject: [gdal-dev] gdal_translate -scale and negative values From: Even Rouault To: gdal-dev@lists.osgeo.org Cc: Hermann Peifer ,

Re: [gdal-dev] gdal_translate -scale and negative values

2010-02-15 Thread Even Rouault
Herman, didn't you notice that -32768 / 100 = -327.68 ~= -328 ... ;-) ? The issue is that when doing rescaling, gdal_translate doesn't currently explicetly set the source nodata value as the nodata value of the VRT source, so the pixels whose value is the nodata value are just rescaled as other

[gdal-dev] gdal_translate -scale and negative values

2010-02-15 Thread Hermann Peifer
Hi, I am trying to scale the values in an Int16 raster band. Basically, I want to have them divided by 100. It looks to me that negative values are not scaled at all, whatever ranges I give to -scale. What am I doing wrong? Hermann $ gdalinfo -mm infile.tif ... Band 1 Block=7200x1 Type=Int16