spMetadata.Spatial(obj, xml.file, generate.missing = TRUE, Citation_title,
Target_variable, Attribute_Measurement_Resolution = 1,
Attribute_Units_of_Measure = "NA",
Indirect_Spatial_Reference = "", GoogleGeocode = FALSE,
Enduser_license_URL = get("license_url", envir = plotKML.opts),
signif.digit = 3, colour_scale, bounds, legend_names, icons,
validate.schema = FALSE, Target_variable_descr = "NA",
Geosp_Data_Presentation_Form, Edition, Purpose, Abstract,
Supplinf, Publisher, Pub_Place, Temp_Ext,
Update_Freq = c("Unknown", "Continually", "Daily", "Weekly",
"Monthly", "Annually", "As needed", "Irregular", "None planned"),
Stat_Progress = c("Complete", "In work", "Planned"),
Spatial_Represent_Type = c("Point", "Vector", "Raster"),
Keyw_theme, Keyw_place)"Spatial" class object with "data" slotspMetadata.Spatial tries to locate a metadata file in the working directory (it looks for a metadata file with the same name as the object name). If no .xml file exists, it will load the template xml file available in the system folder (system.file("FGDC.xml", package="plotKML")).SpatialMetadata-classdata(eberg)
library(sp)
library(rgdal)
coordinates(eberg) <- ~X+Y
proj4string(eberg) <- CRS("+init=epsg:31467")
# (a) no metadata file exist:
eberg.md <- spMetadata(eberg, Target_variable="SNDMHT_A")
# (b) with localy prepared metadata file:
eberg.md <- spMetadata(eberg, xml.file=system.file("eberg.xml", package="plotKML"),
Target_variable="SNDMHT_A")Run the code above in your browser using DataLab