[mapserver-users] Mapserver WCS - how to return native pixel resolution data?
Roger André
randre at gmail.com
Thu Mar 19 11:36:01 PDT 2009
Hi Alexander,
Thanks for the response. Yes, I am using a GetCoverage request that
looks like this:
http://localhost/cgi-bin/mapserv?map=/var/www/mapfiles/netCDF/netcdf.map
&SERVICE=wcs
&VERSION=1.0.0
&REQUEST=GetCoverage
&COVERAGE=elev
&CRS=EPSG:4326
&BBOX=125,50,130,55
&WIDTH=600
&HEIGHT=600
&FORMAT=image/grid
The source is a single-band image, and the data is correctly returned
as either a single-band GeoTIFF, or an ASCII Grid, depending on which
FORMAT I specify in the WCS string.
What I would like to do is eliminate the WIDTH and HEIGHT parameters
from the request, and just return whatever is available in the BBOX
area. When I remove them from the request, I get an error that says I
either need HEIGHT and WIDTH, or RESX and RESY. When I restructure
the command to include RESX and RESY (see below), I get an "Out of
memory" error.
http://localhost/cgi-bin/mapserv?map=/var/www/mapfiles/netCDF/netcdf.map
&SERVICE=wcs
&VERSION=1.0.0
&REQUEST=GetCoverage
&COVERAGE=elev
&CRS=EPSG:4326
&BBOX=125,50,130,55
&FORMAT=image/grid
&RESX=.033&RESY=-.033
I believe I should be able to use the pixel dimensions that are
reported back to me in a DescribeCoverage request, which show them to
be:
<gml:offsetVector>0.033333333333333 0</gml:offsetVector>
<gml:offsetVector>0 -0.033333333333333</gml:offsetVector>
Thanks for the help,
Roger
--
On Wed, Mar 18, 2009 at 6:51 PM, Alexander Petkov <greenkov at gmail.com> wrote:
> On 3/18/09, Roger André <randre at gmail.com> wrote:
>> Hi All,
>>
>> I have a question which I'm not sure relates to the structure of a WCS
>> request, or the setup of my WCS server. I have a tileset of SRTM
>> tiles that I would like to query by geographic region via WCS. I have
>> basic functionality working, but I can't figure out how to make a
>> request via BBOX that only returns the actual pixels that are present
>> in the source data. Is this possible? I would think that as long as
>> I specified the matching SRS, I should be able to, but I've gotten
>> stuck.
>
> Are you using a WCS getcoverage request to get the data? Is the source
> file a 1 band image? Is the returned data contaiining 3 bands? A
> little more information will be of help to give a good answer.
>
> You are working in the right direction by configuring your WCS to
> serve the actual data.
>
> In my case, I have 1 band palletted images, and with a getcoverage
> request for a bounding box I got the values, but as a grayscale
> image. With some help from another user I managed to add the colormap
> info from the class directives in my map file.
>
> The following output format is what worked to add a pallette to the
> returned image:
> OUTPUTFORMAT
> NAME "GTIFF"
> MIMETYPE "image/tiff"
> DRIVER "GDAL/GTiff"
> EXTENSION "tif"
> IMAGEMODE "PC256"
> TRANSPARENT TRUE
> FORMATOPTION "COMPRESS=DEFLATE"
> FORMATOPTION "ZLEVEL=9"
> END
>
More information about the MapServer-users
mailing list