<div dir="ltr"><br>
</div><div dir="ltr"><br>
</div><div dir="ltr"><br>
</div><div dir="ltr"><br>
</div><div dir="ltr">发自我的小米</div><div class="wps_quotion">在 2023年10月19日 下午9:56,Andrew Harfoot via MapServer-users <mapserver-users@lists.osgeo.org>写道:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <div class="moz-cite-prefix">I should have added that the behaviour
      is the same if the template file is configured as an OUTPUTFORMAT.<br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">On 19/10/2023 14:50, Andrew Harfoot via
      MapServer-users wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:1de4aa62-7c43-48ed-b57c-57493933fc97@geodata.soton.ac.uk">
      
      <div style="padding-bottom: 10px; padding-top: 5px;">
        <div style="padding:12px; border:1px solid #8D3970; background-color:#F7F9FA; color:#8D3970; font-size:14px; line-height:22px; font-family: Calibri, Arial, Helvetica, sans-serif;">
          <strong>CAUTION:</strong> This e-mail originated outside the
          University of Southampton.
        </div>
      </div>
      <div>
        <p>Hi list,</p>
        <p>I am setting up a WMS server using Mapserver 7.6.2 and want
          to return a html response to a GetFeatureInfo request where
          the response contains the coordinates of the GFI click. The
          WMS supports multiple coordinate systems, so ideally I'd like
          to have the coordinates in a CRS that I can predetermine.</p>
        <p>I have a test template file as follows:</p>
        <pre><!-- MapServer Template --> 
<p>
Map X/Y : [mapx],[mapy]<br>
Map LL : [maplon],[maplat]
</p></pre>
        <p>If I configure an 'old style' TEMPLATE in the map file,
          directly referencing the html template as follows:</p>
        <pre>LAYER
  TEMPLATE "coord_comp.html"</pre>
        <p>With a GFI request specifying a CRS of EPSG:27700:</p>
        <pre>...&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo
  &BBOX=379766.9556955648586154,58602.32640402266406454,405538.15569556411355734,94300.79913129436317831
  &CRS=EPSG:27700&WIDTH=649&HEIGHT=899&LAYERS=test&STYLES=&FORMAT=image/jpeg&QUERY_LAYERS=test
  &INFO_FORMAT=text/html&I=268&J=647&FEATURE_COUNT=50
</pre>
        <p>the output of is as follows:<br>
        </p>
        <p>Map X/Y : 390428.846605,68589.162768<br>
          Map LL : 50.516415,-2.135015</p>
        <p>When a similar requests are made specifying a CRS of
          EPSG:4326:</p>
        <pre>...&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo
  &BBOX=50.33460688675980776,-2.28814701603231718,50.84060858090575863,-1.92285769511938809
  &CRS=EPSG:4326&WIDTH=649&HEIGHT=899&LAYERS=test&STYLES=&FORMAT=image/jpeg&QUERY_LAYERS=test
  &INFO_FORMAT=text/html&I=298&J=579&FEATURE_COUNT=50
</pre>
        <p>the output is as follows:</p>
        <p>Map X/Y : 50.514437,-2.120136<br>
          Map LL : [maplon],[maplat]</p>
        <p>The maplat and maplon templates are not substituted.</p>
        <p>Mapserver has been compiled with PROJ support and a
          PROJECTION has been defined for the layer in the map file.</p>
        <p>The CRS of the source data is EPSG:27700</p>
        <p>I was hoping that the maplat and maplon templates would
          provide me with a consistent source of coordinate information,
          independent of the request CRS. Can anybody shed any light on
          the observed behaviour?
          <br>
        </p>
        Thanks,<br>
        <p>Andy<br>
        </p>
        <pre class="moz-signature" cols="72">-- 
Andy Harfoot

Skype: gdi_ajph
Teams: <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:ajph@soton.ac.uk">ajph@soton.ac.uk</a>
Phone: +44 2380 590566

GeoData Institute
University of Southampton
Southampton
SO17 1BJ

<a class="moz-txt-link-abbreviated" href="http://www.geodata.soton.ac.uk">www.geodata.soton.ac.uk</a></pre>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre">_______________________________________________
MapServer-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:MapServer-users@lists.osgeo.org">MapServer-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</pre>
    </blockquote>
    <p><br>
    </p>
    <pre class="moz-signature" cols="72">-- 
Andy Harfoot

Skype: gdi_ajph
Teams: <a class="moz-txt-link-abbreviated" href="mailto:ajph@soton.ac.uk">ajph@soton.ac.uk</a>
Phone: +44 2380 590566

GeoData Institute
University of Southampton
Southampton
SO17 1BJ

<a class="moz-txt-link-abbreviated" href="http://www.geodata.soton.ac.uk">www.geodata.soton.ac.uk</a></pre>
  </body>
</html>

</blockquote></div>