Global Mapper v25.0

GM_SaveWorkspace and projections

Yann DUPUY
Yann DUPUY Global Mapper UserTrusted User
edited March 2012 in SDK
Hello,

In GlobalMapper (desktop application), additionnal projection information is kept when saving the workspace.
But with the SDK, I can not have the GM_SaveWorkspace function save these additionnal pieces of information.

Basically, when I load a GeoTiff which is not fully georeferenced, the GlobalMapper SDK asks for projection specification. Using GM_SetQueryProjectionCallback I can save the user specified projection and store it into the GM_LayerInfo_t of the Geotiff's layer with something like ::memcpy(&savedProjection, &layerInfo->mNativeProj, sizeof(GM_Projection_t)). But when I look at the script file generated with GM_SaveWorkspace, there is no sign of that projection in my layer.

What am I doing wrong ? Is there any other solution than (re)openning the script file and adding the required "DEFINE_PROJ" and "PROJ_NAME" lines by myself ?

Thanks for helping,
Yann

Comments

  • global_mapper
    global_mapper Administrator
    edited March 2012
    Yann,

    I have updated the SDK so if you set the projection with a query projection callback then that projection should be saved to a workspace. I have placed a new SDK build with the change at http://www.globalmapper.com/GlobalMapperSDK_latest_beta.zip for you to try.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • Yann DUPUY
    Yann DUPUY Global Mapper User Trusted User
    edited March 2012
    Yann,

    I have updated the SDK so if you set the projection with a query projection callback then that projection should be saved to a workspace. I have placed a new SDK build with the change at http://www.globalmapper.com/GlobalMapperSDK_latest_beta.zip for you to try.

    Mike,
    I downloaded and tested this SDK build. Of course, it works has expected!
    The DLL seems *much* slower (I tested import and 2D display), and I hope it is only a matter of not optimized/debug build.

    I have two other questions:
    - when do you expect to officially release the SDK I tried ?
    - I bought my developper license with 1.34 build of the SDK. Is my license valid for any further builds ?
  • global_mapper
    global_mapper Administrator
    edited March 2012
    I would not expect the new SDK to be slower. Which operation in particular was slower? What type of data are you loading?

    We are planning to officially release the new SDK (v13.1) in a week or two, but there will be some licensing changes as we are moving to a new licensing system for the SDK. Please contact gmorders@bluemarblegeo.com for details.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • Yann DUPUY
    Yann DUPUY Global Mapper User Trusted User
    edited March 2012
    I would not expect the new SDK to be slower. Which operation in particular was slower? What type of data are you loading?

    I ran a few test, by loading and displaying data.
    I notice no real difference for planimetry.
    The photography seems to load very small bit slower than with my 1.34 DLL, hardly noticeable though.
    The big difference is about a DTED file:




    1.34 DLL

    Test DLL



    Load file (time before display)

    1 s

    5-6 s



    Return focus

    <1 s

    4-5 s



    Zoom (time before display)

    1.5 s

    7.5 s




    From these figures, I have a 5 times factor slow down. With another SRTM altimetry file, I don't get such results. I can not send the involved DTED file as attachement (invalid file ?), but I can send it upon request for further testing.
    We are planning to officially release the new SDK (v13.1) in a week or two, but there will be some licensing changes as we are moving to a new licensing system for the SDK. Please contact gmorders@bluemarblegeo.com for details.

    Ok, I'll contact them, hoping it will be easier than getting a runtime price for the DLL... ;)

    Thanks,
    Yann DUPUY
  • global_mapper
    global_mapper Administrator
    edited March 2012
    Yann,

    If you can zip up the file you should be able to attach it here, otherwise you can send it to gmsupport@bluemarblegeo.com.

    It doesn't look like the DTED load and access has changed since 2006, which is way before v1.34, so I'm not sure what might be going on. If I can reproduce the issue though I should be able to sort it out pretty quick.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • Yann DUPUY
    Yann DUPUY Global Mapper User Trusted User
    edited March 2012
    Yann,

    If you can zip up the file you should be able to attach it here, otherwise you can send it to gmsupport@bluemarblegeo.com.

    Here comes the file.
    It doesn't look like the DTED load and access has changed since 2006, which is way before v1.34, so I'm not sure what might be going on. If I can reproduce the issue though I should be able to sort it out pretty quick.

    It might also come from my code... or the truth might be elsewhere.

    Thanks,
    Yann
  • global_mapper
    global_mapper Administrator
    edited March 2012
    Yann,

    Can you try using the sample application of the SDK? When I load your .zip file in that it loads right up and displays almost instantly, probably less than 1s for the entire load and display operation.

    Can you see how long the actual calls into the SDK are taking in your application?

    Thanks,

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