Global Mapper v25.0

Chart spanning dateline

hapakam
hapakam Global Mapper User
edited August 2012 in SDK
I am using GM_DrawLayerListToMemory from the SDK to retrieve charts that I have loaded. My current projection setup is
projection.mProjSys = GM_PRJ_GEO; projection.mDatum = GM_DATUM_WGS_84;
projection.mUnit = GM_PRJ_UNIT_ARC_DEGREES;

Is there an attribute that I can set that will make the GM_DrawLayerListToMemory give me a chart image that spans the international dateline? Right now no matter what I set I get a map centered around the prime_meridian.

Comments

  • global_mapper
    global_mapper Administrator
    edited July 2012
    Yes, add a parameter to your projection definition for the desired location to center your map on. For example to center it on -180, use the following:

    projection.mAttrList[0].mAttr = CENTRAL_LONGITUDE;
    projection.mAttrList[0].mValue = -180.0;
    projection.mNumAttrs = 1;

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • hapakam
    hapakam Global Mapper User
    edited August 2012
    I'm noticed that when I use the projection above and display the entire world I get odd banding issues. where sometimes the continent is blue and the water is white.

    Banding image:
    Banding.jpg
    Expected Image:
    Normal.jpg
  • global_mapper
    global_mapper Administrator
    edited August 2012
    Which version of the SDK do you have? There have been improvements over the last year or so to the display of vector features that cross the discontinuity point of a lat/lon projection. Also make sure that you haven't set the GM_MiscOpt_DontCropAtATM option with the GM_SetMiscOption call.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • hapakam
    hapakam Global Mapper User
    edited August 2012
    13.2 (May 2012) and I don't currently ever call the GM_MiscOptions, so that shouldn't be set. Is there any way to tell if that option has been set by any other function call if that is even possible?
  • global_mapper
    global_mapper Administrator
    edited August 2012
    The GM_SetMiscOption function returns the old value of the option, so you could call it and check the return. If you didn't set GM_SetRegistryKey at startup options like that in your app will be shared with any GM installation on the same machine, so it's possible it could have been turned off there as well.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • hapakam
    hapakam Global Mapper User
    edited August 2012
    The GM_MiscOpt_DontCropAtATM wasn't set, and I have specifically disabled it just in case and I still get the same results. I also seem similar banding even when I am not spanning the dateline, but when I am zoomed in to a specific area in the world. We have GlobalMapper 12 in our office as well and the banding seems to occur if a DNC browse file is loaded.
    BandingZoomedArea.jpg
  • global_mapper
    global_mapper Administrator
    edited August 2012
    Is this only on the DNC browse file? This sounds familiar (I'm on the road now and don't have any of those files handy) with these particular files. Did you change the projection on the Projection tab of the Configuration dialog in v12 to have the new central meridian? Can you try in the latest (v13.2.2) trial from the links below and see if it has the same issue?

    32-bit: http://www.globalmapper.com/downloads/global_mapper_setup.exe
    64-bit: http://www.globalmapper.com/downloads/global_mapper_setup_64bit.exe

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • hapakam
    hapakam Global Mapper User
    edited August 2012
    I'm not sure if it only happens when using the DNC browse file, but I suspect so. It only seems to happen when I am zoomed out and viewing entire countries. Once I go to a smaller area then the problem seems to disappear. I did try it with the 13.2.2 and once I set the CENTRAL_LONGITUDE to something other than 0, I start to get the banding issue.
  • global_mapper
    global_mapper Administrator
    edited August 2012
    Do you have any DNC browse files you could provide? I thought I had some but couldn't find any. You could also load one and export it to a Global Mapper Package file and just provide that if it's easier.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • hapakam
    hapakam Global Mapper User
    edited August 2012
    I don't think I'm allowed to redistribute what we have. Is there any other way? Thanks.
  • global_mapper
    global_mapper Administrator
    edited August 2012
    I presume the overview map isn't classified in any way since it's so low res. Is it possible for you to load that in GM and export to a Global Mapper package file, then send me that so I can see what's different? Some problem specific to the overview maps and how they setup their geometry sounds familiar, but I can't recall the specifics and since it was just the overview maps that no one typically uses no one cared at the time.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com