<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Chris,<br>
    <br>
    &nbsp; If you have a current version of Mapserver (v5,v6?), then should
    be GDAL compiled in.&nbsp; The GDAL library needs to find projection
    definition files so I usually include the following in all my map
    files:<br>
    <br>
    &nbsp;&nbsp;&nbsp; CONFIG "PROJ_LIB" "\ms4w\proj\nad"<br>
    &nbsp;&nbsp;&nbsp; CONFIG "GDAL_DATA" "\ms4w\gdaldata"<br>
    <br>
    Another potential problem you may be having&nbsp; is with EPSG:900913.&nbsp;
    It is not included in GDAL/PROJ's epsg file so I add the following
    to \ms4w\proj\nad\epsg:<br>
    <br>
    &lt;900913&gt; +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0
    +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs&nbsp;
    &lt;&gt;<br>
    <pre class="moz-signature" cols="72">Best Regards,
Brent Fraser</pre>
    <br>
    On 9/2/2011 9:16 AM, Chris Jackson wrote:
    <blockquote
cite="mid:CACU1gf7u5o+8wqnp6GDEnfm5zwA6m6gSaanKwuanxvoDxjcgyA@mail.gmail.com"
      type="cite">Hi Brent<br>
      <br>
      Thanks for the quick answers, the new rewriting rules (with
      reverse proxy) have worked well with Tomcat on port 8080 - no more
      isapi dlls!&nbsp; What you listed for Mapnik is essentially like mine,
      what I am not sure is what other GDAL configuration is needed on
      the box - just an environment variable or some other setting in
      the mapfile...?<br>
      <br>
      Thanks<br>
      <br>
      Chris<br>
      <br>
      <div class="gmail_quote">On 2 September 2011 16:04, Brent Fraser <span
          dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:bfraser@geoanalytic.com">bfraser@geoanalytic.com</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex;">
          <div bgcolor="#FFFFFF" text="#000000"> Chris,<br>
            <br>
            &nbsp; I've used the Iconic Rewriter with older versions of IIS
            (the native rewriting capability in IIS7 looks
            interesting).&nbsp; You may be able to use an environment
            variable to set the default map file, but this may not be
            very useful if you have multiple map files.&nbsp; There are a few
            other options for hiding the mapfile (proxy script,
            redirect, form post instead of get, etc), put I think the
            rewrite method is the most effective (the client never gets
            the map file path), with almost no performance hit.<br>
            <br>
            &nbsp; The way I access Mapnik tiles in mapserver is to create a
            layer in the map file:<br>
            <br>
            LAYER<br>
            &nbsp;&nbsp;&nbsp; DATA "frmt_wms_openstreetmap_MAPNIK.xml"<br>
            &nbsp;&nbsp;&nbsp; NAME "Mapnik"<br>
            &nbsp;&nbsp;&nbsp; PROJECTION<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "proj=merc" "a=6378137" "b=6378137" "lat_ts=0.0"
            "lon_0=0.0" "x_0=0.0" "y_0=0" "k=1.0" "units=m"
            "nadgrids=@null" "no_defs"<br>
            &nbsp;&nbsp;&nbsp; END<br>
            &nbsp;&nbsp;&nbsp; STATUS ON<br>
            &nbsp;&nbsp;&nbsp; TYPE RASTER<br>
            &nbsp;&nbsp;&nbsp; PROCESSING "OVERSAMPLE_RATIO=1"<br>
            &nbsp;&nbsp;&nbsp; PROCESSING "LOAD_FULL_RES_IMAGE=NO"<br>
            &nbsp;&nbsp;&nbsp; UNITS METERS<br>
            END # LAYER<br>
            <br>
            and frmt_wms_openstreetmap_MAPNIK.xml XML file of <br>
            <div class="im"> <br>
              &lt;GDAL_WMS&gt;<br>
              &nbsp;&nbsp;&nbsp; &lt;Service name="TMS"&gt;<br>
              &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
              &lt;ServerUrl&gt;<a moz-do-not-send="true"
                href="http://tile.openstreetmap.org/$" target="_blank">http://tile.openstreetmap.org/$</a>{z}/${x}/${y}.png&lt;/ServerUrl&gt;<br>
              &nbsp;&nbsp;&nbsp; &lt;/Service&gt;<br>
              &nbsp;&nbsp;&nbsp; &lt;DataWindow&gt;<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;UpperLeftX&gt;-20037508.34&lt;/UpperLeftX&gt;<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;UpperLeftY&gt;20037508.34&lt;/UpperLeftY&gt;<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;LowerRightX&gt;20037508.34&lt;/LowerRightX&gt;<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              &lt;LowerRightY&gt;-20037508.34&lt;/LowerRightY&gt;<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;TileLevel&gt;19&lt;/TileLevel&gt;<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;TileCountX&gt;1&lt;/TileCountX&gt;<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;TileCountY&gt;1&lt;/TileCountY&gt;<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;YOrigin&gt;top&lt;/YOrigin&gt;<br>
              &nbsp;&nbsp;&nbsp; &lt;/DataWindow&gt;<br>
              &nbsp;&nbsp;&nbsp; &lt;Projection&gt;EPSG:900913&lt;/Projection&gt;<br>
              &nbsp;&nbsp;&nbsp; &lt;BlockSizeX&gt;256&lt;/BlockSizeX&gt;<br>
              &nbsp;&nbsp;&nbsp; &lt;BlockSizeY&gt;256&lt;/BlockSizeY&gt;<br>
              &nbsp;&nbsp;&nbsp; &lt;BandsCount&gt;3&lt;/BandsCount&gt;<br>
              &nbsp;&nbsp;&nbsp; &lt;Cache /&gt;<br>
              &lt;/GDAL_WMS&gt;<br>
              <br>
              <br>
            </div>
            <pre cols="72">Best Regards,
