Global Mapper v25.0

Hello

dana5dana
dana5dana Global Mapper UserTrusted User
edited August 2012 in SDK
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

Comments

  • MikeC
    MikeC Global Mapper User Trusted User
    edited August 2012
    How did you set Tools / Configuration / General / Position display format ?
  • global_mapper
    global_mapper Administrator
    edited August 2012
    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
  • dana5dana
    dana5dana Global Mapper User Trusted User
    edited August 2012
    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
  • global_mapper
    global_mapper Administrator
    edited August 2012
    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
  • dana5dana
    dana5dana Global Mapper User Trusted User
    edited August 2012
    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
  • global_mapper
    global_mapper Administrator
    edited August 2012
    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
  • dana5dana
    dana5dana Global Mapper User Trusted User
    edited August 2012
    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
  • global_mapper
    global_mapper Administrator
    edited August 2012
    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