buffer around vector features

Steve Lime steve.lime at DNR.STATE.MN.US
Thu Dec 15 07:08:43 PST 2005


There is another option depending on what you need. If all you are after is a result set of features within 500 meters of another feature (point or polygon) then you can just use the LAYER TOLERANCE property of the features to be selected to do this. 

For example, point or polygon selection feature against this layer:

LAYER
  NAME 'to_be_selected'
  ...
  TOLERANCE 500
  TOLERANCEUNITS METERS
END

will get you all features within 500 meters of the selection feature. The effect is the same as creating the buffer but no new feature is actually constructed. You can do this with the CGI or via MapScript.

Steve 

>>> "Lowell.Filak" <lfilak at MEDINACO.ORG> 12/15/05 7:06 AM >>>
william paul writes: 

> Hello:
>    
>   It is possible to create buffer around a vector feature? and use the buffer to select the features insight the buffer?
>    
>   Does someone have a working example?
>    
>   Thank you in advance

William, 

You can do all of that with SWIG MapScript except select "within", it only 
does a "passthru" method.
I can dig up a sample if you are interested in using MapScript. 

Lowell 



More information about the MapServer-users mailing list