Hi,

I was mainly curious without any exact need at the moment. I just noticed that 
gdal2xyz.py can create xyz files with more bands than just one for z but I also 
had a feeling that GDAL cannot read such files directly back, which appeared to 
be true.

Generally speaking there might be some use cases for a multiband plain text 
format. I am remembering that some user on the Geoserver users mailing list a 
few months ago was after such a format. Use case was to query pixel values from 
a WCS service. Requesting a single pixel GeoTIFF makes things unnecessary 
difficult for such simple need.

-Jukka Rahkonen-

Lähettäjä: Hare, Trent M <th...@usgs.gov>
Lähetetty: keskiviikko 6. tammikuuta 2021 17.52
Vastaanottaja: Rahkonen Jukka (MML) <jukka.rahko...@maanmittauslaitos.fi>
Aihe: Re: [EXTERNAL] Re: [gdal-dev] How to read multi-band xyz files?

Jukka,
  I'm not sure I understand exactly what you want but I have this old script 
which might help.

This is old enough it might need some minor updates for Python 3.
https://github.com/USGS-Astrogeology/GDAL_scripts/tree/master/gdal2AsciiLatLonBands

-Trent
________________________________
From: gdal-dev 
<gdal-dev-boun...@lists.osgeo.org<mailto:gdal-dev-boun...@lists.osgeo.org>> on 
behalf of Even Rouault 
<even.roua...@spatialys.com<mailto:even.roua...@spatialys.com>>
Sent: Wednesday, January 6, 2021 3:58 AM
To: gdal-dev@lists.osgeo.org<mailto:gdal-dev@lists.osgeo.org> 
<gdal-dev@lists.osgeo.org<mailto:gdal-dev@lists.osgeo.org>>
Cc: Rahkonen Jukka (MML) 
<jukka.rahko...@maanmittauslaitos.fi<mailto:jukka.rahko...@maanmittauslaitos.fi>>
Subject: [EXTERNAL] Re: [gdal-dev] How to read multi-band xyz files?



 This email has been received from outside of DOI - Use caution before clicking 
on links, opening attachments, or responding.



> Is there any way to get all the bands?

Not directly.
You could add a header line with the appropriate column names, by making the Z
column to point to a different column each time.

Even

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

Reply via email to