[R-sig-Geo] addin a shapefile on earth google navigator
Roger Bivand
Roger.Bivand at nhh.no
Fri Aug 29 08:54:59 CEST 2008
On Thu, 28 Aug 2008, milton ruser wrote:
> Dear all,
>
> I have a shape file with the boundaries of an area of interest
> and I would like "upload" it on earth google natigator.
> How can I do that? A example is very welcome.
If the SpatialPolygonsDataFrame or SpatialLinesDataFrame object (from
either readOGR() in rgdal or readShapeSpatial() in maptools) is in
geographical coordinates, writeOGR(..., driver="KML") is all you need to
output the border lines. If the PROJ4 string is known and the coordinates
are projected, use spTransform() in rgdal to get to geographical
coordinates. If unknown, find the correct PROJ4 string.
This just gets you the borders. If you want to do an image overlay, see
GE_SpatialGrid() in maptools to create metadata for a PNG device to plot
to.
Hope this helps,
Roger
>
> All the best,
>
> miltinho astronauta
> brazil
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> 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
More information about the R-sig-Geo
mailing list