ecohealthalliance / fasterize

High performance raster conversion for modern spatial data 🚀🌏▦
https://ecohealthalliance.github.io/fasterize/
Other
182 stars 15 forks source link

cleanup raster/sf use WIP #48

Open mdsumner opened 1 year ago

mdsumner commented 1 year ago

tentatively , I'll just sit on this a while but see branch remove-raster-method

need to determine sensible crs behaviour (we were copying the sf$crs$proj4string to r@crs when using raster(sf))

situations are

-[x] input sf has NA crs, do nothing -[x] input sf has crs, input raster has NA crs ,do nothing -[ ] input sf has crs, input raster has crs and they are different -[x] input sf has crs, input raster has crs and they are same, do nothing

the only thing to do is st_transform when both are set but different, but do we check if there's wkt/projstring in the raster?

mdsumner commented 1 year ago

see https://github.com/diminutive/hackspatialcpp for some Cpp that gets what we need from sf

the removal is now merged into master with https://github.com/ecohealthalliance/fasterize/pull/52