[R-sig-Geo] kml and points
Felipe Carrillo
mazatlanmexico at yahoo.com
Sat Aug 7 19:10:38 CEST 2010
Can google earth be open from R along with the meuse.kml overlayed on top of it?
Felipe D. Carrillo
Supervisory Fishery Biologist
Department of the Interior
US Fish & Wildlife Service
California, USA
----- Original Message ----
> From: Roger Bivand <Roger.Bivand at nhh.no>
> To: Patrick Giraudoux <patrick.giraudoux at univ-fcomte.fr>
> Cc: r-sig-geo at stat.math.ethz.ch
> Sent: Sat, August 7, 2010 2:15:06 AM
> Subject: Re: [R-sig-Geo] kml and points
>
> On Sat, 7 Aug 2010, Patrick Giraudoux wrote:
>
> > Dear All,
> >
> > I have just discovered the fantastic possibilities given with kmlPolygon,
>klmLine and kmlOverlay (package maptools) to project spatial objects into google
>earth.
> >
> > Does anyone knows if a function equivalent has been written to create a kml
>file of "points" ? If not, is there a technical reason not to have done it or a
>workaround which would make such function unecessary ?
>
> Would the KML driver for writeOGR() in rgdal be enough? The variables (or a
>subset of the variables) in the SpatialPointsDataFrame are displayed in the
>bubble on clicking. You do not, I think, get a choice of point symbol.
>
> td <- tempdir()
> data(meuse)
> coordinates(meuse) <- c("x", "y")
> proj4string(meuse) <- CRS("+init=epsg:28992")
> meuse_ll <- spTransform(meuse, CRS("+proj=longlat +datum=WGS84"))
> writeOGR(meuse_ll, paste(td, "meuse.kml", sep="/"), "zinc", "KML")
> file.show(paste(td, "meuse.kml", sep="/"))
>
> See http://www.gdal.org/ogr/drv_kml.html, and note the section on encoding if
>on Windows.
>
> Roger
>
> >
> > Patrick
> >
> > _______________________________________________
> > R-sig-Geo mailing list
> > R-sig-Geo at stat.math.ethz.ch
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >
>
> -- Roger Bivand
> Economic Geography Section, Department of Economics, Norwegian School of
> Economics and Business Administration, Helleveien 30, N-5045 Bergen,
> Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
> e-mail: Roger.Bivand at nhh.no
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
More information about the R-sig-Geo
mailing list