0

I want to change the Coordinate Reference System of some raster and vector layers which are from different types and origins so that all are in the same CRS. In QGIS when I want to change the CRS of the project, several transformation options are available for each CRS. Here is the text which is prompted by QGIS:

Multiple operations are possible for converting coordinates between these two Coordinate Reference Systems. Please select the appropriate conversion operation, given the desired area of use, origins of your data, and any other constraints which may alter the "fit for purpose" for particular transformation operations.

QGIS shows a little map with the particular region in which these transformations are tuned to and the accuracy in meters that each transformation would provide (usually ranging from 1 to 10 meters, depending on the transformation).

Here is an example with a subset of my data, in this case a vector layer containing points which I want to project from WGS84 (EPSG 4326) to ED50 UTM30 (EPSG 23030) to later extract info from raster layers at these geographical locations:

name lat long
1 38.190694 -5.993028
2 38.419139 -6.100139
3 38.289917 -5.984778
4 37.974500 -6.168806
5 38.745500 -5.767806
6 36.976222 -5.657944
7 37.317750 -6.866444
8 40.772194 -3.779278
9 40.069639 -5.438222
10 40.955000 -5.668944

When I try to import these points into QGIS (ver. 3.28.5 "Fierze"), I can choose between 13 transformation options. The one which provides the best result in the area of interest (Spain), is this one:

Inverse of ED50 to WGS 84 (28) + UTM zone 30N.

Scope: Approximation assuming equality between plate-fixed static and earth-fixed dynamic CRSs. Remarks: Parameter values from ED50 to ETRS89 (7) (code 1632). Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.

Scope: Engineering survey, topographic mapping.

Area of use: Spain - onshore mainland except northwest (north of 41°30'N and west of 4°30'W)., Between 6°W and 0°W, northern hemisphere between equator and 84°N, onshore and offshore.

Identifiers: INVERSE(EPSG):1633, EPSG:16030 +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=push +v_3 +step +proj=cart +ellps=WGS84 +step +inv +proj=helmert +x=-131 +y=-100.3 +z=-163.4 +rx=-1.244 +ry=-0.02 +rz=-1.144 +s=9.39 +convention=position_vector +step +inv +proj=cart +ellps=intl +step +proj=pop +v_3 +step +proj=utm +zone=30 +ellps=intl

But another possible option could be:

Inverse of ED50 to WGS 84 (13) + UTM zone 30N.

Scope: Military survey.

Remarks: Derived at 18 stations. Accuracy 5m, 6m and 3m in X, Y and Z axes. Scope: Engineering survey, topographic mapping. Area of use:

Portugal; Spain - mainland., Between 6°W and 0°W, northern hemisphere between equator and 84°N, onshore and offshore. Identifiers:

INVERSE(EPSG):1145, EPSG:16030

+proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=push +v_3 +step +proj=cart +ellps=WGS84 +step +proj=helmert +x=84 +y=107 +z=120 +step +inv +proj=cart +ellps=intl +step +proj=pop +v_3 +step +proj=utm +zone=30 +ellps=intl

However, when I change the projection using the terra package in R, it is quite straight forward and I don't have to specify any transformation type. But, should I be worried about this? Is there a way I can specify the exact transformation type in the terra::project function?

Thanks for any insights about these aspects.

Andres
  • 59
  • 6
  • I thought terra was built on pkg:sf? – IRTFM Apr 23 '23 at 17:19
  • Hi @IRTFM, I use this package: https://rspatial.org/pkg/index.html – Andres Apr 23 '23 at 18:48
  • It's manual says:: "You can use the following formats to define coordinate reference systems: WKT, PROJ.4 (e.g., +proj=longlat +datum=WGS84), or an EPSG code (e.g., "epsg:4326"). But note that the PROJ.4 notation has been deprecated, and you can only use it with the WGS84/NAD83 and NAD27 datums. Other datums are silently ignored." Seems the answer is "yes". I guess I don't understand why you are asking. – IRTFM Apr 23 '23 at 19:35
  • Thank you IRTFM. I'm sorry if I'm asking very basic questions. Please, note I'm a very basic beginner in both R and geographical concepts, so any help or comment is much appreciated. IRTFM, do you then mean that I could pass the desired QGIS transformation parameters to the terra:project function? I have tried it with no success by now. I get this output: Error: [project] cannot get output boundaries In addition: Warning messages: 1: In x@ptr$warp(SpatRaster$new(), y, method, mask, FALSE, FALSE, opt) : GDAL Error 1: PROJ: proj_crs_get_coordinate_system: Object is not a SingleCRS – Andres Apr 24 '23 at 17:19
  • Tried “it” tells me nothing. Us [edit] facilities to improve the specificity of your question. Never use comments for that purpose. – IRTFM Apr 24 '23 at 20:35

0 Answers0