Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/64.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R使用自定义描述符字段导出到kml_R_Kml_Rgdal - Fatal编程技术网

R使用自定义描述符字段导出到kml

R使用自定义描述符字段导出到kml,r,kml,rgdal,R,Kml,Rgdal,如何将自定义描述字段添加到从R导出的kml文件中 其中,Coords\u wgs是一个空间点数据帧类对象 writeOGR(Coords_wgs, dsn = GEfilename, layer = "layer", driver="KML", dataset_options=c("NameField=name", "DescriptionField=THIS IS A TEST"), overwrite_laye

如何将自定义描述字段添加到从R导出的kml文件中

其中,
Coords\u wgs
是一个空间点数据帧类对象

  writeOGR(Coords_wgs, dsn = GEfilename, 
         layer = "layer", 
         driver="KML", 
         dataset_options=c("NameField=name", "DescriptionField=THIS IS A TEST"),
         overwrite_layer=TRUE)
将显示名称,但描述气球仅显示其他属性数据

我确实希望通过设置“DescriptionField=”以下文本将图像添加到描述气球中

 <img src='file:///c:\temp\IMG_1234.jpg' width='400' /><br/&gt;  
 Photo example!<br/>

最后,我使用
plotKML
包中
plotKML
函数的
html.table=
参数选择了不同的路径,以将图像放入描述气球中

其中:
Coords_wgs
是一个空间点数据帧类对象;和
“image1.png”
必须与生成的kml文件位于同一文件夹中,或者需要指定完整路径

  # Description for kml file.
  desc <- paste0('<img src="image1.png"', 
                 "  width='400'  /><br/&gt; ", 
                 "Caption", '<br/>')
  # create kml file.
  plotKML(coords_wgs, html.table =  desc, 
          file.name = "filename.kml"),
          folder.name = "foldername",
          subfolder.name = "subfoldername",
          points_names = "pointnames", LabelScale = 0.8)
kml文件的描述。
desc最后,我使用
plotKML
包中
plotKML
函数的
html.table=
参数选择了不同的路径,以将图像放入描述气球

其中:
Coords_wgs
是一个空间点数据帧类对象;和
“image1.png”
必须与生成的kml文件位于同一文件夹中,或者需要指定完整路径

  # Description for kml file.
  desc <- paste0('<img src="image1.png"', 
                 "  width='400'  /><br/&gt; ", 
                 "Caption", '<br/>')
  # create kml file.
  plotKML(coords_wgs, html.table =  desc, 
          file.name = "filename.kml"),
          folder.name = "foldername",
          subfolder.name = "subfoldername",
          points_names = "pointnames", LabelScale = 0.8)
kml文件的描述。 描述