Skip to content
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

Area calculations #336

Open
mhesselbarth opened this issue Feb 4, 2025 · 3 comments
Open

Area calculations #336

mhesselbarth opened this issue Feb 4, 2025 · 3 comments
Assignees

Comments

@mhesselbarth
Copy link
Member

d2db0ca

There were some issues with the area calculation for sample plots which is needed to get the percentage inside value during sampling. I figured out this is related to the CRS and the transform argument of terra::expanse(). So I added an argument passed on. @Nowosad you are the CRS expert, is there a way to automatically detect the correct TRUE/FALSE option depending on the CRS?

@Nowosad
Copy link
Member

Nowosad commented Feb 10, 2025

Hi @mhesselbarth -- I will take a look at this in the next week or two (I have some other deadlines approaching soon).

@mhesselbarth
Copy link
Member Author

No rush. For now, I will add the TRUE/FALSE argument, but would be nice if this can be automated

@Nowosad
Copy link
Member

Nowosad commented Feb 20, 2025

Hi @mhesselbarth I have finally take a minute to look at this. I think you are looking for terra::is.lonlat -- so basically it could be something like:

terra::expanse(y, transform = !terra::is.lonlat(y))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants