[R-sig-Geo] getKMLcoordinates - subscript out of bounds
Roger.Bivand at nhh.no
Fri Aug 7 02:07:58 CEST 2015
On Fri, 7 Aug 2015, Andres Felipe Ramirez Mejia wrote:
> Dear all,
> I've been working on a script to read KML file coordinates using
> getKMLcoordinates from "maptools" package.
The function exists purely for historical reasons and should not be used
if your rgdal package installation (so the underlying GDAL/OGR
libraries) has the KML or libkml driver.
If anyone is still using it, let me know, otherwise it will be deprecated
shortly and then made defunct.
Please do not post HTML mail.
> The tool reads the <coordinates> section of the KML/XML file.
> 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]]
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: Roger.Bivand at nhh.no
More information about the R-sig-Geo