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

James CoxJames Cox Global Mapper UserPosts: 20Trusted 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_mapperglobal_mapper Administrator Posts: 17,238
    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 CoxJames Cox Global Mapper User Posts: 20Trusted 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.