grasslib.dox 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. /*! \mainpage GRASS 7 Programmer's Manual
  2. <!-- * doxygenized from "GRASS 5 Programmer's Manual"
  3. by M. Neteler 2/2004
  4. * updated 8/2005, 2006, 2007, 2008
  5. -->
  6. <h2>GRASS 7 Programmer's Manual</h2>
  7. <a href="http://grass.osgeo.org">GRASS GIS</a> (Geographic Resources
  8. Analysis Support System) is an open source, Free Software
  9. <em>Geographical Information System</em> (GIS) with raster,
  10. topological %vector, image processing, and graphics production
  11. functionality that operates on various platforms through a graphical
  12. user interface (GUI) or command line interface (CLI). It is released under GNU
  13. General Public License (GPL).
  14. This manual introduces the reader to the <i>Geographic Resources Analysis
  15. Support System</i> from the programming perspective. Design theory, system
  16. support libraries, system maintenance, and system enhancement are all
  17. presented. Standard GRASS 4.x conventions are still used in much of the
  18. code. This work is part of ongoing research being performed by the
  19. <a href="http://grass.osgeo.org/community/team.php">GRASS Development Team</a>,
  20. an international team of programmers,
  21. GRASS module authors are cited within their module's source code and the
  22. contributed manual pages.
  23. &copy; 2000-2008 Markus Neteler / GRASS Development Team<br>
  24. Published under GNU Free Documentation License (GFDL)
  25. http://www.fsf.org/copyleft/fdl.html
  26. This manual comes with ABSOLUTELY NO WARRANTY. The development of GRASS
  27. software and this manual is kindly supported by the
  28. <a href="http://www.osgeo.org">Open Source Geospatial Foundation</a>,
  29. who provides the GRASS main infrastructure.
  30. Main web site: <a href="http://grass.osgeo.org">http://grass.osgeo.org</a>
  31. <P>
  32. <I>Missing entries below are either not yet uploaded to SVN (need to be migrated
  33. from GRASS 5 Programmer's manual) or are simply undocumented.</I>
  34. <P>
  35. <I>PLEASE UPDATE FOR GRASS 7</I>
  36. <h3>Principal library</h3>
  37. (the name refers to the directory name in lib/ in the source code)
  38. <ul>
  39. <li>gis: \ref gislib, with following subsection -
  40. <ul>
  41. <li> \ref gisrasterlib
  42. <li> \ref gisvectorlib
  43. <li> Sites File Processing (legacy, merged into \ref gisvectorlib)
  44. </ul>
  45. </ul>
  46. <h3>Further libraries</h3>
  47. (the name refers to the directory name in lib/ in the source code)
  48. <ul>
  49. <li>arraystats: Library of statistics for arrays of doubles - \ref arraystats (new, under development)
  50. <li>bitmap: Bitmap library for X Window Bitmaps - \ref bitmap
  51. <li>btree: Binary tree library - \ref btree
  52. <li>cairodriver: \ref cairodriver
  53. <li>cdhc: Library for testing normality and exponentiality - \ref cdhc
  54. <li>cluster: Library for cluster analysis (image processing) - \ref cluster
  55. <li>datetime: DateTime library - \ref datetime
  56. <li>db: \ref dbmilib
  57. <li>display: \ref displaylib
  58. <li>%driver: Graphics monitor driver
  59. <li>dspf: DSPF libary - \ref dspf (obsolete?)
  60. <li>edit: Raster edit library (cellhd, history, cats) - \ref edit
  61. <li>external: External libraries from other projects (such as shapelib or bwidget) - \ref external
  62. <li>fonts: Hershey library - \ref fonts
  63. <li>form: TCL/TK forms library - \ref form (obsolete?)
  64. <li>g3d: \ref g3dlib
  65. <li>gmath: \ref gmathlib (generic mathematical functions and BLAS/LAPACK library wrapper)
  66. <li>gpde: \ref gpdelib (partial differential equations library)
  67. <li>gtcltk: Tcl/Tk stuff - \ref gtcltk
  68. <li>imagery: \ref imagerylib
  69. <li>init: \ref init (GRASS initialization code + scripts)
  70. <li>linkm: Linked list memory manager - \ref linkm (obsolete?)
  71. <li>ogsf: \ref ogsflib (OpenGL (R) ported gsurf library (required for NVIZ))
  72. <li>pngdriver: PNG display driver library - \ref pngdriver
  73. <li>proj: \ref projlib (wrapper to PROJ4 projection library)
  74. <li>psdriver: PostScript display driver library - \ref psdriver
  75. <li>raster: \ref rastergraphicslib (note: raster map functions are in \ref gislib)
  76. <li>rowio: Raster row in/out library - \ref rowio
  77. <li>rst: Library for interpolation with regularized splines with tension - \ref rst
  78. <li>segment: \ref segmentlib (segment library for segmented raster reading)
  79. <li>sites: Old Sites library, now interfaced to \ref Vector_Library - \ref sites
  80. <li>stats: Raster stats library - \ref stats
  81. <li>symbol: Drawing symbols for %point %vector data library - \ref symbol
  82. <li>vask: Cursor management library - \ref vask
  83. <li>%vector: \ref Vector_Library (GRASS Vector and Direct Graph Library)
  84. <ul>
  85. <li>vedit: \ref Vedit_Library - %vector editing
  86. </ul>
  87. <li>nviz: \ref nvizlib (used by wxGUI Nviz extension and CLI-based Nviz module)
  88. </ul>
  89. <!--<li>image3: extra imagery library (mainly still unused) - \ref image3lib-->
  90. <!--<li>D: display library - \ref d_displaylib-->
  91. <!--<li>front.end: interface for interactive modules library - \ref frontend-->
  92. <h3>Interfaces</h3>
  93. <ul>
  94. <li> GRASS SWIG interface <a href="../../swig/html/index.html">see here</a>.
  95. </ul>
  96. <h3>File structure of GRASS Location</h3>
  97. A GRASS <b>raster map</b> consists of several files in several subdirectories in a mapset,
  98. organized as follows:
  99. <ul>
  100. <li> <b>cellhd/</b>:
  101. map header including projection code, coordinates representing
  102. the spatial extent of the raster map, number of rows and columns, resolution,
  103. and information about map compression;</li>
  104. <li> <b>cell/, fcell/ or grid3/</b>:
  105. generic matrix of values in a compressed, portable
  106. format which depends on the raster data type (integer, floating %point or 3D grid);</li>
  107. <li> <b>hist/</b>:
  108. history file which contains metadata such as the data source,
  109. the command that was used to generate the raster map, or
  110. other information provided by the user;</li>
  111. <li> <b>cats/</b>:
  112. optional category file which contains text or numeric labels assigned
  113. to the raster map categories;</li>
  114. <li> <b>colr/</b>:
  115. optional color table;</li>
  116. <li> <b>cell_misc/</b>:
  117. optional timestamp, range of values, quantization rules (for floating %point maps)
  118. and null (no-data) files; </li>
  119. </ul>
  120. A GRASS <b>%vector maps</b> are stored in several separate files in a single
  121. directory. While the attributes are stored in either a DBF file, a SQLite file
  122. or in an external DBMS (PostgreSQL, MySQL, ODBC), the geometric data are saved
  123. as follows:
  124. <ul>
  125. <li><b>head</b>: %vector map ASCII header with information about the map creation
  126. (date and name), its scale and threshold;</li>
  127. <li><b>coor</b>: binary geometry file which includes the coordinates of graphic
  128. elements (primitives) that define the %vector feature;</li>
  129. <li><b>topo</b>: binary topology file describes the spatial relationships between the
  130. map's graphic elements;</li>
  131. <li><b>hist</b>: history ASCII file with complete commands that were used to
  132. create the %vector map, as well as the name and date/time of the map
  133. creation;</li>
  134. <li><b>cidx</b>: binary category index file which is used to %link the %vector
  135. object IDs to the attribute table rows;</li>
  136. <li><b>dbln</b>: ASCII file which contains definition(s) of %link to attribute
  137. storage in database (DBMS).</li>
  138. </ul>
  139. \image html "loc_struct.png" "Diagram of GRASS file structure"
  140. */