<div dir="ltr"><div>Dear all, thanks :)</div><div><br></div><div>Carlo Ruiz,</div><div><br></div><div>> <a href="http://mapserver.org/input/vector/kml.html" target="_blank" style="font-size:13px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif">http://mapserver.org/input/<wbr>vector/kml.html</a></div><div><br></div><div>Actually, in my case, the input should be shapefile and the outputs gtiff,png and kml.</div><div><br></div><div><a href="http://mapserver.org/output/kml_output.html">http://mapserver.org/output/kml_output.html</a><br></div><div><br></div><div><br></div><div><br></div>Jukka Rahkonen, <div><br></div><div>> I used version 1.3.0 so that the response will open into the browser automatically.</div><div><br></div><div>Great! I changed to v 1.3.0 too</div><div><br></div><div>this is my new url request:</div><div><br></div><div><a href="http://172.17.0.2/?map=/maps/dengue-Rio-de-Janeiro.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=RIO_DE_JANEIRO&STYLES=&CRS=CRS:84&BBOX=-43.7965385309,-23.0828926973,-43.0990394004,-22.7460202858&WIDTH=400&HEIGHT=300&FORMAT=kml">http://172.17.0.2/?map=/maps/dengue-Rio-de-Janeiro.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=RIO_DE_JANEIRO&STYLES=&CRS=CRS:84&BBOX=-43.7965385309,-23.0828926973,-43.0990394004,-22.7460202858&WIDTH=400&HEIGHT=300&FORMAT=kml</a></div><div><div><br></div><div>> Do you have KML in the list?</div><div><br></div><div>yes. Full GetCapabilities xml here: <a href="https://pastebin.com/z2myYc5m">https://pastebin.com/z2myYc5m</a></div><div><br></div><div>> Did you just guess or is there somewhere wrong documentation about metadata item you have tried # "wms_format" "image/png")</div><div><br></div><div>I saw it at some page ... but I think I haven't seen any difference (I don't remember so well) .. so I commented this option.</div><div><br></div><div>> However, you must explicitly add KML into WMS outputformats in the metadata. It seems that you have played with it because you have this line commented out:</div><div><br></div><div>OK .. I added `wms_getmap_formatlist` parameter. I also added `wms_formatlist` to metadata layer</div><div><br></div><div>I also change SRS=EPSG:4326 to CRS=CRS:84</div><div><br></div></div><div><br></div><div><br></div><div>Seth,</div><div><br></div><div>> Ivan's problem looks to be a projection issue only.</div><div><br></div><div>I also added crs:84 .. but the result is the same .. </div><div><br></div><div>KML by specification uses only a single projection, EPSG:4326 (<a href="http://www.gdal.org/drv_kml.html">http://www.gdal.org/drv_kml.html</a>)<br></div><div><br></div><div>My shapefile is defined as epsg:4326 too </div><div><br></div><div>The png output works fine ... maybe something in kml conversion is doing wrong ...  </div><div><br></div><div><br></div><div>The log about kml request is here: <a href="https://pastebin.com/iP4h0wXx">https://pastebin.com/iP4h0wXx</a></div><div><br></div><div><br></div><div><br></div><div>Ivan Ogasawara</div><span class="gmail-im"><span style="font-size:12.8px"></span></span></div><div class="gmail_extra"><br><div class="gmail_quote">2017-12-14 10:08 GMT-04:00 Rahkonen Jukka (MML) <span dir="ltr"><<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi" target="_blank">jukka.rahkonen@maanmittauslaitos.fi</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="FI" link="blue" vlink="purple">
<div class="m_8179221624438053008WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Geoservers have KML output enabled by default so you can have a try with clients.  Test-URL<br>
<br>
<a href="http://demo.geo-solutions.it/geoserver/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=1373&HEIGHT=840&LAYERS=topp%3Astates&TRANSPARENT=TRUE&FORMAT=application/vnd.google-earth.kml+xml&BBOX=-124.731422,19.49461526802622,-66.969849,54.83308673197378&SRS=EPSG:4326&STYLES" target="_blank">http://demo.geo-solutions.it/<wbr>geoserver/wms?REQUEST=GetMap&<wbr>SERVICE=WMS&VERSION=1.1.1&<wbr>WIDTH=1373&HEIGHT=840&LAYERS=<wbr>topp%3Astates&TRANSPARENT=<wbr>TRUE&FORMAT=application/vnd.<wbr>google-earth.kml+xml&BBOX=-<wbr>124.731422,19.49461526802622,-<wbr>66.969849,54.83308673197378&<wbr>SRS=EPSG:4326&STYLES</a>=<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">WMS 1.3.0 does not say anything about GetMap formats, just that they must appear in GetCapabilities, and all formats that
 appear in GetCapabilities must also be usable.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">-Jukka Rahkonen-<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Lähettäjä:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Seth G [mailto:<a href="mailto:sethg@geographika.co.uk" target="_blank">sethg@geographika.co.<wbr>uk</a>]
