[gdal-dev] Error while using osr.CoordinateTransformation (point outside of domain) with orthographic projection

2025-01-20 Thread afernandez via gdal-dev
Hello, While transforming point coordinates from lat/lon to a specified projection, I keep running into errors while trying to use some projections. The line generating the error reads: transform = osr.CoordinateTransformation(srs_in, srs_out) For example, when defining "+proj=webmerc +datum=WGS84

[gdal-dev] Issue with Robinson projection

2025-01-13 Thread afernandez via gdal-dev
Hello, The following snippet works fine # epsg = 54030 epsg = 4326 srs = osr.SpatialReference() srs.ImportFromEPSG(epsg) However, and when I switch epsg to 54030 (which I believe it's the value for the Robinson projection), it generates the error: File "/usr/lib/python3/dist-packages/osgeo/osr.py"

Re: [gdal-dev] Running into GDAL ERROR 1

2024-02-05 Thread afernandez via gdal-dev
Please disregard this thread as the error is caused by dx and dy are equal to zero (still need to check why the coordinates are resulting in these values). afernandez via gdal-dev wrote: Hello, I've upgraded QGIS from v3.30 to v3.34. However, and when plotting the same raster layer, it i

[gdal-dev] Please disregard my previous email (dx and dy are zeros)

2024-02-05 Thread afernandez via gdal-dev
Hello, Please disregard my previous email (dx and dy are zeros). I apologize for sending it in a rush as it clearly is bound to fail when dx & dy =0. Sorry about it. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listi

[gdal-dev] Running into GDAL ERROR 1

2024-02-05 Thread afernandez via gdal-dev
Hello, I've upgraded QGIS from v3.30 to v3.34. However, and when plotting the same raster layer, it is now generating the error: GDAL ERROR 1: Cannot invert geotransform The geotransform value is (0.0, -3.88...e-11, 0, -6.402...e-10, 0, -0.0). QGIS is listing the GDAL version as 3.4.1, which is al

[gdal-dev] Why is color palette changed when the bands are plotted?

2023-09-10 Thread afernandez
Hello, I'm generating a raster file with GDAL in QGISv3.30. The pseudo-code (with the raster data loaded as 'var') reads: dims = var.dimensions shape = var.shape driver_name = 'GTIFF' driver = gdal.GetDriverByName(driver_name) np_dtype = var.dtype type_code = gdal_array.NumericTypeCodeToGDALTypeCo

Re: [gdal-dev] How to decrease file size of colored raster bands?

2023-06-02 Thread afernandez
ut files. Thanks for all your help, Arturo Laurențiu Nicola via gdal-dev wrote: Hi, Try saving the output into a new file. Those are "creation options". Laurentiu On Thu, Jun 1, 2023, at 20:34, afernandez wrote: Hello Laurentiu, The color palette is working fine. The issues seem to be cau

Re: [gdal-dev] How to decrease file size of colored raster bands?

2023-06-01 Thread afernandez
ation or use the COG driver (it's a subset of GTiff) finally, you can use a lossy compression format like JPEG or LERC, but it's probably not what you want Regards, Laurentiu On Thu, Jun 1, 2023, at 17:35, afernandez wrote: Hello, I'm generating a raster file with GDAL. The pseudo-code

Re: [gdal-dev] How to decrease file size of colored raster bands?

2023-06-01 Thread afernandez
u can skip the whole python debacle and try this: gdal_translate -f COG -co COMPRESSÞFLATE -scale 0 255 -ot Byte source.tif target.tif On 6/1/23 07:35, afernandez wrote: Hello, I'm generating a raster file with GDAL. The pseudo-code (where the > raster is loaded as 'var') for th

[gdal-dev] How to decrease file size of colored raster bands?

2023-06-01 Thread afernandez
Hello, I'm generating a raster file with GDAL. The pseudo-code (where the raster is loaded as 'var') for the colored version reads: # Initial manipulations dims = var.dimensions shape = var.shape driver_name = 'GTIFF' driver = gdal.GetDriverByName(driver_name) np_dtype = var.dtype type_code = gdal

[gdal-dev] Is there any incompatibility between KEA and HDF5?

2023-02-20 Thread afernandez
thout GDAL support. However, it always ends up with the same problem. The error message suggests an invalid argument, but I just don't know why this would happen when KEA is loaded versus when it's not. [Info: the system is running Ubuntu 22.04

Re: [gdal-dev] Segmentation fault while compiling

2023-02-16 Thread afernandez
v3.6.2. suffices for my purposes but it's obviously something to check. Thanks. Even Rouault wrote: Le 16/02/2023 à 03:04, afernandez a écrit : The problem doesn't seem to be about having 2 copies of PROJ as I checked. I was able to compile v3.6.2 w/o this issue so it might be someth

Re: [gdal-dev] Segmentation fault while compiling

2023-02-15 Thread afernandez
n and that will avoid running this script. But the crash indicates something fishy that might hit you at execution of your GDAL build Le 16/02/2023 à 00:20, afernandez a écrit : Hello, I'm trying to compile GDAL from source in order to include the KEA components. My attempt at compiling (co

[gdal-dev] Segmentation fault while compiling

2023-02-15 Thread afernandez
Hello, I'm trying to compile GDAL from source in order to include the KEA components. My attempt at compiling (configured simply with cmake .. -DCMAKE_INSTALL_PREFIX=/usr) failed towards the end with a segmentation fault error, which I cannot figure out ... [ 98%] Built target testlog [ 98%] Build

Re: [gdal-dev] Issues with SetColorTable() and multi-sample TIFF

2023-02-14 Thread afernandez
from source? [Info: the system is running Ubuntu 20.04 and it returns: $ gdalinfo --version GDAL 3.0.4, released 2020/01/28] Thanks, AFernandez Even Rouault wrote: Le 14/02/2023 à 18:46, afernandez a écrit : Hello Even, Thank you for the quick reply. I'll try using GDAL subdatasets later this

Re: [gdal-dev] Issues with SetColorTable() and multi-sample TIFF

2023-02-14 Thread afernandez
e file directories in the same file (mapped as GDAL subdatasets), with one band per subdataset, by using the APPEND_SUBDATASET=YES creation option. Another option is to use the KEA format (specialization of HDF5) which supports all the possibilities of the GDAL abstract data model. Even Le 14/

[gdal-dev] Issues with SetColorTable() and multi-sample TIFF

2023-02-14 Thread afernandez
Hello, I'm using the GDAL Tools plugin within QGIS to plot some raster layers. The snippet reads: driver_name = 'GTIFF' driver = gdal.GetDriverByName(driver_name) ... gdal_ds = driver.Create("my_arguments") gdal_ds.SetProjection("my_projection") gdal_ds.SetGeoTransform("my_geo_transform") for band