User Tools

Site Tools


user-manual:ch02s05

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

user-manual:ch02s05 [2024/04/12 11:31] – created gaetanuser-manual:ch02s05 [2024/04/29 15:18] (current) – removed gaetan
Line 1: Line 1:
-==== 2.5. 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 '<name of MTG file selected>-generated.xl' is generated. 
- 
-- 2 files appear in GroIMP's file explorer: 
- 
-<name of MTG file selected>-generated.xl 
- 
-<name of MTG file selected>.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, <name of MTG file selected>-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 '<name of RGG file selected>.rgg'. 
- 
-- Click save in GroIMP's text editor view. <name of RGG file selected>.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 
user-manual/ch02s05.1712914264.txt.gz · Last modified: 2024/04/12 11:31 by gaetan