File Exchange

image thumbnail

bufferm2

version 1.4 (90.8 KB) by

Creates a buffer zone around or inside a polygon or polygons

24 Downloads

Updated

Create a buffer around a polygon in Matlab

Comments and Ratings (5)

Kelly Kearney

Kelly Kearney (view profile)

@Randike Vithanage,
That error implies that Matlab is trying to call the built in function_handle function, not the new one included with this code. Please make sure the new function_handle function is on your path.

Hi,

Nice work. However, I keep on getting below error when I try to use the tool with Cartesian coordinates.

Error using function_handle
Too many output arguments.

Error in bufferm2 (line 182)
vectorsToGPC = function_handle(v2gpcpath);

Error in Main_Prog_1 (line 154)
[xb,yb] = bufferm2('xy',xr,yr,1,'in')

will you be help to solve this ?

Jaroslaw

After some modifications works perfect with GK4 :)

Jaroslaw

Doesn't work with GK-coordinates (Cartesian). My output polygon is the same as input.

Pavan

Pavan (view profile)

Works flawlessly. Thanks for modifying the code to read Cartesian co-ordinates.

Updates

1.4

Linked to GitHub repository

1.3

Fixed a bug in input checks so input can be either row or column vectors. Also updates internal plot checks to plot in cartesian coordinates so can be used to check both geographic and x-y input.

1.1

Added ability to work in cartesian coordinates rather than geographic space; updated description and example on webpage.

MATLAB Release
MATLAB 7.4 (R2007a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video