New answers tagged

1

Your indentation is off, but I'll assume that's just a copy/paste issue. Your issue is that 'F:\\prep\\converted\\*.tif' will try to output a file called literally *.tif which won't work. You need to provide an actual file name. I suggest using os.path.join and os.path.basename Try this: from osgeo import gdal import glob import os input_path = 'F:\\...


0

Thanks user30184, this works: gdal_translate -a_srs epsg:4326 -gcp 0 0 6.756394 45.192361 -gcp 0 1080 6.756394 45.127057 -gcp 1820 0 6.912606 45.192361 -gcp 1820 1080 6.912606 45.127057 -co "TILE_FORMAT=JPEG" etache.jpg etache.mbtiles


1

Try in two steps: 1) Insert ground control points into a virtual raster file gdal_translate -of VRT -gcp 0 0 6.756394 45.192361 -gcp 0 1080 6.756394 45.127057 -gcp 1820 0 6.912606 45.192361 -gcp 1820 1080 6.912606 45.127057 etache.jpg etache.vrt 2) Convert the result with gdalwarp gdalwarp -of MBTiles -s_srs epsg:4326 -t_srs epsg:3857 etache.vrt etache....


0

Here is the best solution I found up to now, however if someone has an idea on how to do it differentely or what I could do to improve the code I would appreciate it. The Pixel-Function Code for calculating the modal value in the end is: <VRTRasterBand dataType="Byte" band="1" subClass="VRTDerivedRasterBand"> <PixelFunctionType>average&...


1

A bit older GDAL versions required the use of -of parameter (notice: with the format name, for example -of PNG) or otherwise it used GeoTIFF as the default format. You can check your version with gdalinfo --version. However, you have given .sid as the extension of the output file and because MrSID driver is read only then any GDAL version will use GeoTIFF ...


Top 50 recent answers are included