Skip to content
Back to formatted view

Raw Message

Message-ID: <CAHT1vphJzVjCm-K_9xskpaWTd+wfJrnGRdExOqvLfarRfmexqg@mail.gmail.com>
Date: 2012-09-28T08:30:43Z
From: Roman Luštrik
Subject: basic question about plotKML
In-Reply-To: <BFCE57D0BE7CBB42A581347DE375AF9A11556B32@UFEXCH-MBXN02.ad.ufl.edu>

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.