Hi,
I try to use the Rcaller in FME to perform zonal statistics. My input is a shapefile and a Geotiff, however i read that the Rcaller reads it as a dataframe when imported into R. I tried to convert it in the Rcaller back to a shapefile and raster (with rasterFromXYZ('dataframe) and SpatialPointsDataFrame() ), but i got a error that the X and Y coordinates are missing and I cannot figure out how to include them?
In R would normaly perform a zonal statistics in the following way:
setwd('location\\files)
library(rgdal)
shape <- readOGR(dsn = "Shapefile.shp")
DEM <- raster("Elevation")#extract raster cell count (sum) within each polygon area
ex <- extract(DEM, shape, fun=sum, na.rm=TRUE, df=TRUE)
My FME canvas looks at following:
Can somebody help me with an example or url reference to one?
Thanks for considering my request!