<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.Shkpostityyli19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 70.85pt 2.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FI" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Two quick things to try:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">- turn on PROJ_DEBUG
<a href="http://www.mapserver.org/optimization/debugging.html#step-4-turn-on-proj-debug-optional">
http://www.mapserver.org/optimization/debugging.html#step-4-turn-on-proj-debug-optional</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">- edit your epsg file and make some changes to the two first parameters of the +towgs84. That should make your map data to slide in S-N and W-E
 direction once data are reprojected. If this happens you know for sure that the PROJ library that is used is the one you believe.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">If correct PROJ is in use I would then check if there is also errors in the data. Take a sample of data into another projection from WCS and check
 it. It can be that the error is only in the WGS84 bounding box calculation.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">-Jukka Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Christian Braun
<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal">Hello,<o:p></o:p></p>
<div>
<p class="MsoNormal">ok, maybe I was not clear enough in my description.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">There were several changes in the past to EPSG:28992. The first change was to add some towgs parameters, which you could find in my map file, later there was a revision to the ones you are showing in your definition. Between this two towgs
 flags there isn't much difference or almost no difference in a final map. But if you leave out the flags at all, you will get errors in your spatial position of a few hundred meters.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">No matter what I set in the epsg file or in the map file as projection parameter of the source data set, MapServer is calculating in the DescribeCoverage an extent that matches very close the values that would have been given back by the
 old erroneous epsg (the one without towgs flags) definition. You can check that with the online calculator tool quite easily if you try to convert the bounding boxes.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">For me it seems that the projection parameters are read from somewhere else in the system where an old definition is present...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">cheers,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Christian<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">BTW: setting wcs_extent didn't help...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black">------------------------------------------------------------<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span class="apple-style-span"><span style="font-family:"Helvetica","sans-serif";color:black">Christian Braun</span><o:p></o:p></span></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black">R+D Engineer<br>
Environmental Modelling, Geocomputation</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black">Tel: +352- 425991-6608<br>
Mobil: +49-179-6845896<br>
Mail: <a href="mailto:christian.braun@tudor.lu">christian.braun@tudor.lu</a><br>
<br>
Resource Centre for Environmental Technologies,<br>
Public Research Centre Henri Tudor,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black">6A, avenue des Hauts-Fourneaux,<br>
L-4362 Esch-sur-Alzette, Luxembourg<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On 14 May 2014, at 10:49, Rahkonen Jukka (Tike) <<a href="mailto:jukka.rahkonen@mmmtike.fi">jukka.rahkonen@mmmtike.fi</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Both my MS4W with Mapserver 6.3-dev and 6.4 on Linux use these definitions</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"># Amersfoort / RD New</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><28992> +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.417,50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725
 +units=m +no_defs  <></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">You say that they wrong and +towgs84 parameters in your mapfile are correct? If so, then you can update the values into your epsg file that is
 in your PROJ_LIB directory. We seem to have PROJ-4.8.0 on Linux.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I have seen with WMS that supports many projections that extent calculations for different projections are not always reliable. It is more reliable
 if layer extents are given in the layer metadata. Add “wcs_extent” metadata as shown in<span class="apple-converted-space"> </span><a href="http://www.mapserver.org/ogc/wcs_server.html"><span style="color:purple">http://www.mapserver.org/ogc/wcs_server.html</span></a><span class="apple-converted-space"> </span>and
 try if that changes anything.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">-Jukka Rahkonen-</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
</div>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Christian Braun wrote:</span><o:p></o:p></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Dear list members,<br>
<span style="color:#0F61C8"><br>
</span>I just discovered that my MapServer installation is calculating a wrong WGS84BoundingBox tag.<br>
<span style="color:#0F61C8"><br>
</span>I know tha</span>t were issues in the past with the definition of EPSG:28992 in which my data is stored. I was checking all epsg files on the system and als set the config flag for PROJ_LIB in the map file. But it seems that MapServer is still ignoring
 the correct settings for EPSG:28992 and takes the "old" definition without proper proj towgs flags.<br>
