How to do a buffer with CGI command

Steve Lime Steve.Lime at DNR.STATE.MN.US
Tue May 2 15:01:43 EDT 2006


You achieve this by setting the tolerance value on the layers to be searched.

So, to find every lake within 50 miles of a mouse click you'd set up the lakes
layer like so:

LAYER
  NAME 'lakes'
  ...
  TEMPLATE 'foo.html' # must have a template to be queryable
  TOLERANCEUNITS MILES
  TOLERANCE 50
END

Now, if you want to do that sort of thing based on an existing feature then you
need to use the various feature query modes. For example, if you want to find
all lakes within 50 miles of a park with id = 501 then a URL like this would work:

.../mapserv.exe?map=foo.map&mode=featureitemquery&slayer=parks&qlayer=lakes&qitem=id&qstring=501

In this case the query is done on the parks layer 1st and then the resulting feature
is used to query lakes.

Hope this helps...

Steve

BTW This is a topic that belongs on the user mailing list.

>>> Lisbeth Mavárez Sandoval <lisbeth.mavarez at KIBERNO.COM> 4/28/2006 4:20:11 PM >>>
Hi Steve,

Thanks for your answer.

I don't know how to do the buffer-like queries with the CGI.

Could you give an example?

I have been trying to do it, but I'm not sure if it is working
correctly. This is my URL:

http://myserver/cgi-bin/mapserv.exe?map=C:\mypath\mymap.map&mode=ITEMQUE 
RYMAP&MAPXY=66.86
10.49&BUFFER=100&MAPEXT=shape&qlayer=mylayer&qitem=id&qstring=501

Could you check it?

Thanks,

Lisbeth Mavárez
Maracaibo - Venezuela


-----Mensaje original-----
De: UMN MapServer Developers List [mailto:MAPSERVER-DEV at LISTS.UMN.EDU] 
En nombre de Steve Lime
Enviado el: Jueves, 27 de Abril de 2006 11:31 p.m.
Para: MAPSERVER-DEV at LISTS.UMN.EDU 
Asunto: Re: [UMN_MAPSERVER-DEV] How to do a buffer with CGI command

Hi there: The bad news is that you can't do a buffer from the CGI. There
is no processing directive for vector data like there is for raster.
However, you can do buffers from within MapScript. So if that's a
feature you really need (you can do buffer-like queries with the CGI),
that is, drawing a buffered feature then you must use MapScript.

Steve

>>> Lisbeth Mavárez Sandoval <lisbeth.mavarez at KIBERNO.COM> 04/27/06 3:26
PM >>>
Hi,

I´m just learning about MapServer. I´m not understand how to do a buffer
in URL of CGI command.

Could somebody help me please?

Very thanks,

Lisbeth Mavárez
Maracaibo - Venezuela



More information about the mapserver-dev mailing list