Maptitude GISDK Help

ApplyOverlayTable()

Summary

Computes attribute values for a view using information from an overlay table.

 

Syntax

rslt = ApplyOverlayTable(string new_view, string overlay_table_filename, string input_view, string output_type, string output_filename, array output_fields, array options)

 

Argument Contents
new_view The desired name for the result view
overlay_table_filename The filename of an overlay table
input_view_name The name of the input view
output_type The type of file to create ("CSV", "dBASE", "FFA" or "FFB")
output_filename The name of the output file
output_fields An array containing one element for each field in the output table. Each element is an array of three items, that indicates the statistic calculated, as shown below

 

Item Type Contents
1 String Name of a field in the input view
2 String Statistic: "SUM", "MIN", "MAX", 'DOM" (DOMINANT), "AVG" (AVERAGE), "STDDEV" or "COUNT"
3 (optional) String Name of a field in the input view used in computing averages. Necessary only for averages; must be a numeric field

 

Option Type Contents
Missing as zero N/A No contents necessary. This option causes all missing numeric values in the input view to be treated as zeros in sum, average, min or max calculations

 

Returns

A string containing the name of the view of the new table.

 

Notes

Statistic Prefix Example
Sum (none) Income
Min Low Low Income
Max High High Income
Average Avg Avg Income

 

Example

// Before running this example, run the ComputeIntersectionPercentages() example,

// and then make sure to create a map by opening manh_zip.cdf in the

// Tutorial folder
folder = RunMacro("G30 Tutorial Folder")

rslt = ApplyOverlayTable("New Overlay Table", folder + "myintersect.dbf",

"5-Digit Zip", "FFB", "folder + "aggtable.bin", { {"White", "Sum", }, {"Population", "Sum", }, {"Population", "Avg", } }, ) 

 

Error Codes

Error Type Meaning
Error The output_fields array does not have the correct format; one or more of the following input variables is null or invalid: new_view, overlay_table_filename, output_type, output_filename, output_fields; the overlay table is not valid; input_view_name does not correspond to a mappable view; or a file I/O error occurred (e.g., out of disk space)
NotFound The input view does not exist, the input overlay table does not exist, or one of the data fields does not exist

 

See Also

Function Summary
AggregateTable() Groups records in a view and computes summary statistics
ComputeIntersectionPercentages() Intersects two or more area or line layers and computes the intersection percentages
AggregateTable() Groups records in a view and computes summary statistics
ColumnAggregate() Performs a geographic overlay between two layers and aggregates tabular data
MergeByValue() Creates districts by merging areas from a geographic file, based on the value of a field
SelfAggregate() Groups the records in a view, based on a field, to create an aggregate view

 

 

©2025 Caliper Corporation www.caliper.com