<span style="color:#0F61C8"><br>
</span>The services are public and you can find below the links [1] to a DescribeCoverage for the WCS I am refering to. ro_dsm_mini is a small layer which I am using for testing. BBOX in 28992 is the correct one of the data source, the corresponding WGS84BoundingBox
 which is giving back is wrong.<br>
I am using <a href="http://cs2cs.mygeodata.eu/"><span style="color:purple">http://cs2cs.mygeodata.eu</span></a> for checking.<br>
<span style="color:#0F61C8"><br>
</span>I also paste the relevant part of the map file [2].<br>
<span style="color:#0F61C8"><br>
<br>
</span>Any further help is appreciated.<br>
Many thanks in advance,<br>
Christian<br>
<span style="color:#0F61C8"><br>
<br>
</span>[1]<br>
<a href="http://maps.iguess.tudor.lu/cgi-bin/mapserv?map=/srv/mapserv/MapFiles/RO_localOWS_test.map&SERVICE=WCS&VERSION=1.1.0&REQUEST=DescribeCoverage&COVERAGEID=ro_dsm_mini"><span style="color:purple">http://maps.iguess.tudor.lu/cgi-bin/mapserv?map=/srv/mapserv/MapFiles/RO_localOWS_test.map&SERVICE=WCS&VERSION=1.1.0&REQUEST=DescribeCoverage&COVERAGEID=ro_dsm_mini</span></a><br>
<span style="color:#0F61C8"><br>
<br>
</span>[2]<br>
MAP<br>
  NAME "TUDOR_RO_test-environment"<br>
  EXTENT 65956 431299 93267 451459<br>
  SIZE 800 600<br>
  MAXSIZE 50000<br>
  UNITS METERS<br>
  SHAPEPATH "/srv/sampleData/"<br>
  IMAGECOLOR 255 255 255<br>
<span style="color:#0F61C8"><br>
</span>  PROJECTION<br>
    #"+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.237,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812 +units=m +no_defs"<br>
    "init=epsg:28992"<br>
  END<br>
<span style="color:#0F61C8"><br>
</span>  CONFIG PROJ_LIB "/usr/share/proj/"<br>
 <br>
  LAYER # -----------------------------------------------------------------<br>
    NAME "ro_dsm_mini"<br>
    TYPE RASTER<br>
    STATUS ON<br>
    DATA "ro_dsm_mini.tiff"<br>
    <br>
    #PROCESSING "SCALE=AUTO"<br>
    <br>
    PROJECTION<br>
      "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.237,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812 +units=m +no_defs"  # the projection of the source data set<br>
      #"init=epsg:28992"<br>
    END<br>
<span style="color:#0F61C8"><br>
</span>    METADATA<br>
      "ows_title" "DSM subset"<br>
      "ows_abstract" "This a test data set of Rotterdams DSM subset"<br>
<span style="color:#0F61C8"><br>
</span>      "wms_include_items" "value_0"<br>
      "wms_value_0_alias" "Height"<br>
<span style="color:#0F61C8"><br>
</span>      "wcs_label"           "ro_dsm_mini"  ### required<br>
      "wcs_rangeset_name"   "Range 1"  ### required to support DescribeCoverage request<br>
      "wcs_rangeset_label"  "My Label" ### required to support DescribeCoverage request<br>
      "wcs_formats" "img"<br>
    END<o:p></o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif""> </span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif""> </span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif"">------------------------------------------------------------</span><o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><span class="apple-style-span"><span style="font-family:"Helvetica","sans-serif"">Christian Braun</span></span><o:p></o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif"">R+D Engineer<br>
Environmental Modelling, Geocomputation</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif""> </span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif"">Tel: +352- 425991-6608<br>
Mobil: +49-179-6845896<br>
Mail: <a href="mailto:christian.braun@tudor.lu"><span style="color:purple">christian.braun@tudor.lu</span></a><br>
<br>
Resource Centre for Environmental Technologies,<br>
Public Research Centre Henri Tudor,</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif"">6A, avenue des Hauts-Fourneaux,<br>
L-4362 Esch-sur-Alzette, Luxembourg</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>