2

I host some raster data on geoserver and want to access all pixel values within a given area (e.g. a geojson polygon). I can access single pixel values via WMS GetFeatureInfo but this approach is limited to a single point, not areas.

WCS seems to work for area requests but the available operations don't serve the purpose of retrieving values.

Is there a way to run a WMS/WFS/WCS like request for raster data using an area as request?

Are cql filters a way to go?

  • 3
    What is wrong with the wcs requests? That's what it is for – Ian Turton Feb 22 '17 at 18:30
  • 1
    Sunsetting requests with WCS is the way to go if want actual values from rasters – nmtoken Feb 22 '17 at 23:37
  • Ok, I'll have a look at WCS again. I suspect you mean the GetCoverage operation? (I misunderstood the description, that's why I didn't consider it. thanks for pointing it out). – unnic Feb 23 '17 at 8:42
  • I can't find any examples where WCS is used in such a way. The documentation isn't much help either: docs.geoserver.org/stable/en/user/services/wcs/…. Can you maybe provide an example? – unnic Feb 23 '17 at 9:18
3

WCS is the way to go, maybe you mean that you cannot read the output from its binary form? Try using the GML version then, this is an example request returning a 2x2 grid of values in GML format:

http://demo.geo-solutions.it/geoserver/wcs?service=WCS&version=2.0.0&request=GetCoverage&coverageId=nurc:Arc_Sample&format=application/gml%2Bxml&subset=Lat(40,41)&subset=Long(40,41)

For more information about the protocol, see the official spec documents: http://www.opengeospatial.org/standards/wcs

and in particular the KVP one: https://portal.opengeospatial.org/files/09-147r3

  • Thanks for your answer. The format isn't the problem (yet, I need to read it in JavaScript later). I can't find any good documentation/examples on how I can run a WCS request in the way I described it above. E.g: how does the subset work? How can I subset with multiple points or a geojson? – unnic Feb 23 '17 at 9:13
  • 1
    No, you cannot perform extractions by polygon or set of points, only by bounding box. No OGC protocol supports out of the box what you want to do, but you can write a new WPS process to create support for it (java coding required) – Andrea Aime Feb 23 '17 at 9:23
  • ok, then I have to find another way. If you have any hints how I could go about this let me know. Thanks for your help – unnic Feb 23 '17 at 10:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.