Нефть и песок О стали Компрессор - подбор и ошибки Из истории стандартизации резьб Соперник ксерокса - гектограф Новые технологии производства стали Экспорт проволоки из России Прогрессивная технологическая оснастка Цитадель сварки с полувековой историей Упрочнение пружин Способы обогрева Назначение, структура, характеристики анализаторов Промышленные пылесосы Штампованные гайки из пружинной стали Консервация САУ Стандарты и качество Технология производства Водород Выбор материала для крепежных деталей Токарный резец в миниатюре Производство проволоки Адгезия резины к металлокорду Электролитическое фосфатирование проволоки Восстановление корпусных деталей двигателей Новая бескислотная технология производства проката Синие кристаллы Автоклав Нормирование шумов связи Газосварочный аппарат для тугоплавких припоев
Главная --> Промиздат -->  Map principle 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 ( 90 ) 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127


The line $(HOME)/$(PGM) . . . and the following line contain compiler instructions. Above this line several variables are set which contain library names, the name of this GRASS module and the target directory for storing the compiled code. Numerous variables used here are pre-defined in:

src/CMD/head/head.$ARCH

The variable $arch is extended by the name of the systems architecture on which GRASS is compiled (e.g. head.i686-pc-linux-gnu). This head file is created depending on the platform by configure script, which has to be run before a first compilation of GRASS. It contains information related to the compiler, paths to local libraries and include files etc. The other internal variables are defined in

src/CMD/generic/make.mid

These settings should be kept unchanged.

It is a good programming practice to subdivide a C program (here a GRASS module) into several files, organized by functionality. All these files have to be listed in the objects list in the Gmakefile. GRASS GIS library commands can be used in the source code when the code is linked against the related libraries. A short example of a raster module (file main.c):

* nis program is Free Software under the GNU GPL (>=v2).

* Conversion of lANDSAT-TMS DNs to at-sensor radiances */

♦include <stdio.h> ♦include <string.h> ♦include <math.h> ♦include gis.h








The calculation is done row-wise and column-wise (see for loop). This draft program illustrates only the general structure of GRASS code, for copyright reasons it is not a real GRASS program. Please refer to the GRASS source code for the real world implementations.

Future of GRASS programming. At the time of writing this book an initial GRASS 5.7 version providing the new 2D/3D vector engine was published.

The developments for GRASS 5.3 will be shifted to GRASS 5.7. Migration of the code to the new code repository will be accompanied by a major code cleanup. Besides a more standardized code structure the code spread in various modules will be organized into new library functions. Existing library functions will be examined for consistency, and if needed, functions performing similar tasks will be merged. Also, at the module level, merging of modules with similar functionality will be done. In general the goal is to provide a well defined, layered GRASS model with GRASS-Core, providing all library functions, GRASS-Base, providing basic modules for importing, exporting, displaying and basic manipulation of spatial data sets and extended GRASS packages including specialized add-on packages for image processing, hydro-logic modeling, volume data management and analysis, etc.

GRASS intends to be a general purpose GIS. The new GRASS 5.7 version is a major step to develop a reliable, intuitive to use, flexible GIS in terms of Free Software. Skilled users are invited to participate in its further development.

NOTES

1 CVS software, http: www.cvshome.org

2 GRASS Tutorials Web site, http: mpa.itc.it/grasstutor/

3 SlideLinks - GRASS Web server, http: gisws.media.osaka-cu.ac.jp/slidelinks/



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 ( 90 ) 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127