Description Usage Arguments Value Note References Examples
Read Points out of a KML file.
1 | kml_points(x, ns = "d1", verbose = TRUE, ...)
|
x |
A KML source. See kml_read. |
ns |
The name of the namespace to extract from: defaults to |
verbose |
Whether to report invalid coordinates and/or altitudes below
sea level; defaults to |
... |
Arguments passed to read_xml. See kml_read. |
A tibble containing the folder
(layer),
name
, description
, styleUrl
and geographic coordinates
(longitude
, latitude
and altitude
) of the first
Point contained within each Placemark element of the KML source.
Other Placemark elements will be ignored.
If there are no Points in the KML source, the function returns NULL
.
If there are no Folders in the KML source, the folder
variable will be
filled with NA
.
The function only extracts the first Point out of each Placemark element. As a result, multi-points built into <MultiGeometry> elements are not fully supported: only the first Point will be present in the results.
Google Developers. KML Reference: <Point> Element. https://developers.google.com/kml/documentation/kmlreference#point
1 2 3 4 | # demo data: U.S. Civil War map
# see ?states for details
f <- system.file("extdata", "states.kml.zip", package = "tidykml")
kml_points(f)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.