GDAL

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

gnm_priv.h
1 /******************************************************************************
2 * $Id$
3 *
4 * Project: GDAL/OGR Geography Network support (Geographic Network Model)
5 * Purpose: GNM private and internal declarations.
6 * Authors: Mikhail Gusev (gusevmihs at gmail dot com)
7 * Dmitry Baryshnikov, polimax@mail.ru
8 *
9 ******************************************************************************
10 * Copyright (c) 2014, Mikhail Gusev
11 * Copyright (c) 2014-2015, NextGIS <info@nextgis.com>
12 *
13 * Permission is hereby granted, free of charge, to any person obtaining a
14 * copy of this software and associated documentation files (the "Software"),
15 * to deal in the Software without restriction, including without limitation
16 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 * and/or sell copies of the Software, and to permit persons to whom the
18 * Software is furnished to do so, subject to the following conditions:
19 *
20 * The above copyright notice and this permission notice shall be included
21 * in all copies or substantial portions of the Software.
22 *
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29 * DEALINGS IN THE SOFTWARE.
30 ****************************************************************************/
31
32 #ifndef GNM_PRIV
33 #define GNM_PRIV
34
35 #include "gdal_priv.h"
36
37 /* -------------------------------------------------------------------- */
38 /* Common constants for internal use */
39 /* -------------------------------------------------------------------- */
40
41 // General constants.
42 #define GNM_VERSION "1.0"
43 #define GNM_VERSION_NUM 100 //major * 100 + minor
44
45 // Obligatory system layers.
46 #define GNM_SYSLAYER_META "_gnm_meta"
47 #define GNM_SYSLAYER_GRAPH "_gnm_graph"
48 #define GNM_SYSLAYER_FEATURES "_gnm_features"
49
50 // System field names.
51 // FORMAT NOTE: Shapefile driver does not support field names more than 10
52 // characters.
53
54 #define GNM_SYSFIELD_PARAMNAME "key"
55 #define GNM_SYSFIELD_PARAMVALUE "val"
56 #define GNM_SYSFIELD_SOURCE "source"
57 #define GNM_SYSFIELD_TARGET "target"
58 #define GNM_SYSFIELD_CONNECTOR "connector"
59 #define GNM_SYSFIELD_COST "cost"
60 #define GNM_SYSFIELD_INVCOST "inv_cost"
61 #define GNM_SYSFIELD_DIRECTION "direction"
62 #define GNM_SYSFIELD_GFID "gnm_fid"
63 #define GNM_SYSFIELD_LAYERNAME "ogrlayer"
64 #define GNM_SYSFIELD_BLOCKED "blocked"
65 #define GNM_SYSFIELD_PATHNUM "path_num"
66 #define GNM_SYSFIELD_TYPE "ftype"
67
68 // Rule strings key-words.
69 #define GNM_RULEKW_CONNECTS "CONNECTS"
70 #define GNM_RULEKW_WITH "WITH"
71 #define GNM_RULEKW_VIA "VIA"
72 #define GNM_RULEKW_ALLOW "ALLOW"
73 #define GNM_RULEKW_DENY "DENY"
74 #define GNM_RULEKW_ANY "ANY"
75
76 // Graph constants
77 #define GNM_EDGE_DIR_BOTH 0 // bidirectional
78 #define GNM_EDGE_DIR_SRCTOTGT 1 // from source to target
79 #define GNM_EDGE_DIR_TGTTOSRC 2 // from target to source
80
81 #define GNM_BLOCK_NONE 0x0000 // no blocking (vertex or edge)
82 #define GNM_BLOCK_SRC 0x0001 // the source vertex is blocked
83 #define GNM_BLOCK_TGT 0x0002 // the target vertext is blocked
84 #define GNM_BLOCK_CONN 0x0004 // the connection edge is blocked
85 #define GNM_BLOCK_ALL GNM_BLOCK_SRC | GNM_BLOCK_TGT | GNM_BLOCK_CONN
86
87
88 // Other string constants.
89 #define GNM_SRSFILENAME "_gnm_srs.prj"
90
91 // Alias for some big data type to store identificators.
92 #define GNMGFID GIntBig
93 // Corespondent datatype for identificator
94 // (i.e. int -> OFTInteger -> GetFieldAsInteger and
95 // GUIntBig -> OFTInteger64 -> GetFieldAsInteger64)
96 #define GNMGFIDInt OFTInteger64
97 #define GetFieldAsGNMGFID GetFieldAsInteger64
98 #define GNMGFIDFormat CPL_FRMT_GIB
99
100 #endif // GNM_PRIV
101
gdal_priv.h
C++ GDAL entry points.

Generated for GDAL by 1.8.8.