Re: [gdal-dev] [EXTERNAL] Re: GeoTiff JXL sample format & bits per sample restrictions?

2024-02-09 Thread Meyer, Jesse R. (GSFC-618.0)[SCIENCE SYSTEMS AND APPLICATIONS INC] via gdal-dev
Thanks TB!

From: thomas bonfort 
Date: Friday, February 9, 2024 at 9:50 AM
To: "Meyer, Jesse R. (GSFC-618.0)[SCIENCE SYSTEMS AND APPLICATIONS INC]" 

Cc: "gdal-dev@lists.osgeo.org" 
Subject: Re: [EXTERNAL] Re: [gdal-dev] GeoTiff JXL sample format & bits per 
sample restrictions?

CAUTION: This email originated from outside of NASA.  Please take care when 
clicking links or opening attachments.  Use the "Report Message" button to 
report suspicious messages to the NASA SOC.


doc update PR in https://github.com/OSGeo/gdal/pull/9220

On Fri, Feb 9, 2024 at 3:38 PM Meyer, Jesse R. (GSFC-618.0)[SCIENCE SYSTEMS AND 
APPLICATIONS INC] mailto:jesse.r.me...@nasa.gov>> wrote:
We can work with the Uint16 case.  These dtype limitations should be listed on 
the gtiff docs presumably.

From: thomas bonfort mailto:thomas.bonf...@gmail.com>>
Date: Friday, February 9, 2024 at 9:37 AM
To: "Meyer, Jesse R. (GSFC-618.0)[SCIENCE SYSTEMS AND APPLICATIONS INC]" 
mailto:jesse.r.me...@nasa.gov>>
Cc: "gdal-dev@lists.osgeo.org" 
mailto:gdal-dev@lists.osgeo.org>>
Subject: [EXTERNAL] Re: [gdal-dev] GeoTiff JXL sample format & bits per sample 
restrictions?

CAUTION: This email originated from outside of NASA.  Please take care when 
clicking links or opening attachments.  Use the "Report Message" button to 
report suspicious messages to the NASA SOC.

JXL in tiff should support the 2 band case correctly. What is not supported 
here is the int16 datatype. Only uint8, uint16 and float32 are supported.

TB

On Fri, Feb 9, 2024 at 3:32 PM Meyer, Jesse R. (GSFC-618.0)[SCIENCE SYSTEMS AND 
APPLICATIONS INC] via gdal-dev 
mailto:gdal-dev@lists.osgeo.org>> wrote:
We are trying to convert a 2 band int16 ZSTD compressed geotiff to JXL 
compression.  However for each band the following error message is given “ERROR 
1: GetJXLDataType:Unsupported combination of SampleFormat and BitsPerSample”.

On GDAL 3.8.3, released 2024/01/04.  JXL v0.9.2

gdal_translate -ot int16 -co "COMPRESS=JXL" -co "NUM_THREADS=8" -co "TILED=YES" 
-co "SPARSE_OK=YES" -
co "INTERLEAVE=BAND" -co "JXL_LOSSLESS=YES" in.tif out_JXL.tif

The docs state an encode limitation for GDAL < 3.6 wrt interleave and band 
counts.  We’re not subject to that, unless there’s a bug, but I do wonder if we 
have nonetheless gone off the support path with band interleave with 2 bands?

Jesse
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] [EXTERNAL] Re: GeoTiff JXL sample format & bits per sample restrictions?

2024-02-09 Thread thomas bonfort via gdal-dev
doc update PR in https://github.com/OSGeo/gdal/pull/9220

On Fri, Feb 9, 2024 at 3:38 PM Meyer, Jesse R. (GSFC-618.0)[SCIENCE SYSTEMS
AND APPLICATIONS INC]  wrote:

