[R-sig-Geo] How to implement Org2Org "-dcso NameField=..." in rgdal, writeOGR() KML

Noli Sicad nsicad at gmail.com
Sat Jan 2 03:14:41 CET 2010


Hi,

I would like to minic this Org2Ogr command (below) to write shapefile
to KML. How do I do this in rgdal,  " -dcso NameField=Name_2"

Org2Ogr command:
~~~~~~~~~
Org2Org -f KML NZL_3.kml NZL_adm3.shp -dcso NameField=Name_2

~~~~~~~~~

Rgdal

~~~~~~~~~~
library(rgdal)

mymap<-readOGR("NZL_adm3.shp", layer="NZL_adm3")

writeOGR(mymap,"NZL_3.kml", driver="KML", layer="NZL_adm3", "something
should be here")

~~~~~~~~~~

Thanks in advance.

Noli



More information about the R-sig-Geo mailing list