1

I've noticed a difference in behaviour in terra::rast on two different computers running:

  • Windows; R4.4; terra 1.71-78; GEOS 3.12.1, GDAL 3.8.4, PROJ 9.3.1
  • Linux; R4.4; terra 1.71-71; 3.10.1, GDAL 3.4.3, PROJ 8.2.0

When creating spatRasters from netcdf (Polar Stereographic projection) with terra::rast the CRS is different depending on the setup.

In Linux the resolution is 3 x 3km: Linux example and on Windows it's 3000 x 3000 m: Windows example Both are the same file, I guess possibly this is to do with the PROJ library (i.e. PROJ 9.x vs 8.2) but can't find any documentation to support this.

Does anyone know why this may be?

1
  • Consider cross-posting this to gis.stackexchange.com which might have some specialist knowledge on the underlying libraries that's not R-related. Commented Jul 15, 2024 at 14:23

1 Answer 1

0

This is not because of a change in "terra" that I know of, so it seems very likely that the discrepancy is because of a change in GDAL or PROJ. For most intents and purposes, the result is the same in both cases as the extent also changes. The extent of the object with "unit=km" has units in km, whereas the other one has units in "m"

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.