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: and on Windows it’s 3000 x 3000 m:
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?
user8330904 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1
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”