[gdal-dev] array dim permute

Michael Sumner mdsumner at gmail.com
Fri Jul 4 04:22:51 PDT 2025


Thanks Even!  Amazing, I don't think this is a rare case either, there's a
lot of data in files "like this" that I keep encountering.

Another few lines in the NetCDF behemoth, I'll keep reading (and update my
AI subscriptions).

Cheers, Mike


On Fri, Jul 4, 2025 at 8:21 PM Even Rouault <even.rouault at spatialys.com>
wrote:

> Hi Michael,
>
> I guess this is finally the perfect use case we were waiting for to find a
> good reason to embed a Small Language Model within GDAL to figure out what
> are the columns and lines axis.  In the meantime, the boring
> https://github.com/OSGeo/gdal/pull/12700 will fix it
>
> Even
> Le 04/07/2025 à 00:48, Michael Sumner via gdal-dev a écrit :
>
> I'm confused about the orientation of this in 2D mode 1485x1272 is
> correct, with 122 bands.
>
> (requires earthdata auth)
>
> gdal raster info "/vsicurl/
> https://obdaac-tea.earthdatacloud.nasa.gov/ob-cumulus-prod-public/PACE_OCI.20250501T234515.L2.SFREFL.V3_0.nc"
>   --output-format text | grep /rhos
> #  SUBDATASET_1_NAME=NETCDF:"/vsicurl/
> https://obdaac-tea.earthdatacloud.nasa.gov/ob-cumulus-prod-public/PACE_OCI.20250501T234515.L2.SFREFL.V3_0.nc
> ":/geophysical_data/rhos
> #  SUBDATASET_1_DESC=[1485x1272x122] /geophysical_data/rhos (32-bit
> floating-point)
>
> If we drill into the rhos sds X becomes unrolled as the 1485 bands:
>
> gdal raster info "vrt:///vsicurl/
> https://obdaac-tea.earthdatacloud.nasa.gov/ob-cumulus-prod-public/PACE_OCI.20250501T234515.L2.SFREFL.V3_0.nc?sd_name=/geophysical_data/rhos"
> --output-format text | grep "Size"
> #Size is 122, 1272
>
> We can (redundantly??) cast via mdim to get 1485x1272, but then we've lost
> the geolocation arrays:
>
> gdal raster info "vrt:///vsicurl/
> https://obdaac-tea.earthdatacloud.nasa.gov/ob-cumulus-prod-public/PACE_OCI.20250501T234515.L2.SFREFL.V3_0.nc?transpose=/geophysical_data/rhos:0,1"
> --output-format text | grep "Size"
> #Size is 1485, 1272
>
> At any rate in the default case the geolocation arrays don't match the
> data orientation.
>
> Cheers, Mike
>
>
> --
> Michael Sumner
> Ordinary Member,  Streets People Love Hobart Association
> Research Software Engineer
> Australian Antarctic Division
> Hobart, Australia
> 0438489030
> e-mail: mdsumner at gmail.com
>
> _______________________________________________
> gdal-dev mailing listgdal-dev at lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> -- http://www.spatialys.com
> My software is free, but my time generally not.
>
>

-- 
Michael Sumner
Ordinary Member,  Streets People Love Hobart Association
Research Software Engineer
Australian Antarctic Division
Hobart, Australia
0438489030
e-mail: mdsumner at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20250704/4e43c3d0/attachment.htm>


More information about the gdal-dev mailing list