Re: [gdal-dev] Calculations with uint16 rasters

2019-09-18 Thread Pedro VenĂ¢ncio
Hi Even, > We could possibly modify gdal_calc to grab the input raster on the specified > output type, but I'm not completely sure this is a good idea, as there could > be use cases where people would want the initial data type to be preserved. I think this should be considered at some time. Of

Re: [gdal-dev] Calculations with uint16 rasters

2019-09-18 Thread Alexandre Neto
hi Even, If you think it's better to keep it that way, let's leave it as it is. :-) I will definitely try to add that as a hint to the docs. Not sure if that's how you guys work, but I have created an issue for that taks: https://github.com/OSGeo/gdal/issues/1848 Thanks for the fast answer. Al

Re: [gdal-dev] Calculations with uint16 rasters

2019-09-18 Thread Even Rouault
On mercredi 18 septembre 2019 10:00:51 CEST Alexandre Neto wrote: > Hi, > > I am new to this list so sorry if this has ever been asked or discussed. > > I am using two sentinel bands in gdal_calc. they are in jp2 format and > uint16. I was surprised that subtracting one for the other (A - B) was

[gdal-dev] Calculations with uint16 rasters

2019-09-18 Thread Alexandre Neto
Hi, I am new to this list so sorry if this has ever been asked or discussed. I am using two sentinel bands in gdal_calc. they are in jp2 format and uint16. I was surprised that subtracting one for the other (A - B) was giving me strange results. gdal_calc.py --calc "(A-B)" --format GTiff --type