Mapping Toolbox    
bufferm

Compute buffer zones for vector data.

Syntax

Description

[latb,lonb] = bufferm(lat,lon,dist,direction) computes the buffer zone around a polygon. A buffer zone for a closed polygon is defined as the locus of points that are a certain distance in or out of the polygon. A buffer zone for an open polygon is the locus of points a certain distance out from the polygon. The polygon is specified as vectors of latitude and longitude in units of degrees. The distance is a scalar specified in degrees of arc along the surface. Valid direction strings are 'in' and 'out'. The result is returned as NaN-clipped vectors in units of degrees.

[latb,lonb] = bufferm(lat,lon,dist,direction,npts) controls the number of points used to construct circles about the vertices of the polygon. A larger number of points produces smoother buffers, but requires more time. If omitted, 13 points per circle are used.

[latb,lonb] = bufferm(lat,lon,dist,direction,npts,outputformat) controls the format of the returned buffer zones. Outputformat 'vector' returns NaN- clipped vectors. Outputformat 'cutvector' returns NaN-clipped vectors with cuts connecting holes to the exterior of the polygon. Outputformat 'cell' returns cell arrays in which each element of the cell array is a separate polygon. Each polygon may consist of an outer contour followed by holes separated with NaNs.

Examples

Extract the coastline for Italy from the low resolution database and reduce the polygon. Construct construct a buffer polygon 1.5 degrees of arc along the earth's surface out from the italian coast. Display the result on a basemap of the italian peninsula along with the original polygon.

See Also

polyboolPerform polygon boolean operations


  azimuth camposm