<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: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=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.gmailsignatureprefix
        {mso-style-name:gmail_signature_prefix;}
span.Shkpostityyli21
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-ligatures:none;
        mso-fareast-language:EN-US;}
@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" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Before version 8.0 it was possible, see the â€œfeature” example in
<a href="https://mapserver.org/cgi/controls.html">https://mapserver.org/cgi/controls.html</a>. The rendering part still works
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><a href="https://mapserver.org/input/vector/inline.html"><span lang="EN-US">https://mapserver.org/input/vector/inline.html</span></a></span><span style="mso-fareast-language:EN-US">
<span lang="EN-US">but user cannot inject the feature. If Mapserver does not support SLD with inline features like Geoserver
<a href="https://docs.geoserver.org/main/en/user/styling/sld/reference/layers.html#sld-reference-inlinefeature">
https://docs.geoserver.org/main/en/user/styling/sld/reference/layers.html#sld-reference-inlinefeature</a> nothing else than the SQL substitution comes into my mind. It should work also with GeoPackage and SpatiaLite layers. Maybe even with Oracle and MS SQL
 Server.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">-Jukka Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>Lähettäjä:</b> MapServer-users <mapserver-users-bounces@lists.osgeo.org>
<b>Puolesta </b>Steve Lime via MapServer-users<br>
<b>Lähetetty:</b> keskiviikko 16. lokakuuta 2024 17.28<br>
<b>Vastaanottaja:</b> Ahmet Temiz <ahmettemiz88@gmail.com><br>
<b>Kopio:</b> mapserver-users <mapserver-users@lists.osgeo.org><br>
<b>Aihe:</b> Re: [MapServer-users] create a polygon via a URL<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">With 8.2, the only way I can think of would be use PostGIS something like:<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">LAYER<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  NAME 'mylayer'<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  CONNECTIONTYPE POSTGIS<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  DATA "shape FROM (SELECT ST_GeomFromText('%geometry%') AS shape)"<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  VALIDATION<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">    'geometry' 'a regex for valid WKT'<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  END<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  ...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">END<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">You'd have to be very careful with the regex to validate the WKT but this might work. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">This makes me wonder if adding some context-sensitive escaping capabilities to the runtime substitution could be a nice enhancement.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">--Steve<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, Oct 8, 2024 at 11:54 AM Ahmet Temiz via MapServer-users <<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt">Hi<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt">Can I create a polygon using the Well-Known Text (WKT) format via a URL in this way ?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt">```<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt"><a href="http://%3cyour-mapserver-url%3e/cgi-bin/mapserv?map=%3cpath-to-your-mapfile%3e&mode=edit&layers=%3clayer-name%3e&geometry=POLYGON((500000">http://<your-mapserver-url>/cgi-bin/mapserv?map=<path-to-your-mapfile>&mode=edit&layers=<layer-name>&geometry=POLYGON((500000</a>
 1000000, 510000 1000000, 510000 1010000, 500000 1010000, 500000 1000000))&....<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt">```<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt">kind regards<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><span class="gmailsignatureprefix">-- </span><o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Ahmet Temiz<br>
Jeoloji Müh.<br>
Afet ve Acil Durum Yönetimi BaÅŸkanlığı<br>
Deprem  Dairesi BaÅŸkanlığı<br>
<br>
<br>
________________________<br>
<br>
Ahmet Temiz<br>
Geological Eng.<br>
<br>
Disaster and Emergency Management<br>
of Presidency<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
MapServer-users mailing list<br>
<a href="mailto:MapServer-users@lists.osgeo.org" target="_blank">MapServer-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</body>
</html>