[gdal-dev] [EXTERNAL] Re: How to read multi-band xyz files?

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Thu Jan 7 02:39:27 PST 2021


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 <thare at usgs.gov>
Lähetetty: keskiviikko 6. tammikuuta 2021 17.52
Vastaanottaja: Rahkonen Jukka (MML) <jukka.rahkonen at 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-bounces at lists.osgeo.org<mailto:gdal-dev-bounces at lists.osgeo.org>> on behalf of Even Rouault <even.rouault at spatialys.com<mailto:even.rouault at spatialys.com>>
Sent: Wednesday, January 6, 2021 3:58 AM
To: gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org> <gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>>
Cc: Rahkonen Jukka (MML) <jukka.rahkonen at maanmittauslaitos.fi<mailto:jukka.rahkonen at 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210107/1ff7083f/attachment.html>


More information about the gdal-dev mailing list