|
GDAL
|
00001 /****************************************************************************** 00002 * $Id: gnm_priv.h 36302 2016-11-19 16:54:08Z bishop $ 00003 * 00004 * Project: GDAL/OGR Geography Network support (Geographic Network Model) 00005 * Purpose: GNM private and internal declarations. 00006 * Authors: Mikhail Gusev (gusevmihs at gmail dot com) 00007 * Dmitry Baryshnikov, polimax@mail.ru 00008 * 00009 ****************************************************************************** 00010 * Copyright (c) 2014, Mikhail Gusev 00011 * Copyright (c) 2014-2015, NextGIS <info@nextgis.com> 00012 * 00013 * Permission is hereby granted, free of charge, to any person obtaining a 00014 * copy of this software and associated documentation files (the "Software"), 00015 * to deal in the Software without restriction, including without limitation 00016 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00017 * and/or sell copies of the Software, and to permit persons to whom the 00018 * Software is furnished to do so, subject to the following conditions: 00019 * 00020 * The above copyright notice and this permission notice shall be included 00021 * in all copies or substantial portions of the Software. 00022 * 00023 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00024 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00025 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 00026 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00027 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 00028 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 00029 * DEALINGS IN THE SOFTWARE. 00030 ****************************************************************************/ 00031 00032 #ifndef GNM_PRIV 00033 #define GNM_PRIV 00034 00035 #include "gdal_priv.h" 00036 00037 /* -------------------------------------------------------------------- */ 00038 /* Common constants for internal use */ 00039 /* -------------------------------------------------------------------- */ 00040 00041 // General constants. 00042 #define GNM_VERSION "1.0" 00043 #define GNM_VERSION_NUM 100 //major * 100 + minor 00044 00045 // Obligatory system layers. 00046 #define GNM_SYSLAYER_META "_gnm_meta" 00047 #define GNM_SYSLAYER_GRAPH "_gnm_graph" 00048 #define GNM_SYSLAYER_FEATURES "_gnm_features" 00049 00050 // System field names. 00051 // FORMAT NOTE: Shapefile driver does not support field names more than 10 00052 // characters. 00053 00054 #define GNM_SYSFIELD_PARAMNAME "key" 00055 #define GNM_SYSFIELD_PARAMVALUE "val" 00056 #define GNM_SYSFIELD_SOURCE "source" 00057 #define GNM_SYSFIELD_TARGET "target" 00058 #define GNM_SYSFIELD_CONNECTOR "connector" 00059 #define GNM_SYSFIELD_COST "cost" 00060 #define GNM_SYSFIELD_INVCOST "inv_cost" 00061 #define GNM_SYSFIELD_DIRECTION "direction" 00062 #define GNM_SYSFIELD_GFID "gnm_fid" 00063 #define GNM_SYSFIELD_LAYERNAME "ogrlayer" 00064 #define GNM_SYSFIELD_BLOCKED "blocked" 00065 #define GNM_SYSFIELD_PATHNUM "path_num" 00066 #define GNM_SYSFIELD_TYPE "ftype" 00067 00068 // Rule strings key-words. 00069 #define GNM_RULEKW_CONNECTS "CONNECTS" 00070 #define GNM_RULEKW_WITH "WITH" 00071 #define GNM_RULEKW_VIA "VIA" 00072 #define GNM_RULEKW_ALLOW "ALLOW" 00073 #define GNM_RULEKW_DENY "DENY" 00074 #define GNM_RULEKW_ANY "ANY" 00075 00076 #define GNM_BLOCK_NONE 0x0000 // no blocking (vertex or edge) 00077 #define GNM_BLOCK_SRC 0x0001 // the source vertex is blocked 00078 #define GNM_BLOCK_TGT 0x0002 // the target vertext is blocked 00079 #define GNM_BLOCK_CONN 0x0004 // the connection edge is blocked 00080 #define GNM_BLOCK_ALL GNM_BLOCK_SRC | GNM_BLOCK_TGT | GNM_BLOCK_CONN 00081 00082 // Other string constants. 00083 #define GNM_SRSFILENAME "_gnm_srs.prj" 00084 00085 // Corespondent datatype for identificator 00086 // (i.e. int -> OFTInteger -> GetFieldAsInteger and 00087 // GUIntBig -> OFTInteger64 -> GetFieldAsInteger64) 00088 #define GNMGFIDInt OFTInteger64 00089 #define GetFieldAsGNMGFID GetFieldAsInteger64 00090 #define GNMGFIDFormat CPL_FRMT_GIB 00091 00092 #endif // GNM_PRIV
1.7.6.1.