> We can work with the Uint16 case.  These dtype limitations should be
> listed on the gtiff docs presumably.
>
>
>
> *From: *thomas bonfort 
> *Date: *Friday, February 9, 2024 at 9:37 AM
> *To: *"Meyer, Jesse R. (GSFC-618.0)[SCIENCE SYSTEMS AND APPLICATIONS
> INC]" 
> *Cc: *"gdal-dev@lists.osgeo.org" 
> *Subject: *[EXTERNAL] Re: [gdal-dev] GeoTiff JXL sample format & bits per
> sample restrictions?
>
>
>
> *CAUTION:* This email originated from outside of NASA.  Please take care
> when clicking links or opening attachments.  Use the "Report Message"
> button to report suspicious messages to the NASA SOC.
>
>
>
> JXL in tiff should support the 2 band case correctly. What is not
> supported here is the int16 datatype. Only uint8, uint16 and float32 are
> supported.
>
>
>
> TB
>
>
>
> On Fri, Feb 9, 2024 at 3:32 PM Meyer, Jesse R. (GSFC-618.0)[SCIENCE
> SYSTEMS AND APPLICATIONS INC] via gdal-dev 
> wrote:
>
> We are trying to convert a 2 band int16 ZSTD compressed geotiff to JXL
> compression.  However for each band the following error message is given
> “ERROR 1: GetJXLDataType:Unsupported combination of SampleFormat and
> BitsPerSample”.
>
>
>
> On GDAL 3.8.3, released 2024/01/04.  JXL v0.9.2
>
>
>
> gdal_translate -ot int16 -co "COMPRESS=JXL" -co "NUM_THREADS=8" -co
> "TILED=YES" -co "SPARSE_OK=YES" -
>
> co "INTERLEAVE=BAND" -co "JXL_LOSSLESS=YES" in.tif out_JXL.tif
>
>
>
> The docs state an encode limitation for GDAL < 3.6 wrt interleave and band
> counts.  We’re not subject to that, unless there’s a bug, but I do wonder
> if we have nonetheless gone off the support path with band interleave with
> 2 bands?
>
>
>
> Jesse
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] [EXTERNAL] Re: GeoTiff JXL sample format & bits per sample restrictions?

2024-02-09 Thread Meyer, Jesse R. (GSFC-618.0)[SCIENCE SYSTEMS AND APPLICATIONS INC] via gdal-dev
We can work with the Uint16 case.  These dtype limitations should be listed on 
the gtiff docs presumably.

From: thomas bonfort 
Date: Friday, February 9, 2024 at 9:37 AM
To: "Meyer, Jesse R. (GSFC-618.0)[SCIENCE SYSTEMS AND APPLICATIONS INC]" 

Cc: "gdal-dev@lists.osgeo.org" 
Subject: [EXTERNAL] Re: [gdal-dev] GeoTiff JXL sample format & bits per sample 
restrictions?

CAUTION: This email originated from outside of NASA.  Please take care when 
clicking links or opening attachments.  Use the "Report Message" button to 
report suspicious messages to the NASA SOC.


JXL in tiff should support the 2 band case correctly. What is not supported 
here is the int16 datatype. Only uint8, uint16 and float32 are supported.

TB

On Fri, Feb 9, 2024 at 3:32 PM Meyer, Jesse R. (GSFC-618.0)[SCIENCE SYSTEMS AND 
APPLICATIONS INC] via gdal-dev 
mailto:gdal-dev@lists.osgeo.org>> wrote:
We are trying to convert a 2 band int16 ZSTD compressed geotiff to JXL 
compression.  However for each band the following error message is given “ERROR 
1: GetJXLDataType:Unsupported combination of SampleFormat and BitsPerSample”.

On GDAL 3.8.3, released 2024/01/04.  JXL v0.9.2

gdal_translate -ot int16 -co "COMPRESS=JXL" -co "NUM_THREADS=8" -co "TILED=YES" 
-co "SPARSE_OK=YES" -
co "INTERLEAVE=BAND" -co "JXL_LOSSLESS=YES" in.tif out_JXL.tif

The docs state an encode limitation for GDAL < 3.6 wrt interleave and band 
counts.  We’re not subject to that, unless there’s a bug, but I do wonder if we 
have nonetheless gone off the support path with band interleave with 2 bands?

Jesse
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] [EXTERNAL] Re: GeoTiff JXL sample format & bits per sample restrictions?

2024-02-09 Thread Meyer, Jesse R. (GSFC-618.0)[SCIENCE SYSTEMS AND APPLICATIONS INC] via gdal-dev
Gladly,

