Skip to content
Prev 7165 / 29559 Next

error for converting between KML and Shape file

On Thu, Dec 10, 2009 at 8:17 PM, rusers.sh <rusers.sh at gmail.com> wrote:
The devil, as we say, is in the details (which for some reason are truncated!):

Details:

    Working out which combination of dsn, layer, and driver (and
    option) values give the desired output takes time and care, and is
    constrained by the ability of drivers to write output; many ar

The parameters for writeOGR are:

writeOGR(object, fileName, layerName,driver="KML")

Here 'object' is your R Spatial Points/Poly/etc, 'fileName' is the
path (including filename) for your output KML, and 'layerName' is a
label that your layer will get in the KML - you'll see this in the
layer list in Google Earth, for example.

 Example:

writeOGR(myPoints,"/tmp/test.kml","TestLayer",driver="KML")


Barry