- globalmapper.LoadProjectionFromEPSGCode(uint32 aEpsgCode) GM_Error_t32, GM_Projection_t
-
Initializes a GM_Projection_t structure from an EPSG code
- Parameters:
-
aEpsgCode (uint32) – EPSG code to get projection from
- Returns:
-
Error Code
- Return type:
-
GM_Error_t32
- Returns:
-
The decoded projection
- Return type:
Example
The following is an example of LoadProjectionFromEPSGCode.
import globalmapper as gm
### START SAMPLE
# EPSG 4326 represents the WGS 84 coordinate system
err_LoadProjectionFromEPSGCode, proj = gm.LoadProjectionFromEPSGCode(4326)
### END SAMPLE
assert (
gm.GM_Error_None == err_LoadProjectionFromEPSGCode
), f"LoadProjectionFromEPSGCode: Expected {gm.GM_Error_None}, got {err_LoadProjectionFromEPSGCode}"
For more context refer to the coordinate conversion/measurement sample scripts and the tutorial page on setting projections.