Hot answers tagged

4

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.


2

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: gdal_pansharpen(['', ...


2

After updating gdal, use this: from osgeo_utils import gdal_pansharpen # for GDAL >= 3.3 # OR # from osgeo.utils import gdal_pansharpen # for GDAL == 3.2


2

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: Corner Coordinates: Upper Left ( 49.0199100, 65.2826500) Lower ...


1

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/...


1

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'.


Only top voted, non community-wiki answers of a minimum length are eligible