[R-sig-Geo] basic question about plotKML
Edzer Pebesma
edzer.pebesma at uni-muenster.de
Fri Sep 28 11:21:49 CEST 2012
For me this works too -- cold region. Did you update packages and R to
newest versions? Sending the output of sessionInfo() usually helps, when
asking help from the list.
On 09/28/2012 10:30 AM, Roman Luštrik wrote:
> Your code works for me?
>
> http://tinypic.com/r/iblw5w/6
>
> Cheers,
> Roman
>
>
>
> On Fri, Sep 28, 2012 at 5:43 AM, Struve,Juliane <jstruve at ufl.edu> wrote:
>>
>> Dear list,
>>
>> I am trying to plot some spatial data in Google Earth but have a hard time with the plotKML manual. What is missing in my script that will make plotKML() work ?
>>
>> Thank you for your time,
>>
>> Juliane
>>
>> xc = round(runif(10,-1,1)+27.2, 2)
>> yc = round(runif(10,-1,1)+-82.5, 2)
>> xy = cbind(xc, yc)
>> xy.sp = SpatialPoints(xy)
>> df = data.frame(z1 = round(5 + rnorm(10), 2), z2 = 20:29)
>> SP.spdf = SpatialPointsDataFrame(xy.sp, df)
>> plot(SP.spdf)
>> #add a projection
>> proj4string(SP.spdf) = CRS("+proj=longlat +datum=WGS84")
>> plotKML(SP.spdf)
>>
>> [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>
>
>
> --
> In God we trust, all others bring data.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de
http://www.52north.org/geostatistics e.pebesma at wwu.de
More information about the R-sig-Geo
mailing list