Hi,

Before version 8.0 it was possible, see the “feature” example in 
https://mapserver.org/cgi/controls.html. The rendering part still works
https://mapserver.org/input/vector/inline.html but user cannot inject the 
feature. If Mapserver does not support SLD with inline features like Geoserver 
https://docs.geoserver.org/main/en/user/styling/sld/reference/layers.html#sld-reference-inlinefeature
 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.

-Jukka Rahkonen-


Lähettäjä: MapServer-users <[email protected]> Puolesta 
Steve Lime via MapServer-users
Lähetetty: keskiviikko 16. lokakuuta 2024 17.28
Vastaanottaja: Ahmet Temiz <[email protected]>
Kopio: mapserver-users <[email protected]>
Aihe: Re: [MapServer-users] create a polygon via a URL

With 8.2, the only way I can think of would be use PostGIS something like:

LAYER
  NAME 'mylayer'
  CONNECTIONTYPE POSTGIS
  DATA "shape FROM (SELECT ST_GeomFromText('%geometry%') AS shape)"
  VALIDATION
    'geometry' 'a regex for valid WKT'
  END
  ...
END

You'd have to be very careful with the regex to validate the WKT but this might 
work.

This makes me wonder if adding some context-sensitive escaping capabilities to 
the runtime substitution could be a nice enhancement.

--Steve

On Tue, Oct 8, 2024 at 11:54 AM Ahmet Temiz via MapServer-users 
<[email protected]<mailto:[email protected]>> wrote:
Hi

Can I create a polygon using the Well-Known Text (WKT) format via a URL in this 
way ?
```
http://<your-mapserver-url>/cgi-bin/mapserv?map=<path-to-your-mapfile>&mode=edit&layers=<layer-name>&geometry=POLYGON((500000<http://%3cyour-mapserver-url%3e/cgi-bin/mapserv?map=%3cpath-to-your-mapfile%3e&mode=edit&layers=%3clayer-name%3e&geometry=POLYGON((500000>
 1000000, 510000 1000000, 510000 1010000, 500000 1010000, 500000 1000000))&....
```
kind regards

--
Ahmet Temiz
Jeoloji Müh.
Afet ve Acil Durum Yönetimi Başkanlığı
Deprem  Dairesi Başkanlığı


________________________

Ahmet Temiz
Geological Eng.

Disaster and Emergency Management
of Presidency
_______________________________________________
MapServer-users mailing list
[email protected]<mailto:[email protected]>
https://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
MapServer-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to