0

I have a data.frame consisting of a points with an associated continuos value and their X,Y coordinates. Altough it's not stored anywhere it's projection is a Lambert conformal conic. I think this is why when I try to make it a raster object:

rast <- raster(dataframe)

I get the following error:

Error en .local(x, ...) : data are not on a regular grid

How can I tackle this issue?

0

1 Answer 1

3

This particular function does require a regularly spaced set of points. The error message is reporting that there are gaps in your data and it's not able to interpolate between the existing points to provide the value for the missing points.

You need to see if R has a different rasterizing function that will interpolate to fill in the gaps, or find some other way to convert your data to a regular grid.

0

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.