0

I am currently working on a Project that I thought I had finished. After closing everything down and re-running the code to check that everything was in order I encountered an error message on a "Resample" operation. I was trying to resample two layers with different extents but the same CRS:

> overlayBRD@extent
class      : Extent 
xmin       : 5 
xmax       : 16 
ymin       : 47 
ymax       : 56* 

> overlayKR@extent
class      : Extent 
xmin       : -293508 
xmax       : 822492 
ymin       : 1914749 
ymax       : 2929749 

> overlayKR@crs
CRS arguments: +proj=longlat +datum=WGS84 +no_defs 

> overlayBRD@crs
CRS arguments: +proj=longlat +datum=WGS84 +no_defs*

Previously this has worked without any problems what so ever. however when using :

> s <- resample(overlayKR, overlayBRD, method="ngb")

i rechieve the error message :

Error in h(simpleError(msg, call)) : 
  Fehler bei der Auswertung des Argumentes 'i' bei der Methodenauswahl für Funktion '[': invalid 'size' argument*

Does anyone know where this Issue stems from or what i can do to solve it?

1 Answer 1

0

The numbers in overlayKR extent are very large...

> overlayKR@extent
class      : Extent 
xmin       : -293508 
xmax       : 822492 
ymin       : 1914749 
ymax       : 2929749 

but the CRS says these are lat-long degrees:

> overlayKR@crs
CRS arguments: +proj=longlat +datum=WGS84 +no_defs 

which is clearly not true.

overlayBRD looks plausible, because its extents are all small enough to be degrees.

So it looks like, if this worked previously, you've missed a processing step with overlayKR.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.