Re: [gdal-dev] nearblack on multi GB images very slow

2021-03-12 Thread Komяpa
You need to count tiles in the row, not pixels. ceil(126015/128)*3*8*128*128 = 387 118 080 = half a gigabyte. On Sat, Mar 13, 2021 at 12:08 AM wrote: > > You need to enlarge cache size (GDAL_CACHEMAX) so that it can fit the > uncompressed tiles of one single row of your image. > > > > Oh, ok.

[gdal-dev] Converting DEM height values from feet to meter

2021-03-12 Thread Evert Etienne (SITEMARK)
Hello all, I was wondering what the best or recommended way was to convert the vertical unit of a DEM/DSM. I am able to use gdal_translate, gdal_calc.py, GDAL python bindings or rasterio. I will afterwards be tiling using gdal2tiles. Any pointers would be appreciated. Greetings ___

Re: [gdal-dev] gdal_retile: output isn't georeferenced?

2021-03-12 Thread jratike80
Hi, Expected behavior is documented in https://gdal.org/programs/gdal_retile.html. -s_srs Source spatial reference to use. The coordinate systems that can be passed are anything supported by the OGRSpatialReference.SetFromUserInput() call, which includes EPSG, PCS, and GCSes (i.e. EPSG:4296

Re: [gdal-dev] nearblack on multi GB images very slow

2021-03-12 Thread jratike80
Hi, Are your multigigabyte originals tiled or striped tiffs? -Jukka Rahkonen- mhw-at-yg wrote > I have a lot of multi GB images that are unfortunately jpeg-in-geotiff > encoded before nodata was properly defined. As a result they all suffer > from > the jagged edges problem. >

Re: [gdal-dev] nearblack on multi GB images very slow

2021-03-12 Thread Komяpa
You need to enlarge cache size (GDAL_CACHEMAX) so that it can fit the uncompressed tiles of one single row of your image. On Fri, Mar 12, 2021 at 9:50 PM mhw-at-yg wrote: > I have a lot of multi GB images that are unfortunately jpeg-in-geotiff > encoded before nodata was properly defined. As a r

[gdal-dev] nearblack on multi GB images very slow

2021-03-12 Thread mhw-at-yg
I have a lot of multi GB images that are unfortunately jpeg-in-geotiff encoded before nodata was properly defined. As a result they all suffer from the jagged edges problem. I've defined a method for adding a nodata mask side-car file t

[gdal-dev] gdal_retile: output isn't georeferenced?

2021-03-12 Thread mhw-at-yg
Is it expected that `gdal_retile -of cog -ps 4096 4096 -t myoutdir infile.tif` creates files that are not georeferenced? Using Gdal from QGIS 3.16 on Win10. ~~~ $ gdalinfo --version GDAL 3.1.4, released 2020/10/20 $ gdalinfo u:.\SPOT6_321_BeaverRiver_08Sep2018_NAD83_YAlbers_01_01.tif.msk Driver:

Re: [gdal-dev] The proper way to call gdal "scripts" on Windows?

2021-03-12 Thread mhw-at-yg
I have this bat file in a directory in PATH (For me this is C:\bin\osgeo-py3.bat). I run it in a command session after running Osgeo4W.bat. After this you don't need to use the `python path\to\file.py`invocation. ::: set PATH=%PATH%;%OSGEO4W_ROOT%\apps\Python37;%OSGEO4W_ROOT%\apps\Python37\Scripts

Re: [gdal-dev] Error from GDAL/Ogr creating StatialReference on web app under windows

2021-03-12 Thread Paul Harwood
I have got that before when using the wrong version of the proj.db for the version of PROJ I am using - and if I remember correctly there is a PROJ version update in 3.2.1 Have you checked you have the correct version of proj.db On Fri, 12 Mar 2021 at 14:59, Ove Lindholt Hansen wrote: > Hello L

[gdal-dev] Error from GDAL/Ogr creating StatialReference on web app under windows

2021-03-12 Thread Ove Lindholt Hansen
Hello List. I just ran into a problem. I am using GDAL/Ogr from my web application. I just upgraded to 3.2.1 using the fine installer gdal-302-1928-x64-core.msi from gisinternals. Initalisation of the ogr works fine, as it used to. But creating spatial reference gives a strange error. See code

Re: [gdal-dev] Vector Tile size change in Ogr2Ogr

2021-03-12 Thread jratike80
Hi, Bounds and other metadata are explained in https://github.com/mapbox/mbtiles-spec/blob/master/1.3/spec.md. "The metadata table SHOULD contain these four rows: bounds (string of comma-separated numbers): The maximum extent of the rendered map area. Bounds must define an area covered by all zo