[gdal-dev] How to read tiles size of a tiff

2023-05-16 Thread andy
Hi, I've been having trouble using a tiff on openlayers, and I've found that it depends on it having a negative tile height (-256). This is the tiff: https://andy-aws.s3.eu-north-1.amazonaws.com/sample_dnw_byte.tiff I'm able to read tiles size in OL, using this source.getView().then(() => {

Re: [gdal-dev] Fwd: Transformation of image data between pixel/line and projected coordinates - using geolocation arrays, in both directions, without disk access

2023-05-16 Thread Even Rouault
Daniel, You rightly spotted https://github.com/OSGeo/gdal/pull/6069 as the enabler for that capability. if your existing target dataset has a geolocation array attached to do it, this should just be a matter of doing: target_ds = gdal.Open( filename, gdal.GA_Update ) gdal.Warp(target_ds, s

Re: [gdal-dev] Fwd: Transformation of image data between pixel/line and projected coordinates - using geolocation arrays, in both directions, without disk access

2023-05-16 Thread Daniel Scheffler
Hi! Some time ago, I asked for an inversion of gdal.Warp based on GEOLOCATION arrays (longitude/latitude). Back then, my question was: How can I transform an image with projected coordinates back to cartesian/image coordinates, given that a geolocation array tells GDAL where to put which pixe

Re: [gdal-dev] Shapefile with corrupted index: SHAPE_RESTORE_SHX=YES doesn't correctly repairs it.

2023-05-16 Thread Andrea Giudiceandrea via gdal-dev
Il 16/05/2023 13:52, Jan Heckman ha scritto: Also out of curiosity, Are you willing to share the shapefile, preferably at least shp and dbf, but probably .shp alone will do and .prj helps for checking conversion results. Hi Jan, the corrupted Shapefile layer is available in the QGIS issue rep

Re: [gdal-dev] Shapefile with corrupted index: SHAPE_RESTORE_SHX=YES doesn't correctly repairs it.

2023-05-16 Thread Jan Heckman
Also out of curiosity, Are you willing to share the shapefile, preferably at least shp and dbf, but probably .shp alone will do and .prj helps for checking conversion results. Also, to be sure, the expected number of rows is relevant so as not to call victory too soon. Jan On Tue, May 16, 2023 at

Re: [gdal-dev] Shapefile with corrupted index: SHAPE_RESTORE_SHX=YES doesn't correctly repairs it.

2023-05-16 Thread Andrea Giudiceandrea via gdal-dev
Il 15/05/2023 15:34, Andrea Giudiceandrea ha scritto: it seems to me ogr fails to properly create the .idx [EDIT: .shx] file: it incorrectly stores, in the index file header, the total length in 16-bit words of the .shp file instead of the total length in 16-bit words of the .idx [EDIT: .shx] f

[gdal-dev] Trouble with gdal_calc.py and nodata values

2023-05-16 Thread Marco
I'm trying to accomplish a seemingly simple task: starting from an HDF file, convert it to GTiff, and divide all values in the raster by 10. The original file uses -1 for nodata, and I want to preserve this value all the way down to the final tiff. In other words, where the original file had -1, th