Hi Henk,
We need more details to be able to solve your problem. What kind of
system are your using (sessionInfo() command)? Could you provide use
with a piece of code that reproduces the error. What was the exact error
and what piece of code generated the error (use traceback()).
cheers,
Henk Sierdsema wrote:
Hi,
I've been trying to convert a vector kml-file to an ESRI shape with readOGR(), but I don't manage to read the kml-file. Can anyone help me with this?
http://www.gdal.org/ogr/ogr_formats.html mentions at KML that read
support needs libexpat. Further it says KML
Dear Henk,
My experiences is that the easiest way to read KML files and convert them to
sp-type of objects is
to use the XML package.
Here is a small example:
library(XML)
meuse_lead.kml - xmlTreeParse(meuse_lead.kml)
lengthp - length(meuse_lead.kml$doc[[1]][[1]][[1]])-1
lead_sp -
Hi Paul,
Here is the requested information:
sessionInfo()
R version 2.8.0 (2008-10-20)
i386-pc-mingw32
locale:
LC_COLLATE=Dutch_Netherlands.1252;LC_CTYPE=Dutch_Netherlands.1252;LC_MONETARY=Dutch_Netherlands.1252;LC_NUMERIC=C;LC_TIME=Dutch_Netherlands.1252
attached base packages:
[1] stats
2009/1/6 Henk Sierdsema henk.sierds...@sovon.nl:
Codes that produces the error:
kml -readOGR(dsn=.,layer=Gebied2.kml)
Error in ogrInfo(dsn = dsn, layer = layer) : Cannot open layer
I get this error, but I think it is because OGR is a bit confused...
I created meuse.kml from the example in
That's a question beyond the scope of r-sig-geo, IMO; it's in the R
documentation and/or faqs.
--
Edzer
Henk Sierdsema wrote:
I have installed Expat XML Parser, but how do I rebuilt GDAL/OGR?
Henk
Henk Sierdsema
SOVON Vogelonderzoek Nederland / SOVON Dutch Centre for Field Ornithology
Agreed, definitely beyond r-sig-geo scope.
Be apprised, though, that Google will be of some assistance in your quest.
eg: http://www.vterrain.org/Distrib/gdal.html
Good luck.
Greg.
2009/1/7 Edzer Pebesma edzer.pebe...@uni-muenster.de
That's a question beyond the scope of r-sig-geo, IMO; it's
Hi Juliane,
I have found an Arcview3-extension that converts kml to shapes
(http://arcscripts.esri.com/details.asp?dbid=14988) and that works fine. But it
would like to solve the problem in the scripting-environment of R.
Henk
PS: the kml-files were made with Google Earth.
Henk Sierdsema
Hi:
Let me start by saying that I am new to R. I converted two pixel ascii
matrices into image files:
X_im - im(X) # X is an ascii pixel matrix
Y_im - im(Y) # Y is an ascii pixel matrix
How can I combine these two images into 1) one datafile XY_im, 2) save
it and 3) read it after