Learn R Programming

Rnightlights (version 0.1.5)

tilesPolygonIntersectVIIRS: Get the list of VIIRS tiles that a polygon intersects with

Description

Get the list a VIIRS tiles that a polygon intersects with

Usage

tilesPolygonIntersectVIIRS(shpPolygon)

Arguments

shpPolygon

a SpatialPolygon or SpatialPolygons

Value

Character vector of the intersecting tiles as given by getNlTiles("VIIRS")

Examples

Run this code
# NOT RUN {
#download shapefile if it doesn't exist
ctryShapefile <- Rnightlights:::dnldCtryPoly("KEN")

#read in shapefile top layer
ctryPoly <- rgdal::readOGR(Rnightlights:::getPolyFnamePath("KEN"), 
    Rnightlights:::getCtryShpLyrName("KEN",0))

#get list of intersecting tiles
tileList <- Rnightlights:::tilesPolygonIntersectVIIRS(ctryPoly)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab