Global Mapper v26.0

LoadGenericAsciiTextLayer

Osei
Osei Global Mapper UserTrusted User
edited July 2008 in SDK
I have an elevation text file that has x,y,z values that is in a custom format. The first line is however a header file that I don't want included. If I try to open the file, a dialog appears. It has three import types , Points, Vector and Elevation. There is also a checkbox to specify if the first row is a header or not. If I select Points, this checkbox is enabled and if I choose Elevation, the checkbox becomes disabled yet I want to set it to false. If I go ahead anyway, the layer is not loaded correctly. If I put in my own AsciiFormatOptions with the settings I want, something is exported which is not really right and if I try to open it with the GM9 application, it takes 2GB RAM and more than 10 mins (exact time unknown as I kill the process after 10 mins) to load.
what AsciiFormatOptions do I use to get it right?

I just realized that if I have an .xyz file, the same thing happens.

formatInfo.mCoordDelim = GM_AsciiCoordDelim_t8.GM_AsciiDelim_AutoDetect;
formatInfo.mImportType = GM_AsciiImportType_t8.GM_AsciiImport_Elevation;
formatInfo.mScaleX = 1.0;
formatInfo.mScaleY = 1.0;
formatInfo.mScaleZ = 1.0;
formatInfo.mColumnsToSkip = 0;
formatInfo.mYCoordFirst = false;
formatInfo.mIncludeElevCoords = true;
formatInfo.mCoordLinePrefix = "";

The others naturally go to default if not assigned.
Thanks in advance

Comments

  • global_mapper
    global_mapper Administrator
    edited July 2008
    If loading with the SDK you can set the formatInfo.mColumnHeadersInFirstRow values to true to skip the first line in the file for gridded elevation import.

    How large is your file and can you provide a sample of the first few lines so that I can see that you have the import set up correctly?

    What version of Global Mapper are you using to import the file where it takes that much memory? Make sure that you have the latest release (v9.03).

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Osei
    Osei Global Mapper User Trusted User
    edited July 2008
    I have overriden the dialog so I am using the formatoptions in order not to confuse users.

    Thanks