Re: [gdal-dev] How to locate where the raster min and max values are?

2024-10-29 Thread Ujaval Gandhi via gdal-dev
Another approach using rasterio import rasterio import numpy as np dataset = rasterio.open('P3412A.tif') band1 = dataset.read(1) rows, cols = np.where(band1 == np.max(band1)) lon, lat = rasterio.transform.xy(dataset.transform, row[0], col[0]) print(lat, lon) --- Ujaval Gandhi Spatia

Re: [gdal-dev] Rotating a raster?

2023-07-17 Thread Ujaval Gandhi
-raster-using-python&userId=8747767&signature=ad33731e269a50d0] --- Ujaval Gandhi Spatial Thoughts www.spatialthoughts.com [https://mailtrack.io/trace/link/8a3e8e7a8c5d14be3dd980b240946403e1f8024c?url=http%3A%2F%2Fwww.spatialthoughts.com&userId=8747767&signature=9b2a49a0cd6960e4]

Re: [gdal-dev] Question About OGR

2023-05-11 Thread Ujaval Gandhi
As Lautentiu mentioned, you need to install GDAL in the Colab environment. Here's an example notebook showing how https://colab.research.google.com/drive/1vOdd-kGAvR0Nhcrc6OpOLDeH3KZgzP8c?usp=sharing---Ujaval GandhiSpatial Thoughtswww.spatialthoughts.comOn Thu, May 11, 2023 at 12:26 PM Laurențiu Ni

Re: [gdal-dev] How to get the same behaviour as the 'Difference tool' of QGIS, in ogr2ogr?

2023-05-10 Thread Ujaval Gandhi
d=8747767&signature=f3a663794cf05dc3] --- Ujaval Gandhi Spatial Thoughts www.spatialthoughts.com [https://mailtrack.io/trace/link/4ddad0f9cf2b5c3c4c75c835dbf4a885ea30591b?url=http%3A%2F%2Fwww.spatialthoughts.com&userId=8747767&signature=de7d85fbbe1e0bcd] [data:image/gif;base

Re: [gdal-dev] JPEG2000 with COG like structure

2023-04-28 Thread Ujaval Gandhi
What about using JPEG compression with GeoTIFF files instead and thus enabling you to use COGs? In my experience, you can get pretty close to the JPEG2000 file size with a GeoTIFF with JPEG compression. --- Ujaval Gandhi Spatial Thoughts www.spatialthoughts.com [https://mailtrack.io/trace/link

Re: [gdal-dev] not enough disk space for gdal_merge even though I have ~1TB free

2022-11-09 Thread Ujaval Gandhi
efficient. See the workflow at https://courses.spatialthoughts.com/gdal-tools.html#merging-tiles [https://courses.spatialthoughts.com/gdal-tools.html#merging-tiles] --- Ujaval Gandhi Spatial Thoughts www.spatialthoughts.com [http://www.spatialthoughts.com] [data:image/gif;base64,R0lGODlhAQABAIAAAP