Brent Fraser</pre>
            <div>
              <div class="h5"> <br>
                On 9/2/2011 8:13 AM, Chris Jackson wrote: </div>
            </div>
            <blockquote type="cite">
              <div>
                <div class="h5">Hi<br>
                  <br>
                  I just wanted to check if the only way to parse a
                  mapfile in an IIS environment to use an absolute path
                  to the mapfiles e.g. <a moz-do-not-send="true"
                    href="http://myserver/cgi-bin/mapserv.exe?map=C"
                    target="_blank">http://myserver/cgi-bin/mapserv.exe?map=C</a>:\Inetpub\wwwroot\workshop\itasca.map.&nbsp;

                  I wonder if anyone has had success with rewrite rules
                  (IIS7)?<br>
                  <br>
                  Also how is GDAL triggered when calling the mapfile
                  (in IIS).&nbsp; The scenario is I am trying to use an xml
                  in the mapfile layer which then calls <a
                    moz-do-not-send="true"
                    href="http://tile.openstreetmap.org/"
                    target="_blank">http://tile.openstreetmap.org/</a><br>
                  <br>
                  The XML is<br>
                  <br>
                  &lt;GDAL_WMS&gt;<br>
                  &lt;Service name="TMS"&gt;<br>
                  &lt;ServerUrl&gt;<a moz-do-not-send="true"
                    href="http://tile.openstreetmap.org/$%7Bz%7D/$%7Bx%7D/$%7By%7D.png"
                    target="_blank">http://tile.openstreetmap.org/${z}/${x}/${y}.png</a>&lt;/ServerUrl&gt;<br>
                  &lt;/Service&gt;<br>
                  &lt;DataWindow&gt;<br>
                  &lt;UpperLeftX&gt;-20037508.34&lt;/UpperLeftX&gt;<br>
                  &lt;UpperLeftY&gt;20037508.34&lt;/UpperLeftY&gt;<br>
                  &lt;LowerRightX&gt;20037508.34&lt;/LowerRightX&gt;<br>
                  &lt;LowerRightY&gt;-20037508.34&lt;/LowerRightY&gt;<br>
                  &lt;TileLevel&gt;19&lt;/TileLevel&gt;<br>
                  &lt;TileCountX&gt;1&lt;/TileCountX&gt;<br>
                  &lt;TileCountY&gt;1&lt;/TileCountY&gt;<br>
                  &lt;YOrigin&gt;top&lt;/YOrigin&gt;<br>
                  &lt;/DataWindow&gt;<br>
                  &lt;Projection&gt;EPSG:900913&lt;/Projection&gt;<br>
                  &lt;BlockSizeX&gt;256&lt;/BlockSizeX&gt;<br>
                  &lt;BlockSizeY&gt;256&lt;/BlockSizeY&gt;<br>
                  &lt;BandsCount&gt;3&lt;/BandsCount&gt;<br>
                  &lt;Cache/&gt;<br>
                  &lt;/GDAL_WMS&gt;<br>
                  <br>
                  Am I remotely doing this the right way?&nbsp; I am used to
                  calling local data from the mapfile and tiled services
                  is a bit of a new beast, so I thought I would give it
                  a go!<br>
                  <br>
                  Many thanks in advance<br>
                  <br>
                  Chris<br>
                  <br>
                  <fieldset></fieldset>
                  <br>
                </div>
              </div>
              <pre>_______________________________________________
mapserver-users mailing list
<a moz-do-not-send="true" href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a>
<a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</pre>
            </blockquote>
          </div>
        </blockquote>
      </div>
      <br>
    </blockquote>
  </body>
</html>