WMS and SRS

Daniel Goetz madprof at GMX.CH
Fri Jul 28 04:08:30 EDT 2006


Hi,

thank you Frank, Trond and Ed for your help. I tried to use reporjected coordinates as BBOX-values in my "new" WMS-GetMap-request (SRS=WPSG:4326) and it works now. I got the new reprojected coordinates out of the GetCapabilities document (I took them out of the LatLonBoundingBox paragraph in the GetCapabilities document):

<Layer queryable="1" opaque="0" cascaded="0">
        <Name>VIEW_RWG_TBS</Name>
        <Title>RWG_TM_NR</Title>
        <SRS>EPSG:31468</SRS>
        <SRS>EPSG:4326</SRS>
        <LatLonBoundingBox minx="10.9905" miny="49.3319" maxx="11.2852" maxy="49.5441" />
        <BoundingBox SRS="EPSG:31468"
                    minx="4.42695e+006" miny="5.46647e+006" maxx="4.44806e+006" maxy="5.48982e+006" />
        <Style>
          <Name>default</Name>
          <Title>default</Title>
          <LegendURL width="20" height="10">
             <Format>image/png</Format>
             <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://10.65.112.50/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/WMS/WMS_BRWK.map&amp;version=1.1.1&amp;service=WMS&amp;request=GetLegendGraphic&amp;layer=VIEW_RWG_TBS&amp;format=image/png"/>
          </LegendURL>
        </Style>
    </Layer>


But I have two further questions:

When I do a WMS-GetMap-request in the "new" SRS (EPSG:4326) the map maserver sends back does not vary form the map mapserver generates when sending a GetMap-request in the "original" SRS (EPSG:31468). I mean there is no deformation/distortion noticeable. But when I do a "normal" mapserver mode=browse-request in my simple pan and zoom template and tell mapserver to reproject the data in EPSG:4326 (I do that by putting the PROJECTION-object in the MAP-object of the .map-file to "init=epsg:4326" while the PROJECTION-objects in the LAYER-objects are still in the "origninal" "init=epsg:31468" projection. Of course I  change the EXTENT-parameters in the .map-file too. Am I doing right?) the returned map looks different from the map genereated using the "original" projection. I mean that the reprojected map using mode=browse looks deformed/distorted compared to the "original" not reprojected map.

The question is now: Why do the two maps (the reprojected one I get from the WMS-GetMap-request and the reprojected map I get by a mode=browse request) differ in their appearence (distortion) although I tell mapserver in both cases to reproject the map to "epsg:4326"?

The secoond question is: As mentioned I got the "new" reprojeted coordinates for BBOX-values out of the GetCapabilities document. But is there a program that could do coordinate transformation for me, so that I am able to transform "epsg:31468" coordinates to "epsg:4326" coordinates?


OK, that's it. Thak you again for your helpful hints. And would be very nice of you if you could help me further on with my problems/questions elucidated in this email. Thank you so much.


regards

Daniel


-------- Original-Nachricht --------
Datum: Thu, 27 Jul 2006 09:22:21 -0400
Von: Ed McNierney <ed at TOPOZONE.COM>
An: MAPSERVER-USERS at LISTS.UMN.EDU
Betreff: Re: [UMN_MAPSERVER-USERS] WMS and SRS

> Daniel -
> 
> I think Frank's theory is likely to be correct, and that there is a
> problem with the BBOX coordinates used in your new request.  It sounds like the
> changes you made are fine, although I think it is not necessary to add all
> supported SRS systems to the metadata for each layer - just the MAP-level
> metadata should be all you need to do.
> 
> Can you post the SRS= and BBOX= parameters you are using in your original
> epsg:31468 request and in the new epsg:4326 requests?
> 
> 	- Ed
> 
> Ed McNierney
> President and Chief Mapmaker
> TopoZone.com / Maps a la carte, Inc.
> 73 Princeton Street, Suite 305
> North Chelmsford, MA  01863
> ed at topozone.com
> (978) 251-4242  
> 
> -----Original Message-----
> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
> Behalf Of Daniel Goetz
> Sent: Thursday, July 27, 2006 3:05 AM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-USERS] WMS and SRS
> 
> Hi coummunity,
> 
> I built up a littel WMS-server with umn-mapserver (local installation;
> ms4w 2.1). The "original" projection of the single Layers is alway epsg:31468
> (these are cartesian Gauß-Krüger-coordiantes). So I set the
> PORJECTION-object of each LAYER and in the MAP-object to "init=epsg:31468". In the
> METADATA of the MAP-object as well as in the single LAYER-objects I defined
> "wms_srs" as "EPSG:31468" as well. For testing purpose I did some
> WMS-GetMap-Requests with "SRS=EPSG:31468" and everything went fine.
> 
> But now I want to make my WMS-service more interchangeable, so I want to
> define some more SRSs in that the WMS should be able to be displayed. I want
> to make it possible to "transform" (don't know the exact word in english)
> the WMS from its original Projection to another SRS (e.g. WGS 84;
> EPSG:4326). In my opinion this should be possible by adding another epsg-code to the
> METADATA. So my METADATA (both in the MAP and in the LAYERs-objects) look
> like this: "wms_srs" "EPSG:31468 EPSG:4326".
> 
> But now every time I change the SRS block in my WMS-GetMap-request from
> "SRS=EPSG:31468" to "SRS=EPSG:4326" mapserver returns a blank image. I even
> tried to set the BBOX to latlon-coordinates when using "SRS=EPSG:4326" but
> even this failed. I also testes other SRSs (both geographic ones and real
> projections) but with no success.
> 
> Could anybody please give me some help or hints what to do and what went
> wrong and why did this happen? I would be very glad and thankful. Thank you
> so much.
> 
> 
> regards
> 
> 
> Daniel
> 
> 
> -- 
> 
> 
> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

-- 


Echte DSL-Flatrate dauerhaft für 0,- Euro*. Nur noch kurze Zeit!
"Feel free" mit GMX DSL: http://www.gmx.net/de/go/dsl



More information about the mapserver-users mailing list