Open goergen95 opened 4 years ago
Thanks for the reproducible example! I get the same error and it seems that in the C++ implementation, OGRSpatialReference::IsSame()
returns false. I'll have a closer look to find out why.
https://github.com/appelmar/gdalcubes_R/commit/dafb64d5c9fa6771bb3e7d7ff4e46adb908cf745 now does on-the-fly transformation of input geometries if the coordinate reference system differs from the cube. However, in your example, dx
and dy
of v
should also refer to lat lon, e.g., 0.005 instead of 300.
There is still one more issue when I try to plot the result with stars
. I'll keep the issue open until this has been solved.
Thanks for looking into it and yes, the x and y units are totally senseless in my example! I can confirm that the extraction itself now works seamlessly also in my use case.
Hi @appelmar,
First of all, let me thank you for this really great package which despite its early stage already offers incredible useful functionality!!
I came across an error though which I currently do not understand when applying the
zonal_statistics()
function. I initiated both the date cube and my sf-object with EPSG:4326, however, when running the function the following error is issued:Error: Data cube and input features have different SRSes Error in libgdalcubes_zonal_statistics(x, geom, agg_funcs, agg_bands, : Data cube and input features have different SRSes
I made a small reproducible example based on the package's sample data which produces the same error on my machine:
I am not familiar with cpp thus I could not do more to troubleshoot the problem. Anyway, I also tested the above code on a docker container getting the same result. So I guess the issue is not with my local machine. Let me know if I can provide more information or testing. Darius.