[R-sig-Geo] getKMLcoordinates - subscript out of bounds

Andres Felipe Ramirez Mejia af.ramirez.mejia at gmail.com
Fri Aug 7 00:35:05 CEST 2015


 Dear all,

I've been working on a script to read KML file coordinates using
getKMLcoordinates from "maptools" package.

The tool reads the <coordinates> section of the KML/XML file.

file="example.kml"
kml=getKMLcoordinates(file, ignoreAltitude=TRUE)

I'm getting a "subscript out of bounds" error:

Error in m[, 1:2] : subscript out of bounds

The KML files have the <coordinates> section correctly arranged,  in
addition I'm getting warning messages

1: In readLines(kmlfile, encoding = "UTF-8") : invalid input found on input
connection 'file'
2: In readLines(kmlfile, encoding = "UTF-8") : incomplete final line found
on 'file'

I can't figure out what is the problem.

Felipe Ramírez
GIS analyst and developer

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list