<br>
<b>Lähetetty:</b> 14. joulukuuta 2017 14:56<br>
<b>Vastaanottaja:</b> Rahkonen Jukka (MML) <<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi" target="_blank">jukka.rahkonen@<wbr>maanmittauslaitos.fi</a>>; <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.<wbr>org</a></span></p><div><div class="h5"><br>
<b>Aihe:</b> Re: [mapserver-users] mapserver with kml<u></u><u></u></div></div><p></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Interesting!<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">From the WMS spec: "Graphic element formats include Scalable Vector Graphics (SVG; MIME type “image/svg+xml”) or Web Computer Graphics Metafile (WebCGM; MIME type “image/cgm;Version=4;<wbr>ProfileId=WebCGM”) formats"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I wonder how many WMS clients would handle KML as a WMS. As it is XML then it would't be accessible from another domain in a web client. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Ivan's problem looks to be a projection issue only.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Seth<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div id="m_8179221624438053008sig62266145">
<div>
<p class="MsoNormal">--<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">web:<a href="http://geographika.co.uk" target="_blank">http://geographika.co.uk</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">twitter: @geographika<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">On Thu, Dec 14, 2017, at 10:42 AM, Rahkonen Jukka (MML) wrote:<u></u><u></u></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Hi Seth,</span></span><u></u><u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span></span><u></u><u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">KML is considered as an image format and it should work with WMS and with mode=map
<a href="http://mapserver.gis.umn.edu/fr/development/rfc/ms-rfc-58.html" target="_blank">http://mapserver.gis.umn.edu/<wbr>fr/development/rfc/ms-rfc-58.<wbr>html</a></span></span><u></u><u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span></span><u></u><u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">It seems that KML output has not been developed much since the initial implementation.</span></span><u></u><u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span></span><u></u><u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">-Jukka Rahkonen-</span></span><u></u><u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span></span><u></u><u></u></p>
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm;border-right-width:initial;border-bottom-width:initial;border-left-width:initial;border-right-color:initial;border-bottom-color:initial;border-left-color:initial">
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Lähettäjä:</span></b></span><span class="m_8179221624438053008size"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> mapserver-users
 [<a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mailto:mapserver-users-<wbr>bounces@lists.osgeo.org</a>]
