Add gridding as a script function

Mike Kling
Mike Kling Global Mapper User
edited January 2008 in Suggestion Box
I currently handle jobs that have hundreds to thousands of tiles. I'm currently working a job that has tiles of breaklines and mass points in DGN format. To get a decent grid, I have to load the DGN then goto 'tools'->'control center'->highlight and right click the layer->select 'create grid'. And there is no way to do this in scripting.

My current work around using scripting is to load the DGN, export a simple ascii, unload all layers, load the simple ascii I just made using the 'elevation grid' option, (at least using scripting I can specify resolution), and then export a geotiff. The geotiff looks ugly because this option doesn't support breaklines, it just uses the vetices in the lines as individual points. I wrote a simple PowerBasic program that can take the exported XYZ file and insert additional vertices between any line vertices that are more than n units apart (up to five additional vertices depending on the distance between the original vertices). I then can load that enhanced xyz file and make better grids, but still not quite as good as what results from the original DGN file.

Any way, if you can add this function to scripting, it would make things a lot easier. As more and more lidar sets also contain breaklines, this would help those projects also.

Comments

  • global_mapper
    global_mapper Administrator
    edited January 2008
    I agree, now that breaklines are supported something like this needs to be in the scripting language as well as there is not a workaround. I will add a new command to do this and then point you at a new build when it is ready (likely in the next few days).

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • global_mapper
    global_mapper Administrator
    edited January 2008
    I have completed adding a new GENERATE_ELEV_GRID command to the scripting language which allows you to generate a new elevation grid from loaded 3D vector layers (like your DGN) file. Here is a small sample which grids loaded data:


    // Generate the elevation grid
    GENERATE_ELEV_GRID ELEV_UNITS=METERS LAYER_DESC="ALTI GRID" \
    GRID_USE_CONSTRAINTS=YES GRID_FLATTEN_AREAS=YES

    I can provide the full documentation for the new command if you want, although I suspect this is all that you will need.

    I have placed a new build at http://www.globalmapper.com/global_mapper9.zip with the change for you to try. Simply download that file and extract the contents into your existing v9.xx installation folder to give it a try.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com