Hi,

It is not up to the format of the source data but the limitation of the output 
format. Format text/plain means the ESRI ASCII grid format and it support only 
one band 
https://web.archive.org/web/20150128024528/http://docs.codehaus.org/display/GEOTOOLS/ArcInfo+ASCII+Grid+format<https://web.archive.org/web/20150128024528/http:/docs.codehaus.org/display/GEOTOOLS/ArcInfo+ASCII+Grid+format>.
But if I understand your wish even that format is not what you want because is 
does not return x, y, value triplets but a few header lines and then data as an 
array:

NCOLS 50
NROWS 50
XLLCORNER 496000.0
YLLCORNER 7181000.0
CELLSIZE 4.0
NODATA_VALUE 0.0
131.49600219726562 131.2989959716797 131.58399963378906 131.95599365234375 ...

If you want data in a format that contains pixel values of many bands in a 
single text file you can use output format application/gml+xml but that is not 
what you expect either. You can test is yourself with the default data_dir of 
Geoserver.

http://localhost:8080/geoserver/ows?service=WCS&version=2.0.1&request=GetCoverage&coverageid=nurc__mosaic&format=application/gml%2Bxml

If I understood right you would like to get data as text and organized like

x_coord,y_coord,value_band1,value_band3,value_band4

As I said, I have never seen such a format but it is simple and certainly 
doable if you just find a developer to do it for you. It should be implemented 
in GeoTools if you want it as a direct output from WCS, or it could be some 
process that takes data from WCS and feeds it into WPS (Web Processing 
Service), or it could be external script made with Python or something that 
reads the GeoTIFF output and outputs text. Or the script could read the GML 
output and then it would not need to know how to handle pixel data of TIFF but 
it needs to be able to parse XML.

-Jukka Rahkonen-

Lähettäjä: Erick Opiyo <[email protected]>
Lähetetty: tiistai 24. maaliskuuta 2020 9.03
Vastaanottaja: Rahkonen Jukka (MML) <[email protected]>
Kopio: GeoServer Users <[email protected]>
Aihe: Re: [Geoserver-users] WCS rangesubset with bands

Hi Jukka,

I'm using a multiband GeoTiff (GTiff), which I uploaded to Geoserver and 
interested in getting x,y coordinates, pixel values using WCS.

There is an option to retrieve pixel value of specified bands separated by 
commas, for the rangesubset element. What I'm not sure of, is if it support 
several bands with text/plain as an output format

I expected to get an output like an array, but the element rangesubset always 
returns a single value for the first band provided and not the rest.

Is there another input format, geoserver extension or output format that I 
should use? I have tried specifying rangesubset several times, but I get an 
error (shown below) that text/plain output format does support arrays.

[image.png]
Regards
Erick

On Mon, Mar 23, 2020 at 4:37 PM Rahkonen Jukka (MML) 
<[email protected]<mailto:[email protected]>>
 wrote:
Hi,

Why not GeoTIFF?  I do not know of any multi-band text format even extending 
simple XYZ format like https://gdal.org/drivers/raster/xyz.html#raster-xyz for 
more bands should be simple. Obviously the large size of such files pays so 
much that developers have been happy to use more complex but more compact file 
formats for storing the data and then use corresponding libraries for reading 
the data.

-Jukka Rahkonen-

Lähettäjä: Erick Opiyo <[email protected]<mailto:[email protected]>>
Lähetetty: maanantai 23. maaliskuuta 2020 13.37
Vastaanottaja: GeoServer Users 
<[email protected]<mailto:[email protected]>>
Aihe: [Geoserver-users] WCS rangesubset with bands

Hi All,

Following tutorial from Geosolutions
https://geoserver.geo-solutions.it/edu/en/wcs/get.html#getting-specific-bands

One should be able to access a subset of data from a multiband GTiff image 
using element rangesubset, specifying the bands to be returned, separated by 
commas as follows:

http://localhost:8080/geoserver/ows?service=WCS&version=2.0.1&request=GetCoverage&coverageId=default__rain&subset=Lat(-0.361648)&subset=Long(35.289658)&format=text/plain&rangesubset=Band2,Band3,Band4

I want my output format as text/plain

However, I'm only able to access the first Band2 pixel values provided by Lat 
long and not Band3 and Band4. Which output format should I use to get all the 
bands value?

Regards
Erick




_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to