Maptitude GISDK Help

CreateBuffers()

Summary

Creates buffers around features in a layer.

 

Syntax

CreateBuffers(string db_name, string output_layer_name, array sets, string method, array inputs, array options)

 

Argument Contents
db_name The name of the output geographic file
output_layer_name The output layer name
sets An array of input selection sets (currently only the first one is used)
method "Value", "To Value", or "Expression":"Value" means that the buffers have fixed sizes"To Value" indicates that the size of the buffer is dependent on the result of an "overlay" between itself and the other layer"Expression" is a mathematical function that could, but does not necessarily, depend on the attributes of each feature
inputs An array that is specific to the method:- If the method is "Value", then "inputs" will be an array of numerical values- If the method is "To Value", then "inputs" will be a two- or three-element array. The first part of the array is a full field spec for the polygon overlay, the second is an array of numerical values, and the third is optional tolerance value- If the method is "Expression", then "inputs" will be the expression

 

Option Type Contents
Exterior String "Merged" or "Separate"
Interior String "Merged" or "Separate"
Arcs Integer Number of arcs to be used to depict a circle
Units String Units of length to be used
Database Label String Label for database that is created
Preprocess String "True" to check for overpasses, underpasses, and duplicate lines before building the buffers, or "False" (default)
Name Field String A field in the current layer whose values will be copied to the corresponding buffer record in the output layer
Cumulative string "True" or "False" to create cumulative buffers, where outer buffers also include the areas of the inner buffers

 

Notes

Example

// Before running the example, create a map by opening nycrests.cdf

// in the Tutorial folder.

on escape goto next // So Cancel button will be detected

// Build buffers at fixed ring sizes around each store.

folder = RunMacro("G30 Tutorial Folder")

CreateBuffers(folder + "mybuffers.dbd", "Restaurant Buffers", { }, "Value", {.25, .5},

{{"Exterior", "Merged"}, {"Interior", "Merged"}}) 

next:

on escape default

// To see the results, add mybuffers.dbd in the Tutorial folder to the map.

 

Error Codes

Error Meaning
Error Invalid input or the output database is in use
NotFound There is no current layer
Escape The user clicked Cancel

 

See Also

Function Summary
ColumnAggregate() Performs a geographic overlay between two layers and aggregates tabular data

 

 

©2025 Caliper Corporation www.caliper.com