Skip to content

Command line parameters

Riccardo Fellegara edited this page Sep 22, 2017 · 2 revisions

The following list of command shows the command lines parameters for using the implemented features in the Terrain Trees library.

The same list can be obtained from the command line running the following command

./terrain_trees

USAGE

./terrain_trees {<-v [kv] -t [kt] -c [crit] -d [div] | -f [tree_file]>
                   -q [op-file | app] -s -noR} | {-g [query-ratio-quantity-type]}
                   -i [mesh_file]
-v [kv]
      kv is the vertices threshold per leaf. This parameter is needed by PR-T and PM-T trees.

-t [kt]
      kt is the triangles threshold per leaf. This parameter is needed by PMR-T and PM-T trees.

-c [crit]
      crit is the criterion type of the index. This can be PR-T tree (pr), PMR-T tree (pmr) and  PM-T tr
      ee (pm).

-d [div]
      div is the division type of the index. This can be quadtree (quad) or kD-tree (kd).

      NOTA: these arguments must be used in conjunction to create an index. This operation generate as
            output a file containing the triangles index.

-f [tree_file]
      reads an spatial index from an input file

      tree_file contains a terrain tree. This file has a fixed syntax of the name that allows to
      recover the informations needed to initialize the tree (i.e., kv, kt, division and criterion types)

      NOTA: you can use -f argument [OR] {-v / -t / -c / -d} accordingly to the chosen criterion.

-q [op-file | app]
      executes a spatialquery 'op'', reading from 'file' the point/box inputs

      'op' can be: point - box - wvt - wtt 
      'point' stands for point location, 
      'box' for box query, 
      'wvt' for windowed VT query and 
      'wtt' for windowed TT query.
      'file' represent the path of the file that contains the inputs for the queries.

      'app' can be: batch - concurv - mccurv - gccurv - slopes - crit - filter 
      'batch' extracts VT and TT relations on the whole mesh, 
      'concurv' extracts the Concentrated Curvature, 
      'mccurv' extracts the Mean CCurvature, 
      'gccurv' extracts the Gaussian CCurvature, 
      'slopes' extracts the slope values for the triangles and edges of the terrain, 
      'crit' extracts the critical points of the terrain,           
      'filter' reads a points cloud generates a PR tree, extracts the multifield of each 2D point 
               and finally outputs both the multifield file and a points cloud file compatible 
               with SpatialHadoop.          

-g [query-ratio-quantity-type]
      generates a given number of input data for a specific query

      query can be: point - box. 'ratio' is a number between 0 and 1, and and represents the percentage 
      of the maximum side of the domain to pick. 'quantity' is a positive number that indicate the 
      number of inputs to generate. type can be: near - rand. 'near' stands for a randomly generated
      point that is near the mesh, while 'rand' stands for a randomly generated point that is 
      inside the domain.

      If 'query' is equal to point 'ratio' must be equal to 0, otherwise 'ratio' must be greater than 0.

-s
      computes the statistics of a tree.

-noR
      disable the procedures that exploits the spatial coherence of the index and the mesh.
      Notice that only spatial queries can be executed on this type of index.

- i [mesh_file]
      reads the mesh_file containing the triangle mesh. The mesh can be in .tri, .off or .soup formats. 
      The .soup format contains a triangulated terrain in which the vertices coordinates are represented
      within each triangle in their star.

-output
      if the application has this feature, save to file the executed analysis.

-vtime
      if the application has this feature, outputs detailed execution timing.

EXAMPLE[1]

./terrain_trees -v 20 -c pr -d quad -s -i mesh.off

First it reads the mesh [mesh.off]. Then, builds a PR-T tree with kv=20 and quadtree subdivision, 
on which it is exploited the spatial coherence of the mesh and index. Finally, it computes the 
index statistics (-s).

EXAMPLE[2]

./terrain_trees -f tree_file -q wvt-boxfile -i mesh.tri

First it reads the mesh [mesh.tri]. Then, it reads the spatial index from .tree file (gathering 
the tree parameters direcly from the file name) and exploits the spatial coherence of the mesh and 
index. Finally, it executes the windowed VT queries, using the boxes into 'boxfile'.

EXAMPLE[3]

./terrain_trees -v 20 -c pr -d quad -q crit -i mesh.soup -output

First it reads the soup [mesh.soup].  Then, it builds a PR-T tree index with kv=20 and with 
quadtree subdivision. As last generation step, it exploits the spatial coherence of the mesh and index. 
Then, it extracts the indexed mesh representation of the soup and it saves that in a .off file. 
Finally, it computes the critical points, outputting them in .vtk files for visualization purposes (-output parameter).
Clone this wiki locally