[mapserver-users] WCS reprojection issue

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Sat Jun 4 00:46:07 EDT 2011


Hi,

You can start with these two projection settings:

Map level projection: The default output projection of your service. For making everything to work as expected the EXTENT must be edited also so that it gives the output in the units of the output projection. For example EXTENT -83.938  34.746  -81.340  36.361 makes a pretty small window as meters. 

Layer level projection: The projection of the source data.

After editing the projection values continue systematically. Read the GetCapabilities and DescribeCoverage outputs carefully and look if they make sense. Have a try with a browser and GetCoverage for seeing that you can get something out. When you continue to ArcGIS have a look at the Apache access.log and see how do the requests sent by ArcMAP look like. If there are still problems, sending the GetCoverages created by ArcMAP will make is much easier for us to find out what is going wrong.

-Jukka Rahkonen-


-----Alkuperäinen viesti-----
Lähettäjä: Mark Phillips [mailto:mbp at geomtech.com]
Lähetetty: pe 3.6.2011 18:14
Vastaanottaja: Rahkonen Jukka
Kopio: mapserver-users at lists.osgeo.org
Aihe: Re: [mapserver-users] WCS reprojection issue
 
> Thanks for your suggestion; I will try this.

> My end goal, however, is to set up a MapServer WCS that can be consumed by
> ArcMap.   This project is for a client that uses ArcMap, and it's not an
> option for me to tell them to use something else.  So, although writing WCS
> queries by hand for testing might be instructive, as far as I know there is
> no way for me to customize the queries that ArcMap generates --- the service
> itself needs to be set up so that it will just work in ArcMap.

> Any ideas on how to do that?  Are there any known compatibility issues with
> ArcMap?  Should I force ArcMap to use a specific WCS version?  (I've been
> telling it to use version 1.0.0 so far.)

--Mark

> On Fri, Jun 3, 2011 at 10:26 AM, Rahkonen Jukka
<Jukka.Rahkonen at mmmtike.fi>wrote:

>> Hi,
>
>> Response_crs exists for letting user to select the output CRS. Have you
>> tried it yet?
>> There are better possibilities for a success and especially for
>> understanding what is really happening if you write WCS requests by hand and
>> semd them with a browser instead of using a GIS client.  Request examples at
>> http://mapserver.org/ogc/wcs_server.html are good to start with.
>
> -Jukka Rahkonen-
>
>
> -----Alkuperäinen viesti-----
> Lähettäjä: mapserver-users-bounces at lists.osgeo.org puolesta: Mark Phillips
> Lähetetty: to 2.6.2011 22:16
> Vastaanottaja: mapserver-users at lists.osgeo.org
> Aihe: [mapserver-users] WCS reprojection issue
>
> Hi,
>
> I'm struggling with an issue related to projections in a MapServer WCS
> service.  I've got a raster data file that is in EPSG:2163, and I'd like to
> serve it via WCS in EPSG:4326.  The only way I have managed to get this to
> work is to reproject the data manually in advance and then reference the
> ESPG:4326 copy of the data in my mapfile.  When I do that, with the mapfile
> below, the service seems to work beautifully. What I really want, though,
> is
> to be able to leave my data in its original projection and have MapServer
> reproject on the fly.
>
> When I change the mapfile to use the original ESPG:2163 copy of the data,
> and update the relevant projections in the mapfile from 4326 to 2163,
> though, the service breaks, in the sense that the data shows up in (very
> much) the wrong place.  I first tried just changing the
> projections commented in the mapfile below with ###LAYER_PROJECTION and
> ###LAYER_WCS_SRS from 4326 to 2163 (after changing the DATA line in the
> layer to point to the EPSG:2163 copy of the data, of course), but that
> didn't work.  I then experimented with changing the ###SERVICE_WCS_SRS line
> and/or the ###MAP_PROJECTION as well, but no luck.
>
> What is especially confusing is that I *can* get this to work for a WMS
> service.  In the case of WMS, MapServer seems quite happy to serve
> EPSG:2163
> data in ESPG:4326, as long as the ###LAYER_PROJECTION and ###LAYER_WCS_SRS
> lines say EPSG:2163 (with "wcs" replaced by "wms", of course).
>
> I'm sure that part of my problem is that I don't completely understand the
> purpose served by each of the various projections specified in the mapfile.
>  Can someone offer some insight into what the correct approach is to
> getting
> MapServer to reproject on the fly in a WCS?
>
> In case it matters: I'm using MapServer 6.0, and am testing the WCS with
> ArcMap 9.3.
>
> Thanks!
>
> --Mark
>
> Here is my working mapfile for ESPG:4326:
>
>    MAP
>      NAME       lucky
>      STATUS     ON
>      SIZE       600 400
>      EXTENT     -83.938  34.746  -81.340  36.361
>      IMAGECOLOR 255 255 255
>
>      WEB
>        METADATA
>          "ows_enable_request"     "*"
>          "wcs_label"              "My WCS Service"
>          "wcs_srs"                "EPSG:4326"   ###SERVICE_WCS_SRS
>        END
>      END
>
>      PROJECTION
>       "init=epsg:4326"  ###MAP_PROJECTION
>      END
>
>      LAYER
> NAME     mylayer
>        TYPE     RASTER
> DUMP     TRUE
>        STATUS   OFF
> DATA     sampledata_wgs84/tif_wgs84.tif
>        INCLUDE  "colormap.cmap"
>        PROJECTION
>          "init=epsg:4326"   ###LAYER_PROJECTION
>        END
>        METADATA
>          "wcs_srs"                    "EPSG:4326"  ###LAYER_WCS_SRS
>          "wcs_label"                  "My Layer"
>          "wcs_rangeset_name"          "My Range"
>          "wcs_rangeset_label"         "My Label"
>        END
>      END
>    END
>
>





More information about the mapserver-users mailing list