- globalmapper.SaveProjectionToString(GM_Projection_t aProj, uint32 aBufSize, uint32 aReserved=0) GM_Error_t32, str
-
Saves a GM_Projection_t structure to a WKT projection string. The string buffer aBufSize must be large enough to fit the returned string completely, or else the function will return GM_Error_OutOfMemory.
- Parameters:
-
aProj (GM_Projection_t) – projection to save
aBufSize (uint32) – size of string buffer
aReserved (uint32) – Reserved for future use; defaults to 0
- Returns:
-
Error Code
- Return type:
-
GM_Error_t32
- Returns:
-
The projection in string form
- Return type:
-
str
Example
The following is an example of SaveProjectionToString.
import globalmapper as gm
### START SAMPLE
err_SaveProjectionToString, proj_str = gm.SaveProjectionToString(gm.GM_Projection_t(), 500, 0)
### END SAMPLE
assert (
gm.GM_Error_None == err_SaveProjectionToString
), f"SaveProjectionToString: Expected {gm.GM_Error_None}, got {err_SaveProjectionToString}"
For more context refer to the tutorial page on setting projections.