I am writing a generic script that would calculate areas covered by different classes in a categorical raster in R. I would like to provide two functions; one for use when the CRS of the raster is geographic (long, lat), and one to use when the CRS is projected.
Is there a way I can check that?
I imagine there is a property of the CRS string I'd check in an if()
statement for that