Driver: GTiff/GeoTIFF
Files: in.tif
Size is 32000, 32000
Coordinate System is:
PROJCRS["Africa_Albers_Equal_Area_Conic",
BASEGEOGCRS["WGS 84",
DATUM["World Geodetic System 1984",
ELLIPSOID["WGS 84",6378137,298.257223563,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4326]],
CONVERSION["Albers Equal Area",
METHOD["Albers Equal Area",
ID["EPSG",9822]],
PARAMETER["Latitude of false origin",0,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8821]],
PARAMETER["Longitude of false origin",25,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8822]],
PARAMETER["Latitude of 1st standard parallel",20,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8823]],
PARAMETER["Latitude of 2nd standard parallel",-23,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8824]],
PARAMETER["Easting at false origin",0,
LENGTHUNIT["metre",1],
ID["EPSG",8826]],
PARAMETER["Northing at false origin",0,
LENGTHUNIT["metre",1],
ID["EPSG",8827]]],
CS[Cartesian,2],
AXIS["easting",east,
ORDER[1],
LENGTHUNIT["metre",1,
ID["EPSG",9001]]],
AXIS["northing",north,
ORDER[2],
LENGTHUNIT["metre",1,
ID["EPSG",9001
Data axis to CRS axis mapping: 1,2
Origin = (-380.000,1928000.000)
Pixel Size = (0.500,-0.500)
Metadata:
  ACQDATE=2010-11-26 11:20:06.338865
  AREA_OR_POINT=Area
  CAT_ID=1050410001250C00
  CHIRPS=214.43
  CLOUDCOVER=0.0
  CLOUD_FRAC=0.0
  IMAGENAME=redacted.ntf
  MAX_AOD=0.233
  OFF_NADIR=11.8
  RESOLUTION=0.5
  RF_ADD=0.0
  RF_MULT=2000.0
  SAT_AZ=185.9
  SAT_ELEV=76.8
  SENSOR=GE01
  SUN_AZ=154.2
  SUN_ELEV=48.5
  TDI=16.0
Image Structure Metadata:
  COMPRESSION=ZSTD
  INTERLEAVE=BAND
  PREDICTOR=2
Corner Coordinates:
Upper Left  (-380.000, 1928000.000) ( 11d22' 1.85"W, 16d47' 0.21"N)
Lower Left  (-380.000, 1912000.000) ( 11d22'10.38"W, 16d38'30.31"N)
Upper Right (-3784000.000, 1928000.000) ( 11d12'50.68"W, 16d46'52.33"N)
Lower Right (-3784000.000, 1912000.000) ( 11d12'59.18"W, 16d38'22.44"N)
Center  (-3792000.000, 192.000) ( 11d17'30.52"W, 16d42'41.27"N)
Band 1 Block=256x256 Type=UInt16, ColorInterp=Gray
  Description = Panchromatic
  Min=1.000 Max=1734.000
  Minimum=1.000, Maximum=1734.000, Mean=489.009, StdDev=65.409
  NoData Value=0
  Metadata:
STATISTICS_MAXIMUM=1734
STATISTICS_MEAN=489.00875598419
STATISTICS_MINIMUM=1
STATISTICS_STDDEV=65.408895074611
STATISTICS_VALID_PERCENT=99.999
Band 2 Block=256x256 Type=UInt16, ColorInterp=Undefined
  Description = NDVI
  Min=582.000 Max=1781.000
  Minimum=582.000, Maximum=1781.000, Mean=1103.895, StdDev=61.554
  NoData Value=0
  Metadata:
STATISTICS_MAXIMUM=1781
STATISTICS_MEAN=1103.8951663354
STATISTICS_MINIMUM=582
STATISTICS_STDDEV=61.553712802204
STATISTICS_VALID_PERCENT=99.99

From: thomas bonfort 
Date: Friday, February 9, 2024 at 9:33 AM
To: "Meyer, Jesse R. (GSFC-618.0)[SCIENCE SYSTEMS AND APPLICATIONS INC]" 

Cc: "gdal-dev@lists.osgeo.org" 
Subject: [EXTERNAL] Re: [gdal-dev] GeoTiff JXL sample format & bits per sample 
restrictions?

CAUTION: This email originated from outside of NASA.  Please take care when 
clicking links or opening attachments.  Use the "Report Message" button to 
report suspicious messages to the NASA SOC.


could you share the output of "gdalinfo in.tif" please?

On Fri, Feb 9, 2024 at 3:32 PM Meyer, Jesse R. (GSFC-618.0)[SCIENCE SYSTEMS AND 
APPLICATIONS INC] via gdal-dev 
mailto:gdal-dev@lists.osgeo.org>> wrote:
We are trying to convert a 2 band int16 ZSTD compressed geotiff to JXL 
compression.  However for each band the following error message is given “ERROR 
1: GetJXLDataType:Unsupported combination of SampleFormat and BitsPerSample”.

On GDAL 3.8.3, released 2024/01/04.  JXL v0.9.2

gdal_translate -ot int16 -co "COMPRESS=JXL" -co "NUM_THREADS=8" -co "TILED=YES" 
-co "SPARSE_OK=YES" -
co "INTERLEAVE=BAND" -co "JXL_LOSSLESS=YES" in.tif out_JXL.tif

The docs state an encode limitation for GDAL < 3.6 wrt interleave and band 
counts.  We’re not subject to that, unless there’s a bug, but I do wonder if we 
have nonetheless gone off the support path with band interleave with 2 bands?

Jesse
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev