[mapserver-users] WCS GetCoverage request one by one pixel

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Mon May 11 04:02:50 PDT 2020


Hi,

I verified the error and I am pretty sure that subsetting with min=max has been working for me couple of years ago with some Mapserver version.

This sends a GeoTIFF:
http://localhost:8060/cgi-bin/mapserv.exe?map=c:\ms4w_data\raster_test.map&service=WCS&version=2.0.1&request=GetCoverage&CoverageID=natural_earth&SUBSET=long(27,28)&SUBSET=lat(62,63)

This sends an error:
http://localhost:8060/cgi-bin/mapserv.exe?map=c:\ms4w_data\raster_test.map&service=WCS&version=2.0.1&request=GetCoverage&CoverageID=natural_earth&SUBSET=long(27,27)&SUBSET=lat(62,62)
msImageCreate(): Image handling error. Attempt to allocate raw image failed, out of memory.

I believe that 1x1 pixel image is expected because WCS 2.0.1 standard defines that the request is OK.

"Then, for the trim bounds trimLow and trimHigh the following
shall hold: L <= trimLow <= trimHigh <= H"

Here is my MS4W mapfile for the Natural Earth raster https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/50m/raster/NE1_50M_SR_W.zip<https://www.naturalearthdata.com/http/www.naturalearthdata.com/download/50m/raster/NE1_50M_SR_W.zip>

MAP
  NAME ""
  STATUS ON
MAXSIZE 5000
CONFIG "MS_ERRORFILE" "c:\ms4w_data\test_error.txt"
#DEBUG 3
EXTENT -180 -90 180 90
  SIZE 600 600
  #SHAPEPATH "c:\ms4w\tmp\ms_tmp"
  IMAGECOLOR 255 255 255
  UNITS METERS
  WEB
    #IMAGEPATH "c:\ms4w\tmp\ms_tmp"
    #IMAGEURL "c:\ms4w\tmp\ms_tmp"
      METADATA
      "ows_enable_request" "*"
      "wms_srs"    "EPSG:4326"
      "ows_onlineresource"    "http://localhost:8060/cgi-bin/mapserv.exe?map=c:\ms4w_data\test.map"
      "wms_title"    "wms-test"
      "wcs_label"           "wcs-test" ### required
      "wcs_description"     "wcs-test"
      "wcs_enable_request"           "*"
     END
  END
    PROJECTION
    "init=epsg:4326"
  END
  OUTPUTFORMAT
      NAME 'AGG_Q'
      MIMETYPE "image/png"      DRIVER "AGG/PNG"
      EXTENSION "png"
      IMAGEMODE RGB
      FORMATOPTION "QUANTIZE_FORCE=ON"
      FORMATOPTION "QUANTIZE_DITHER=OFF"
      FORMATOPTION "QUANTIZE_COLORS=256"
  END
OUTPUTFORMAT
  NAME GEOTIFF
  DRIVER "GDAL/GTiff"
  MIMETYPE "image/tiff"
  IMAGEMODE BYTE
  EXTENSION "tif"
END

LAYER
NAME "natural_earth"
TYPE RASTER
STATUS ON
DATA "c:\ms4w_data\ne_raster\NE1_50M_SR_W.tif"
PROJECTION
"init=epsg:4326"
END
METADATA
      "wms_title" "ne_raster"
      "wcs_title" "ne_raster"
END

END #layer
END #map


Lähettäjä: mapserver-users <mapserver-users-bounces at lists.osgeo.org> Puolesta Even Rouault
Lähetetty: lauantai 9. toukokuuta 2020 21.41
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: Re: [mapserver-users] WCS GetCoverage request one by one pixel


Anton,



> I quickly skimmed the issue tracker on Github but could not find any issue

> causing this problem. Any thoughts on the cause of the problem are highly

> appreciated.



I believe this is a bug in MapServer due to a difference between pixel-center vs pixel-corner convention between WCS conventions and MapServer conventions, which must lead to an empty bounding box when the request is 1x1, and thus causing invalid resolution to be computed at some point (division by zero). This could presumably be fixed



Even



--

Spatialys - Geospatial professional services

http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20200511/5d4b13c7/attachment.html>


More information about the mapserver-users mailing list