UNPKG

@placemarkio/tokml

Version:

Convert GeoJSON to KML

15 lines (14 loc) 584 B
import type { Root } from "@tmcw/togeojson"; import type { FeatureCollection, Geometry } from "geojson"; /** * Convert nested folder structure to KML. This expects * input that follows the same patterns as [toGeoJSON](https://github.com/placemark/togeojson)'s * kmlWithFolders method: a tree of folders and features, * starting with a root element. */ export declare function foldersToKML(root: Root): string; /** * Convert a GeoJSON FeatureCollection to a string of * KML data. */ export declare function toKML(featureCollection: FeatureCollection<Geometry | null>): string;