[mapserver-users] Wrong about cgi feature parameter

Lime, Steve D (MNIT) steve.lime at state.mn.us
Tue Aug 1 08:50:21 PDT 2017


Hi Ahmet: MapServer doesn’t handle GeoJSON within a feature object. However, it does handle WKT so I imagine you can convert from a polygon in OpenLayer to WKT and pass that. See http://mapserver.org/mapfile/feature.html for more information on the MapServer side…

Steve

From: Ahmet Temiz [mailto:ahmettemiz88 at gmail.com]
Sent: Tuesday, August 01, 2017 3:50 AM
To: Lime, Steve D (MNIT) <steve.lime at state.mn.us>
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Wrong about cgi feature parameter

Thank you Steve for your detailed help.

Actually I intended to create polygon using OpenLayers, then sending coordinates
to mapserver as feature object. I am going to use this polygon feature as a mask
to crop related portion of raster map.
It was OK for simple rectangle polygon. Now, I am looking for a way for complex polygon which has so many points.

Do you have any idea about whether I can assign a GeoJSON object for a feature in URL request ?

Regards


On Mon, Jul 31, 2017 at 10:41 PM, Lime, Steve D (MNIT) <steve.lime at state.mn.us<mailto:steve.lime at state.mn.us>> wrote:
I was able to get something very similar working, albeit via a straight MapServer CGI call – didn’t try WMS. I noticed in your example you reference two layers poor and polf, is that intended?

Request:
  http://maps1.dnr.state.mn.us/cgi-bin/mapserv72?map=/usr/local/mapserver/apps/test/temiz/test.map&mode=map&layer=polf&map_layer[polf]=FEATURE+POINTS+3559569+5042506+END+END<http://maps1.dnr.state.mn.us/cgi-bin/mapserv72?map=/usr/local/mapserver/apps/test/temiz/test.map&mode=map&layer=polf&map_layer%5bpolf%5d=FEATURE+POINTS+3559569+5042506+END+END>

Mapfile:
MAP
  NAME 'ahmet temiz test mapfile'
  EXTENT 2857613.741389 4274927.875099 4989229.633477 5176940.449967
  SIZE 400 300

  SYMBOL
    NAME 'circle'
    TYPE ELLIPSE
    POINTS 1 1 END
    FILLED TRUE
  END

  LAYER
    NAME 'polf'
    TYPE POINT
    STATUS OFF
    CLASS
      STYLE COLOR 255 0 0 SYMBOL 'circle' SIZE 10 END
    END
  END
END

--Steve

From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org<mailto:mapserver-users-bounces at lists.osgeo.org>] On Behalf Of Ahmet Temiz
Sent: Friday, July 28, 2017 11:12 PM
To: mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
Subject: [mapserver-users] Wrong about cgi feature parameter

Hi,
I want to create a feature dynamically for point layer.
But,What am I doing wrong ? It must be about feature parameter. But I was not able to solve it.
This request generates nothing.

curl --trace -i -g -X GET -H "Content-Type: image/png" "http://localhost/cgi-bin/mapserv?map=/var/www/ms_map/slptrRGB3857.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&Layers=poor &map_layer[polf]=FEATURE+POINTS+3559569+5042506+END+END&STYLES=&SRS=EPSG:3857&BBOX=2857613.741389,4274927.875099,4989229.633477,5176940.449967&WIDTH=400&HEIGHT=300&FORMAT=image/png" > out.png

If you can help, I will appreciate.
regards
--
Ahmet Temiz
Jeoloji Müh.
Afet ve Acil Durum Yönetimi Başkanlığı
Bilgi İşlem  Dairesi Başkanlığı-CBS Grubu


________________________

Ahmet Temiz
Geological Eng.
Information Systems - GIS Group
Disaster and Emergency Management
of Presidency



--
Ahmet Temiz
Jeoloji Müh.
Afet ve Acil Durum Yönetimi Başkanlığı
Bilgi İşlem  Dairesi Başkanlığı-CBS Grubu


________________________

Ahmet Temiz
Geological Eng.
Information Systems - GIS Group
Disaster and Emergency Management
of Presidency
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20170801/748f3ed0/attachment.htm>


More information about the MapServer-users mailing list