AddGdalVectorLayer()

Summary

Adds a Gdal Vector Layer to a map

Syntax

rslt = AddGdalVectorLayer(string map_name, string layer_name, string file_name, array params) )

Argument Contents
map_name The name of the map to which the layer will be added
layer_name The layer to be added
file_name Full path, including the database extension
params An options array as described below
Parameter Type Contents
Label String The internal layer label.
Layer Name String Required. The desired name for the layer in the map
Type String Required. The geographic layer type: Point, Line or Area
Read Only String "True" to open read only, "False" (default) otherwise
Shared String "True" to open shared, "False" (default) otherwise; "False" sets the Exclusive mode

Returns

A string indicating the actual name of the layer, which is identical to layer_name unless the layer name is already in use.

Notes

  • The supported file types include JSON files with extensions as JSON and GeoJSON - a plain text format for vector layers, ArcGIS File Geodatabases with the extension .gdb
    FlatGeobuf files with the extension .fgb

Error Codes

Error Type Meaning
Error The input file does not exist or is invalid.

See Also

Error Type Summary
GetGdalVectorInfo() Returns an array of info elements for a Gdal Vector Data file.
AddGdalVectorLayerToWorkspace() Adds a Gdal Vector Layer to the workspace

 

©2026 Caliper Corporation