[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-sig-geo
Subject:    [R-sig-Geo] question on the use of Leaflet for plotting points and rater GeoTIFF
From:       Gabriel Cotlier <gabiklm01 () gmail ! com>
Date:       2021-08-12 9:02:03
Message-ID: CAAKwTDEeiNdDLs8FnqLMraDvS1kvbio_fV8e-sjcGJTVfOtjTA () mail ! gmail ! com
[Download RAW message or body]

Hello.

I would like to use Leaflet package to plot over a Google Satellite base
map :

1.  a shapefile of polygon
2.  a shapefile of points
3,  a GeoTIFF image

I could use the Leaflet package to get plotted successfully only the first
Item of the list above with the following code :

require(rgdal)
library(rgeos)
library(raster)

shapeData <- raster::shapefile('Seattle_boundries.shp')
shapeData <- spTransform(shapeData, CRS("+proj=longlat +ellps=GRS80"))

leaflet() %>%
  addTiles(urlTemplate = "
https://mts1.google.com/vt/lyrs=s&hl=en&src=app&x={x}&y={y}&z={z}&s=G",
attribution = 'Google')  %>%
  addPolygons(data=shapeData,weight=5,col = 'red')

How is it possible to find a way to complete the code above for plotting
the item 2 and 3 as well in the same Leaflet figure.

Is there any possible solution that can enable this task?

Thanks for your help.

Kind regards
Gabriel

	[[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic