==== Import and Export Formats: MTG - Multiscale Tree Graph ==== EXAMPLE - Importing and Using MTG data in GroIMP ------------------------------------------------------------------------ **NOTE**: In this example, a .mtg file is already imported and a .rgg file has already been added into the project. Begin at step 1 if you wish to find out how to load a .mtg file into GroIMP. Skip to step 6 if you wish to know how to modify the loaded MTG data in this example project. - Start GroIMP - Click on 'File -> Open'. Select a .mtg file. - A file '-generated.xl' is generated. - 2 files appear in GroIMP's file explorer: -generated.xl .mtg - The naming of standard MTG attributes can be seen in the commented section at the beginning of the generated .xl file. In this case, -generated.xl - To determine if a feature value was specified in the file, use function to return a boolean. E.g. hasXX() hasdist() ... - In the 3D view, select "View -> Scales -> Scale 3". Add a .rgg file - In GroIMP's File Explorer (below the 3D view), click on 'Add File'. - Select '.rgg'. - Click save in GroIMP's text editor view. .rgg should be successfully compiled now. Save as project - In GroIMP's main top menu bar, click File->Save. - Save the project as .gsz file. - Write a method/function (e.g. run() in this example) in the .rgg file to modify the data. - Once the .rgg file is saved and compiled, a new set of modules are generated in the .xl file and compiled. - The nodes in the graph are replaced with the new modules in the .xl file. - Turn "View -> Scales -> Scale X" off and on to refresh the 3D view. (where X is the scale you want to visualize) - Execute the method/function you wrote (e.g. run() in this example) by clicking on the button with the method name. - Move or rotate the 3D view to refresh and visualize the changes you have made. - Open an MTG file - MTG node classes and corresponding GroIMP modules - MTG feature attributes and GroIMP module variables - Visualizing the MTG data - Saving the MTG graph in a GroIMP project - Modifying the loaded MTG graph