[mapserver-users] WCS Tile index question

Carl Godkin cgodkin at gmail.com
Wed Oct 20 13:19:12 PDT 2021


On Tue, Oct 19, 2021 at 5:37 PM Rahkonen Jukka (MML) <
jukka.rahkonen at maanmittauslaitos.fi> wrote:

> Hi,
>
>
>
> Here is more accurate documentation but only in the text
> https://www.mapserver.org/ogc/wcs_server.html
>
>
>
> “The convention is that once (wcs|ows)_extent and one of (wcs|ows)_size
> and (wcs|ows)_resolution is set in the layer metadata, all the coverage
> specific metadata will be retrieved from there. Otherwise the source image
> is queried via GDAL, if possible.”
>
>
>
> It seems that only wcs_extent is documented in the list of metadata
> elements but this is what they do:
>
>    - wcs_extent defines the bounding box or your coverage -> that will go
>    into DescribeCoverage
>    - wcs_size is the size of the coverage as pixels -> pixel size can be
>    computed by extent and size
>    - wcs_resolution tells the pixel size explicitly -> size of the
>    coverage in pixels can be computed
>
> Thanks a lot, Jukka.  That all makes some sense as far as it goes, but I'm
still not clear on a few details.  I have this range of data: 24N to 50N
and 125W to 66W which is 26 degrees by 59 degrees.

Since the SRTM data has 3 arc-second spacing, that's 1200 pixels per degree
plus one for the extra edge so I have tried a number of things without
success.

1. Is wcs_size the size FULL range of the tiles that I have?  And what is
the order?
2. Again, what is the order for wcs_resolution?  Are the units degrees
since the coordinate system of the original data is EPSG:4326?

I've tried all of these, one at a time, and get various errors.  (1 / 1200
= 0.00083333...)

        #"wcs_resolution" "0.00083333 0.00083333"
        #"wcs_size" "70801 31201"
        "wcs_size" "31201 70801"

In case it's helpful, here's my LAYER definition (with probably extra
things I've tried based on my searching and trial & error):

    LAYER
      NAME SRTM_3_arc-second_grid
      METADATA
        "wcs_label"           "SRTM - 3 arc-second grid"  ### required
        "wcs_rangeset_name"   "Range 1"  ### required to support
DescribeCoverage request
        "wcs_rangeset_label"  "Lower 48" ### required to support
DescribeCoverage request
        "ows_extent" "-125 24 -66 50"
        #"wcs_resolution" "0.00083333 0.00083333" # 1/1200 for 3" spacing?
        #"wcs_size" "70801 31201" # Not sure of order
        "wcs_size" "31201 70801"
        "wcs_bandcount" "1"
        "wcs_native_format" "SRTMHGT" # What should this be? I can't find
examples...
        "wcs_srs" "EPSG:4326"
      END

      TYPE RASTER ### required
      STATUS ON
      TILEINDEX "../srtm_3_hgt/srtm_3_hgt-index.shp" # Path is relative to
SHAPEPATH
      TILEITEM "Location"
      PROJECTION
        "init=epsg:4326"
      END
    END
I feel like I must be close. Thanks a lot for any further pointers,

carl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20211020/3fc1d351/attachment.html>


More information about the MapServer-users mailing list