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

Bakker, Anton Anton.Bakker at kadaster.nl
Thu May 7 05:21:16 PDT 2020


Hi Jukka,

I finally managed to check up on your suggestion. I set the RESAMPLE mode to NEAREST in the mapfile on a MapServer instance running locally on my machine. This results in the same response as setting the resampling method in the url (see my previous email) :

http://localhost:32788/ahn3/wcs?service=WCS&Request=GetCoverage&version=2.0.1&CoverageId=ahn3_05m_dsm&format=image/tiff&subset=x(196396.75,196396.75)&subset=y(450031.75,450031.75)

<?xml version="1.0" encoding="UTF-8"?>
<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0.1" xml:lang="en-US" xsi:schemaLocation="http://www.opengis.net/ows/2.0 https://geodata.nationaalgeoregister.nl/ows/2.0/owsExceptionReport.xsd<http://www.opengis.net/ows/2.0%20https:/geodata.nationaalgeoregister.nl/ows/2.0/owsExceptionReport.xsd>">
  <ows:Exception exceptionCode="">
    <ows:ExceptionText>msImageCreate(): Image handling error. Attempt to allocate raw image failed, out of memory.</ows:ExceptionText>
  </ows:Exception>
</ows:ExceptionReport>

Also all resampling methods result in the same response (tested by supplying through the query parameter in the url). When  I look in the logs I see that MapServer determines the dimensions of the request to be 0x0 pixels, causing the creation of the image to fail:

2020-05-06 17:38:11: (mod_fastcgi.c.421) FastCGI-stderr: Subset for X-axis found: x
2020-05-06 17:38:11: (mod_fastcgi.c.421) FastCGI-stderr: Subset for Y-axis found: y
2020-05-06 17:38:11: (mod_fastcgi.c.421) FastCGI-stderr: msWCSGetCoverage20(): Set parameters from originaldata. Width: 0, height: 0, cellsize: -nan, extent: -nan,-nan,-nan,-nan
2020-05-06 17:38:11: (mod_fastcgi.c.421) FastCGI-stderr: msImageCreate(): Image handling error. Attempt to allocate raw image failed, out of memory.

​I also quickly checked whether requesting a 1x1 subset works, but this fails by returning geotiff image of 1x1 pixel with a pixel size of "-135000,162500":
http://localhost:32788/ahn3/wcs?service=WCS&Request=GetCoverage&version=2.0.1&CoverageId=ahn3_05m_dsm&format=image/tiff&subset=x(196396.75,196397.25)&subset=y(450031.75,450032.25)

However requesting an image of 2x2 pixels still works as expected:
http://localhost:32788/ahn3/wcs?service=WCS&Request=GetCoverage&version=2.0.1&CoverageId=ahn3_05m_dsm&format=image/tiff&subset=x(196396.75,196397.75)&subset=y(450031.75,450032.75)

Kind regards,
Anton

________________________________
From: Rahkonen Jukka (MML) <jukka.rahkonen at maanmittauslaitos.fi<mailto:jukka.rahkonen at maanmittauslaitos.fi>>
Sent: Tuesday, April 7, 2020 5:49 PM
To: Bakker, Anton <Anton.Bakker at kadaster.nl<mailto:Anton.Bakker at kadaster.nl>>; mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org> <mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>>
Subject: Re: WCS GetCoverage request one by one pixel


Hi Anton,



What I meant was to have a try by commenting out this line from your mapfile

    PROCESSING "RESAMPLE=BILINEAR"



Actually it would be interesting to know what really happens if the interpolation/resampling method is configured in the mapfile and GetCoverage comes also with Interpolation parameter.



-Jukka-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20200507/d1deb494/attachment-0001.html>


More information about the mapserver-users mailing list