Hi,
I want to set an image PNG background to transparent. I do using gdalwarp,
but the image flips horizontally.
I am using a workaround, executing the gdalwarp command twice to flip back.
Can I set the background to transparent using just one command without flip
?
IMAGE ORIGINAL:
Driv
Hi,
Third approach, convert the image into VRT format into a temporary directory
and both the SRS and statistics will go into the VRT file:
gdal_translate -of VRT -stats input.tif \temp_dir\for_metadata.vrt.
I guess that the temp_dir can be in memory if it feels good.
-Jukka Rahkonen-
Lähettä
Another more common way to address the problem is to perform a log
transform on the image see
https://theailearner.com/2019/01/01/log-transformation/
I am not aware of any ootb log transform libraries. That link above does
show how to do it in OpenCV and numpy. I would probably use Pillow my self
Hi,
Another approach, also involving a copy, is to read the raster data as
numpy arrays and compute the statistics of those arrays. The GDAL method
also has to read the raster data to compute statistics, of course, but
doesn't store the entirety of it in memory.
On Mon, Oct 10, 2022, 6:51 AM Lau
Hi Mats,
This won't help you, but I wanted to suggest you make a temporary directory,
copy the .aux.xml file there, then set GDAL_PAM_PROXY_DIR. Unfortunately, at
least in my test, GDAL still seems to save the file next to the input, even
when calling SetConfigOption before doing anything else.
Hello!
I'm writing a Python program which reads raster data. The program uses the
ComputeStatistics() function on the dataset, which automatically attempts to
write the result to an .aux.xml next to the raster file. I do not under any
circumstance want to try to write to the source directory, s
Hi,
I tried first only with gdalinfo. Now I tried Python (v. 3.9 with GDAL 3.4.1
from OSGeo4W) and for me the script stops into another error
ERROR 4:
`/vsicurl?max_retry=3&retry_delay=1&list_dir=no&url=https://files.isric.org/soilgrids/latest/data/ocs\./ocs_0-30cm_mean/tileSG-016-043/tileSG-0
(To follow my own advice, I've tried with a fresh environment with GDAL
3.4.1 and Python 3.9!)
On Mon, 10 Oct 2022 at 09:02, Daniel Evans
wrote:
> Hi Jukka,
>
> Can you, or the original poster, give some more information on what Python
> and GDAL versions you're using that cause trouble? I've no
Hi Jukka,
Can you, or the original poster, give some more information on what Python
and GDAL versions you're using that cause trouble? I've not immediately hit
404 errors on trying - with CPL_DEBUG=ON, I can see GDAL successfully
opening tiles (HTTP 206).
With something like 13,000 tiles in a si
Hi all,
I'm still tinkering on my
automatic-download-satellite-data-and-create-images-from-my-area scripts
and I was wondering if anybody could help me out or point me to some math.
I'm currently using percentiles in a little Python script to compress
the contrast of my images. The result is
10 matches
Mail list logo