Polygonizing raster are always slow but maybe this can speed it up:
Reclassify your raster using Raster calculator to 1 or 0. For example if your black values are 50-100 and your white 100-200:
(raster@1>50)(raster@1<100)*1 + (raster@1>100)(raster@1<200)*0
Then polygonize this.
I updated gdal version to 3.3.1 by running following:
conda create -n gdal python=3.8
conda activate gdal
conda install gdal -c conda-forge
and to import the module, what I did is:
from osgeo_utils.gdal_pansharpen import gdal_pansharpen
I found that the function only work if I leave the first argument as blank.
with seperate bands:
Looks like you really want to use the -a_ullr argument to set the four corners of the image. I have a png with no coordinate info, and if I do this:
$ gdal_translate -a_srs epsg:4326 -a_ullr 49.01991 65.28265 53.18008 63.48401 exceed4.png exceed4.tiff
I get a tiff with these coordinates:
Upper Left ( 49.0199100, 65.2826500)
This is a clue: "the batches that failed had the largest number of tiles"
The system function which gdalUtils functions use will be subject to the operating system limitations on command line lengths.
For example, if I do system("ls /etc/passwd") its passing a command of length 20 characters. This works fine. If I do system("ls /etc/...
You can't compare to NULLs so you need to use tk_geomWKT is not NULL instead. See this page for more details, or for a longer and fuller discussion of why you can't do this see this question.
If, however, you have an actual string NULL you need to enclose it in ' single quotes, tk_geomWKT != 'NULL'.