Re: [gdal-dev] gdalwarp Resampling Input Raster Nodata Setting

2022-06-27 Thread Rahkonen Jukka
Hi, You are reading the documentation optimistically. The -srsnodata does accept a list but the list can only be a one nodata value per band. “Set nodata masking values for input bands (different values can be supplied for each band).” In the GDAL datamodel the nodata in rasterband is a single

Re: [gdal-dev] gdalwarp Resampling Input Raster Nodata Setting

2022-06-27 Thread Chao Li
Hi, Thank you for your reply. I realized the issues. Thank you. Li Rahkonen Jukka 于2022年6月28日周二 15:27写道: > Hi, > > > > You are reading the documentation optimistically. The -srsnodata does > accept a list but the list can only be a one nodata value per band. > > “Set nodata masking values for

Re: [gdal-dev] gdal_calc.py Does Not Work on Mac

2022-06-27 Thread Andreas Oxenstierna
Hi My gdal installation with brew, https://formulae.brew.sh/formula/gdal, do work on macOS: which gdal_calc.py /usr/local/bin/gdal_calc.py ls -l /usr/local/bin/gdal_calc* /usr/local/bin/gdal_calc.py -> ../Cellar/gdal/3.3.2_3/bin/gdal_calc.py Do you have to use Anaconda? Best Regards Andreas

[gdal-dev] gdal_calc.py Does Not Work on Mac

2022-06-27 Thread Chao Li
Hi, I meet a problem when I use gdal_calc.py on mac: (base) lichao@riushios-MacBook-Pro ~ % gdal_calc.py Traceback (most recent call last): File "/Users/lichao/opt/anaconda3/lib/python3.9/site-packages/osgeo/__init__.py", line 29, in swig_import_helper return importlib.import_module(mnam

[gdal-dev] building on macOS - fatal error: 'direct.h' file not found

2022-06-27 Thread Nik Sands
Hi GDAL devs, Since I last built GDAL (2.2.2), cmake has been introduced and it appears as though it is going to be the only option going forward. So I’m attempting to use cmake to build GDAL 3.5.0 on macOS 12.4 ('Monterey’). I’ve installed cmake using the ‘homebrew’ macOS package manager. H

Re: [gdal-dev] gdalwarp Resampling Input Raster Nodata Setting

2022-06-27 Thread Chao Li
Hi, I read the gdalwarp synopsis: https://gdal.org/programs/gdalwarp.html I find the multi values can be used, but it has to write in -srcnodata "32760 32761 32762 32763 32764 32765 32766 32767". However, it does not work. Does anyone know how to figure it out? Thanks Rahkonen Jukka 于2022年6月

Re: [gdal-dev] Fwd: Creating MBTiles with transparent background from GeoTIFF

2022-06-27 Thread Rahkonen Jukka
Hi, Your original image does not have nodata: gdalinfo sample_geotiff.tif ... Band 1 Block=8889x1 Type=Byte, ColorInterp=Red Band 2 Block=8889x1 Type=Byte, ColorInterp=Green Band 3 Block=8889x1 Type=Byte, ColorInterp=Blue MBTiles driver does not support transparency with nodata but with alpha ht

[gdal-dev] Fwd: Creating MBTiles with transparent background from GeoTIFF

2022-06-27 Thread Kanishk Varshney
Hey all, I am stuck with MBTiles creation from GeoTIFF files that have a black background (RGB: 0,0,0). In QGIS, I am able to generate MBTiles via the following steps: - Set Transparency pixel (0 0 0) to get a geotiff with transparent background - Use Generate XYZ tiles (MBTiles) tool t

[gdal-dev] GDAL 3.5.1 RC1 available

2022-06-27 Thread Even Rouault
Hi, I have prepared a GDAL/OGR 3.5.1 release candidate. Pick up an archive among the following ones (by ascending size):   https://download.osgeo.org/gdal/3.5.1/gdal-3.5.1rc1.tar.xz   https://download.osgeo.org/gdal/3.5.1/gdal-3.5.1rc1.tar.gz   https://download.osgeo.org/gdal/3.5.1/gdal351rc1.z

Re: [gdal-dev] gdalwarp Resampling Input Raster Nodata Setting

2022-06-27 Thread Rahkonen Jukka
Hi, Your idea is OK in theory but GeoTIFF supports only one nodata value. This is not relevant with your single band data, but it may be good to know that in GeoTIFF the nodata value is also the same for all bands. Therefore with GeoTIFF it is not possible to make for example blue 0 0 255 nodat

Re: [gdal-dev] gdalwarp Resampling Input Raster Nodata Setting

2022-06-27 Thread Chao Li
Hi, You are right but when I try to check the data processing, there is no any compression. On my computer, it is similar to your situation. I guess most nodata values are over 32760, so maybe I can list all of them. -srcnodata <32760 32761 32762 32763 32764 32765 32766 32767>. Is this the right

Re: [gdal-dev] gdalwarp Resampling Input Raster Nodata Setting

2022-06-27 Thread Rahkonen Jukka
Hi, Please send answers as reply-to-all so they will go also to the gdal-dev mailing list. There is something odd in the source data. As you can see from the attached image there are pixels which are close to the nodata 32767 but not exactly. Huge areas have value 32766 but here and there I ca

Re: [gdal-dev] gdalwarp Resampling Input Raster Nodata Setting

2022-06-27 Thread Rahkonen Jukka
Hi, It seems to work for me with GDAL 3.6.0dev on Windows. gdalwarp -t_srs EPSG:4326 -r average -ot float64 -multi MOD17A2H_GPP_2020_001.tif mod64m.tif Creating output file that is 2969P x 2572L. Processing MOD17A2H_GPP_2020_001.tif [1/1] : 0Using internal nodata values (e.g. 32767) for image M