Skip to content
Prev 23190 / 29559 Next

help: krigged map do not show colours

Anand,

I could not open your .grd file in R, I think the .gri file is missing.
However, looking at it in a text editor, and comparing with your 
R-script, it seems something went wrong with your projections. Your 
.csv-file has LatLong coordinates, but you are setting the projection to 
"+proj=utm +zone=40 +south +datum=WGS84 +units=m +no_defs +ellps=WGS84 
+towgs84=0,0,0", the same as you seem to have in your prediction raster. 
But you need to reproject your observations in this case.

# First set the right projection:
proj4string(carbon_seq) <- CRS("+init=epsg4326") # epsg-code for latlong
# Then transform
carbon_seq = spTransform(carbon_seq, CRS("+proj=utm +zone=40 +south 
+datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0"))

If you do this, your prediction grid should overlap your observations, 
and the colors should reflect your color ramp. What you essentially did 
before was to make a prediction thousands of km away from your 
observations, and then all values will be the same.

Best wishes,
Jon
On 8/4/2015 12:48 PM, Anand Sookun wrote: