-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fasterize compatibility #2
Comments
Sounds like a great idea, thanks! |
Now that fasterize is on CRAN and stars is close, how shall we do this? |
Yes! But FYI, I don't anticipate being able to spend significantly more time on fasterize until the summer. I don't anticipate that it would require anything in stars - I just have to learn the data model. Fasterize basically creates an empty raster object, then the C++ code writes the data slot for the raster. So I just need a method to create an empty stars object, transfer over appropriate CRS projection ino, and then access the data, which is even easier because its an S3 object. So, my todos:
So it's pretty simple, as long as we're just outputting an array. I don't anticipate fasterize() outputting a list of multiple arrays for a more complex stars object - do you think it should? Also, would you want to import fasterize for functions like As I said, I'm crunched for time at the moment. I will put this in the roadmap and issues in case someone wants to jump ahead of me, if not I will get to it, just in a few months. |
Much simpler might be to modify the R code of
As long as all of this is in memory, there should be negligible overhead. Or am I overlooking something?
Ah, I now see that you probably don't have any R code in fasterize, yes, that complicates. |
Did you consider using GDAL_Polygonize and GDAL_FPolygonize, too? Note that going through |
... and it's sibling, It's not one of the GDAL utils (different interface), but definitely in the scope of sf/stars. I guess it should go into the |
@edzer yeah, I think that would be ideal, very intuitive to put them there as optional arguments. |
I got a fair way into a standard gdalwarp in Rcpp, writing to a GeoTiFF - I guess a good chunk here would be a stars/sf to MEM and MEM to stars capability and we could expose many gdal functions via that. Have you tried that @edzer ? |
No haven't tried - good idea! |
In the new logic, I guess we can close here; please reopen (or comment) if one of you disagrees. |
I envisioned fasterize as a link between sf and raster data types. Only one (one-way) operation is currently implemented but I had planned a fast version of raster2polygons, and potentially others. I had just been thinking about outputs besides in-memory rasters, and would be happy to try to implement stars-style input and output formats.
The text was updated successfully, but these errors were encountered: