[R-sig-Geo] Convert arc-second to degree

Miluji Sb milujisb at gmail.com
Tue Nov 29 11:54:41 CET 2016


Dear all,

I am using the Gridded Population of the World (v4) for the year 2010. The
data is in GeoTiFF format.

Source:
http://sedac.ciesin.columbia.edu/data/set/gpw-v4-population-count-adjusted-to-2015-unwpp-country-totals/data-download

I imported the data using:

library(raster)
library(maptools)
library(ncdf4)
library(rgdal)

population <-
raster("gpw-v4-population-count-adjusted-to-2015-unwpp-country-totals_2010.tif")
population1 <- stack(population )
extent(population1 ) <- c(-180, 180,-58,85)

### Information
class       : RasterStack
dimensions  : 17400, 43200, 751680000, 1  (nrow, ncol, ncell, nlayers)
resolution  : 0.008333333, 0.008333333  (x, y)
extent      : -180, 180, -60, 85  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84
+towgs84=0,0,0
names       :
gpw.v4.population.count.adjusted.to.2015.unwpp.country.totals_2010
min values  :
   0
max values  :
141715.3
###

I need to extract population by a set of coordinates which are at 1° x 1°,
how can I convert from arc-second to degree in R? The information also
shows that resolution is 0.008333333° x 0.008333333°, is it enough to do
something like this?

pop_agg <- aggregate(population1 , fact=120, fun=sum)

Thank you very much.

Sincerely,

Milu

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list