<b>Puolesta </b>Seth G</span></span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><br>
<span class="m_8179221624438053008size"><b>Lähetetty:</b> 14. joulukuuta 2017 10:03</span><br>
<span class="m_8179221624438053008size"><b>Vastaanottaja:</b> <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">
mapserver-users@lists.osgeo.<wbr>org</a></span><br>
<span class="m_8179221624438053008size"><b>Aihe:</b> Re: [mapserver-users] mapserver with kml</span></span><u></u><u></u></p>
</div>
</div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"> </span><u></u><u></u></p>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">Hi,</span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"> </span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">Your output image looks like a projection issue. Google Maps use the espg:3857 projection, but your request is asking for SRS=epsg:4326, maybe try changing this?</span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">Also are you trying to return KML or display an image using KML as a data source? If you are trying to return KML you'd need to use WFS rather than WMS which only returns images.</span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"> </span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">Seth</span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"> </span><u></u><u></u></p>
</div>
<div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">--</span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">web:<a href="http://geographika.co.uk" target="_blank">http://geographika.co.uk</a></span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">twitter: @geographika</span><u></u><u></u></p>
</div>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"> </span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"> </span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">On Thu, Dec 14, 2017, at 01:33 AM, Ivan Ogasawara wrote:</span><u></u><u></u></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<div>
<div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"> </span><u></u><u></u></p>
</div>
<div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">Dear all,</span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"> </span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">Anyone knows some tutorial to work with mapserver (wms) and kml?</span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"> </span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">I am trying to do it .. but with no success.</span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"> </span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">this is the local url used:</span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"> </span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"><a href="http://172.17.0.2/?map=/maps/dengue-Rio-de-Janeiro.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=RIO_DE_JANEIRO&STYLES=&SRS=epsg:4326&BBOX=-43.7965385309,-23.0828926973,-43.0990394004,-22.7460202858&WIDTH=400&HEIGHT=300&FORMAT=kml.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=RIO_DE_JANEIRO&STYLES=&SRS=epsg:4326&BBOX=-43.7965385309,-23.0828926973,-43.0990394004,-22.7460202858&WIDTH=400&HEIGHT=300&FORMAT=kml" target="_blank">http://172.17.0.2/?map=/maps/<wbr>dengue-Rio-de-Janeiro.map&<wbr>SERVICE=WMS&VERSION=1.1.1&<wbr>REQUEST=GetMap&LAYERS=RIO_DE_<wbr>JANEIRO&STYLES=&SRS=epsg:4326&<wbr>BBOX=-43.7965385309,-23.<wbr>0828926973,-43.0990394004,-22.<wbr>7460202858&WIDTH=400&HEIGHT=<wbr>300&FORMAT=kml.map&SERVICE=<wbr>WMS&VERSION=1.1.1&REQUEST=<wbr>GetMap&LAYERS=RIO_DE_JANEIRO&<wbr>STYLES=&SRS=epsg:4326&BBOX=-<wbr>43.7965385309,-23.0828926973,-<wbr>43.0990394004,-22.7460202858&<wbr>WIDTH=400&HEIGHT=300&FORMAT=<wbr>kml</a></span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"> </span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">for image/png works fine (tested with leaflet).</span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"> </span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">Any tips?</span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"> </span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"> </span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">Files:</span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">* mapfiles:</span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">  * <a href="https://pastebin.com/4EkahMZi" target="_blank">https://pastebin.com/<wbr>4EkahMZi</a></span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">  * <a href="https://pastebin.com/DVSt4mmS" target="_blank">https://pastebin.com/<wbr>DVSt4mmS</a></span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">* kml: <a href="https://pastebin.com/LYkD4ZDL" target="_blank">https://pastebin.com/<wbr>LYkD4ZDL</a></span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">* Result: <a href="https://user-images.githubusercontent.com/5209757/33969313-f7029096-e042-11e7-8621-e8235f0bd5ce.png" target="_blank">https://user-images.<wbr>githubusercontent.com/5209757/<wbr>33969313-f7029096-e042-11e7-<wbr>8621-e8235f0bd5ce.png</a></span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"> </span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"> </span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">Thanks!</span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"> </span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">My best regards,</span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">Ivan</span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"> </span><u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"><u>______________________________<wbr>_________________</u></span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size">mapserver-users mailing list</span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"><a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.<wbr>org</a></span><u></u><u></u></p>
</div>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/mapserver-<wbr>users</a></span><u></u><u></u></p>
</div>
</blockquote>
<div>
<p style="margin:0cm;margin-bottom:.0001pt"><span class="m_8179221624438053008size"> </span><u></u><u></u></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>

<br>______________________________<wbr>_________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.<wbr>org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/mapserver-<wbr>users</a><br></blockquote></div><br></div>