[R-sig-Geo] Simple doubt - CRS

Pietro Andre Telatin Paschoalino P|etro_te|@to @end|ng |rom hotm@||@com
Wed Mar 24 14:45:21 CET 2021


Hello everyone,

I'm extracting a precipitation data of a raster to shapefile and have a simple doubt.

To extract I'm transforming my shape to the crs of the rasterstack to get the same crs.

What I'm concerned about is that before and after the changing in the crs when I ask for the function proj4string I have a warning:

"In proj4string(shape) : CRS object has comment, which is lost in output"

I read that it's because of the development of the rgdal and that in most cases there is no problem. But I would like confirmation that this is not affecting my results of extraction. I believe that if the warning came after the extraction, I should be more concerned. Could anyone help?

The code Is like that:

shape <- readOGR(dsn = ".", layer = "myshape")

proj4string(shape)

fn<-file.path("mypath\\cru_ts4.04.2011.2019.pre.dat.nc")

rasbrick <- stack(fn)

shape2<- spTransform(shape, crs(rasbrick))

proj4string(shape2)

for (i in 1:length(rasbrick using layers)) {
  weath_dt[,2+i] = raster::extract(rasbrick[[i]], shape2, mean, na.rm=T)
}

Thanks.

Pietro Andre Telatin Paschoalino
Doutorando em Ci�ncias Econ�micas da Universidade Estadual de Maring� - PCE.

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list