[R-sig-Geo] Extract VIIRS data in R

Miluji Sb m||uj|@b @end|ng |rom gm@||@com
Tue Mar 17 15:29:30 CET 2020


Dear all,

Hope everyone is keeping safe.

I am trying to extract/read VIIRS nighttime lights data but the output
seems rather strange.

I have uploaded the file here
<https://drive.google.com/open?id=1zpqXJ8AlEcnk6ApRb75tfQc4-Y8AfK5h> so as
not exceed the size limit of the email.

## Code ##
library(ncdf4)
library(rgdal)

netcdf_file <- c("VNP02DNB_NRT.A2020069.1048.001.nc")
nl <- brick(netcdf_file, lvar=0, values=TRUE,
varname="observation_data/DNB_observations")

## Detail ##
class      : RasterLayer
dimensions : 3232, 4064, 13134848  (nrow, ncol, ncell)
resolution : 1, 1  (x, y)
extent     : 0.5, 4064.5, 0.5, 3232.5  (xmin, xmax, ymin, ymax)
crs        : NA
source     : C:/Users/shour/Desktop/VNP02DNB_NRT.A2020069.1048.001.nc
names      : DNB.observations.at.pixel.locations
zvar       : observation_data/DNB_observations

The spatial resolution is supposed to be 750m but this shows 1°. What am I
doing wrong? Any help will be greatly appreciated. Thank you.

Sincerely,

Millu

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list