Global Mapper Pro

Possible to export to Vulcan Elevation? (.00t)

James Cox
James Cox Global Mapper UserTrusted User
edited July 2013 in SDK
Hi Mike,

In our app we currently combine elevations and export to GeoTIFF.
What we would like to add now is the option to export to a VulcanTriangulation instead.

Is this possible in the SDK?

Thanks,
James

Comments

  • global_mapper
    global_mapper Administrator
    edited July 2013
    James,

    I have added a new GM_Export_Vulcan_TIN format for the GM_ExportElevation function. I have placed a new SDK build with this change at http://www.globalmapper.com/GlobalMapperSDK_v14_latest_beta.zip for you to try.

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
  • James Cox
    James Cox Global Mapper User Trusted User
    edited July 2013
    Thanks Mike, that worked beautifully.

    After I export the combined layers into a file I have a little picture in my app that displays to the user a preview.
    It isn't vital that this works for Vulcan Triangulations as well, but it would be nice to if possible. Currently only a black square is displayed when I would expect to to look roughly the same as a GeoTIFF generated by the same method?
    IntPtr worldBounds = IntPtr.Zero;

    GM_LayerInfo_t info = new GM_LayerInfo_t();
    IntPtr infoPtr = GM_GetLayerInfo(layerHandle);
    var optionsPtr = GM_GetVerticalDisplayOptions();
    var options = (GM_VerticalDisplayOptions_t)Marshal.PtrToStructure(optionsPtr, typeof(GM_VerticalDisplayOptions_t));
    options.mShaderName = "Gradient Shader";
    GM_SetVerticalDisplayOptions(ref options);

    info = (GM_LayerInfo_t)Marshal.PtrToStructure(infoPtr, typeof(GM_LayerInfo_t));

    GM_Rectangle_t bounds = new GM_Rectangle_t();
    bounds.mMaxX = info.mGlobalRect.mMaxX;
    bounds.mMinX = info.mGlobalRect.mMinX;
    bounds.mMaxY = info.mGlobalRect.mMaxY;
    bounds.mMinY = info.mGlobalRect.mMinY;

    worldBounds = Marshal.AllocHGlobal(Marshal.SizeOf(bounds));
    Marshal.StructureToPtr(bounds, worldBounds, true);

    _error = GM_DrawLayer(hDc, layerHandle, worldBounds, 0, 0, width, height);

    CheckError();
Sign In or Register to comment.