I'm running a geoserver (2.5.x) with 1 raster file (GeoTIFF) as a layer. From my application I can access a single pixel value when clicked (through WMS), but what I'm really interested in is to get a range of pixels and then do some processing on that. The way I was thinking of doing it was to create a control with MOD_CTRL as trigger and then when dragging ended, to pass the selected range to geoserver so that I can get a list of pixel values back.

    OpenLayers.Util.extend(control, {
      draw: function () {
          this.drag = new OpenLayers.Handler.Box( control,
              {"done": this.notice},
              {keyMask: OpenLayers.Handler.MOD_CTRL});

      notice: function (bounds) {
        leftBottom = map.getLonLatFromPixel(new OpenLayers.Pixel(bounds.left, bounds.bottom)); 
        rightTop = map.getLonLatFromPixel(new OpenLayers.Pixel(bounds.right, bounds.top));
        console.log(leftBottom, rightTop);

The problem I'm facing is that I can't seem to find a way to pass the "range" (leftBottom,rightTop) to the geoserver - only a single pixel. The leftBottom and rightTop works fine, but how do I get back the list of pixel values?

This function seems to make the call but I'm not sure which service or parameters to use...

 function makeCall(bounds) {

   var url = sec.getFullRequestString({
                                          REQUEST: "GetFeature",
                                          SERVICE: "WFS", //should this be WPS?
                                          EXCEPTIONS: "application/vnd.ogc.se_xml",
                                          typeNames: 'mystore:mylayer',
                                          BBOX: bounds.toBBOX(),
                                          INFO_FORMAT: 'text/plain',
                                          QUERY_LAYERS: layerlist,
                                          FEATURE_COUNT: 50,
                                          WIDTH: map.size.w,
                                          HEIGHT: map.size.h,
                                          format: 'image/png',

    var request = OpenLayers.Request.GET({
      url: url,
      callback: extractFeatures

closed as off-topic by PolyGeo Nov 28 '17 at 12:59

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This problem cannot or can no longer be reproduced. Changes to the system or to the asker's circumstances may have rendered the question obsolete, or the question does not include a procedure to enable potential answerers to reproduce the same symptoms. Such questions are off-topic as they are unlikely to help future readers, but editing them to include more details can lead to re-opening." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

  • maybe you could use WCS? – Ian Turton Oct 15 '14 at 12:06
  • I have tried that using WCS but I get an error: <ows:Exception exceptionCode="NoApplicableCode">↵ <ows:ExceptionText>java.lang.NullPointerException↵null</ows:ExceptionText> – Loki Oct 16 '14 at 12:43
  • looks like you made a bad request - without seeing what you sent its hard to tell. – Ian Turton Oct 16 '14 at 12:44
  • localhost:8080/geoserver/… – Loki Oct 16 '14 at 12:47
  • the describecoverage works and gives me back the valid data – Loki Oct 16 '14 at 12:48