kml_to_shape {KMLtoSHAPE}R Documentation

Conversion from KML to Shapefile While Preserving Attribute Values

Description

Conversion from KML to Shapefile While Preserving Attribute Values

Usage

kml_to_shape(data_kml, outputShape)

Arguments

data_kml

Path to the KML file

outputShape

Path to save the output shapefile

Value

A shapefile with extracted attributes

References

1. Flores, G. & Gallardo, C. (2021). Creating Shapefile Files in ArcMap from KML File Generated in My Maps. In Advances in Emerging Trends and Technologies: Proceedings of ICAETT 2020 (pp. 193-204). Springer International Publishing..<DOI:10.1007/978-3-030-63665-4_15> 2. Kumar et al. (2023). SpatGRID:Spatial Grid Generation from Longitude and Latitude List. R package version 0.1.0.

Examples


library(KMLtoSHAPE)
# Example usage:
data_kml <- system.file("extdata", "testkml.kml", package = "KMLtoSHAPE")
outputShape <- file.path(tempdir(), "shapedata.shp")
# Delete existing shapefile if it exists
if(file.exists(outputShape)) file.remove(outputShape)
# convert kml to shapefile
test_data<-kml_to_shape(data_kml, outputShape)


[Package KMLtoSHAPE version 0.1.0 Index]