Maptitude GISDK Help

ImportKML()

Summary

Imports features from one or more KML files into a geographic file.

 

Changes

Added to Version 2017.

 

Syntax

ImportKML(string kml_filename, array kml_folders, string out_db_folder, array options)

 

Argument Contents
kml_filename The file name of the file to import
kml_folders An array of folders that you want to import from the kml file, in the format {"folder1/folder2/folder3", "folder1/folder2/folder4", ...}; if null, the whole file is imported.
out_db_folder The path for the new geographic files

 

Option Type Contents
Import Points Boolean If "True" import points in the KML file; the default is "False"
Import Lines Boolean If "True" import lines in the KML file; the default is "False"
Import Areas Boolean If "True" import areas in the KML file; the default is "False"
Datum Integer The datum code
Label String A descriptive label for the geographic file
Layer Name String The name of the layer in the geographic file
Median Split Boolean If "True" special handling insures that entities which cross the 180 degree longitude line are imported properly; if "False" (the default), no special handling is invoked
NAD Conversion Array Input_datum, output_datum, hp_datum_file where input_datum and output are different datums, chosen from "NAD27", "NAD83" or "NAD83HP". hp_datum_file is the name of the high precision conversion file (if NAD83HP is specified).
Node Layer Name String The desired name for the endpoint layer (only when importing a line layer)
Optimize Boolean Whether to optimize the geographic file automatically after the import; defaults to "True"
Projection String and Array A string with the projection name, and an array of projection options; the option {"units","us-ft"} needs to be specified for normal 1927 State Plane Coordinates
Transform Array Array indicating the transformation to apply to coordinates in the file. This can have three forms:1. An array of two or more four-element arrays containing local and world coordinates for control points, for example, {{real localX1, real localY1, real longitude1, real latitude1}, ...}2. An array of four elements - {real X_multiplier, real Y_multiplier, real X_offset, real Y_offset}3. Center and Extent transform {c1_x, c1_y, width_1, c2_x, c2_y, width_2}where center is shifted from (c1_x,c1_y) to (c2_x,c2_y), and vector of length width_1 out of c_1 becomes a vector of length width_2 out of c_2.

 

Returns

An array of imported geographic file names.

 

Notes

Example

???

 

Error Codes

Error Type Meaning
NotFound There is no file by this name; or there are no entities in the files of the desired type
Error The file is not a valid KML file

 

See Also

Function Summary
GetKMLInfo()???

 

 

©2025 Caliper Corporation www.caliper.com