Global Mapper v25.0

Export to DEM from contour shape files

mcb9060
mcb9060 Global Mapper UserTrusted User
edited November 2009 in Elevation Data
Hi, I was wondering if it is possible to write a script that that can sequentially open large shape files with contour lines in a directory (over 100Mb per file), define the elevation values from the attribute field, use the "Create elevation Grid from 3D Vector data..." function in the Overlay Control Centre and then export the resultant DEM to a file with a 10km grid and so to the next file...

I have also tried to save the workspace and I get a message "The following errors were encountered saving the workspace: ERROR: Unexpected error embedding overlay data."

Is there something that I am doing incorrectly?

Thanks

Mark

Comments

  • global_mapper
    global_mapper Administrator
    edited November 2009
    Mark,

    Yes, you can do that with a script using the DIR_LOOP_START...DIR_LOOP_END pair to loop over the files. Inside the loop, use IMPORT to load the Shapefile and the ELEV_FIELD parameter to specify what attribute to use for elevations. Once the data is loaded, use the GENERATE_ELEV_GRID script command to create the elevation grid, then EXPORT_ELEVATION to create a new DEM, and finally UNLOAD_ALL to unload everything.

    See the Scripting Reference at http://globalmapper.com/helpv11/ScriptReference.html for details and examples.

    You may be running out of memory trying to save the workspace.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • mcb9060
    mcb9060 Global Mapper User Trusted User
    edited November 2009
    Thanks very much Mike, I was almost certain that it was possible using GM scripting, will try it out now.

    Thanks again for such a fast response.

    Mark