Hello
I have a problem when exporting contours.
For the geographic (lat/lon) projection it gives me points of this form:
97° 22' 1.6139" W,48° 22' 38.2992" N
and what I want to have points that have double coordinates like :
-97.3430947450,48.3835175384
The code has this form GM_ContourParams_t theContourParams;
::memset( &theContourParams, 0, sizeof theContourParams );
theContourParams.mSize = sizeof theContourParams;
theContourParams.mDesc = "Generated Contours";
theContourParams.mIntervalInFeet = TRUE;
theContourParams.mGenerateAreas = TRUE;
theContourParams.mGenerateSpotElevs = FALSE;
theContourParams.mNumberOnlyLabels = FALSE;
theContourParams.mShowProgress = FALSE;
theContourParams.mXSpacing = 0.0;
theContourParams.mYSpacing = 0.0;
theContourParams.mSimpThreshold = 0.0;
theContourParams.mContourInterval = 1;
GM_LayerHandle_t32 theContourLayer = NULL;
_theError = GM_GenerateContours ( _theLayer, &theContourParams, &theContourLayer);
const GM_LayerInfo_t* contLayerInfo = GM_GetLayerInfo(theContourLayer);
_theError = GM_ExportVector( contourFileName, GM_Export_SimpleText,theContourLayer, &contLayerInfo->mGlobalRect,
GM_VectorExportFlags_ExportAreas,NULL);
Is there somethig that I've missed? Because normally it should work...
Thank you,
Dana
For the geographic (lat/lon) projection it gives me points of this form:
97° 22' 1.6139" W,48° 22' 38.2992" N
and what I want to have points that have double coordinates like :
-97.3430947450,48.3835175384
The code has this form GM_ContourParams_t theContourParams;
::memset( &theContourParams, 0, sizeof theContourParams );
theContourParams.mSize = sizeof theContourParams;
theContourParams.mDesc = "Generated Contours";
theContourParams.mIntervalInFeet = TRUE;
theContourParams.mGenerateAreas = TRUE;
theContourParams.mGenerateSpotElevs = FALSE;
theContourParams.mNumberOnlyLabels = FALSE;
theContourParams.mShowProgress = FALSE;
theContourParams.mXSpacing = 0.0;
theContourParams.mYSpacing = 0.0;
theContourParams.mSimpThreshold = 0.0;
theContourParams.mContourInterval = 1;
GM_LayerHandle_t32 theContourLayer = NULL;
_theError = GM_GenerateContours ( _theLayer, &theContourParams, &theContourLayer);
const GM_LayerInfo_t* contLayerInfo = GM_GetLayerInfo(theContourLayer);
_theError = GM_ExportVector( contourFileName, GM_Export_SimpleText,theContourLayer, &contLayerInfo->mGlobalRect,
GM_VectorExportFlags_ExportAreas,NULL);
Is there somethig that I've missed? Because normally it should work...
Thank you,
Dana
Comments
-
How did you set Tools / Configuration / General / Position display format ?
-
The Position Display Format setting does control this in the Global Mapper application, so you could run Global Mapper on the same machine and change that, then run your SDK application (assuming you didn't use GM_SetRegistryKey to change where the value is found).
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.globalmapper.com -
Hello again,
Thank you for the answer. How can I change the Position Display Format programmatically? Is there a GM function that does that? Because I will need this to be done at every run on every machine even if they have only the sdk available and not the program...
Thank you,
Dana -
Dana,
You can set the DWORD registry key 'HKEY_CURRENT_USER\Software\Global Mapper\PosDisplayFormat' and set the value to zero before loading the SDK. Or if you would prefer I can update the GM_SetMiscOption function to support setting this, or make the existing flag for no lat/lon formatting for CSV export also apply to Simple ASCII text.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.globalmapper.com -
global_mapper wrote: »Dana,
You can set the DWORD registry key 'HKEY_CURRENT_USER\Software\Global Mapper\PosDisplayFormat' and set the value to zero before loading the SDK. Or if you would prefer I can update the GM_SetMiscOption function to support setting this, or make the existing flag for no lat/lon formatting for CSV export also apply to Simple ASCII text.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.globalmapper.com
Hello again,
Thank you for the answer.
I would like if it's possible to be able to set this with GM_SetMiscOption before exporting the vector.
Thank tou very much,
Dana -
Dana,
I have placed a new SDK build at http://www.globalmapper.com/GlobalMapperSDK_latest_beta.zip which allows calling GM_SetMiscOption with a new GM_MiscOpt_PositionDisplayFormat flag and the value GM_POS_LatLonDecimal to set your position format for decimal degrees prior to export.
Thanks,
Mike -
Hello,
Thank you very much for the new SDK build. I have a problem. Even though I have a license (Dynamic Ventures) for using the sdk it gives me this message when trying to run my application.
GlobalMapperInterface
The version of Global Mapper does not support licenses from the license file d:\dev\3rdParty\global_mapper\bin\gmdll_regkey.txt. You need to upgrade your SDK license by contacting gmorders@bluemarblegeo.com.
OK
Thank you,
Dana -
Dana,
I looked it up and you have a v1.xx SDK development license. We sync'd up the SDK versioning with the Global Mapper application (so now at v13.2) and have new licensing now. Please contact gmorders@bluemarblegeo.com to move to the new SDK versions. The new build is a for v13.x SDK licenses (and will be in all future releases).
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.globalmapper.com
Categories
- 12.8K All Categories
- 5.7K Features Discussion
- 345 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 636 GM Script Language
- 54 User Scripts
- 114 GPS Features
- 417 Projection Questions
- 826 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 178 Announcement and News
- 913 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 569 Other Discussion
- 131 GIS Data Sources
- 27 Global Mapper Showcase
- 238 How I use Global Mapper
- 107 Global Mapper Forum Website