GDAL

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

gnm_api.h
1 /******************************************************************************
2 * $Id$
3 *
4 * Project: GDAL/OGR Geography Network support (Geographic Network Model)
5 * Purpose: GNM C API.
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_API
33 #define GNM_API
34
35 #include "gnm.h"
36
37 CPL_C_START
38
39 typedef void *GNMNetworkH;
40 typedef void *GNMGenericNetworkH;
41
42 const char CPL_DLL * CPL_STDCALL GNMGetName (GNMNetworkH hNet);
43
44 int CPL_DLL CPL_STDCALL GNMGetVersion(GNMNetworkH hNet);
45
46 CPLErr CPL_DLL CPL_STDCALL GNMDisconnectAll (GNMNetworkH hNet);
47
48 OGRFeatureH CPL_DLL CPL_STDCALL GNMGetFeatureByGlobalFID (GNMNetworkH hNet, GNMGFID nGFID);
49
50 OGRLayerH CPL_DLL CPL_STDCALL GNMGetPath (GNMNetworkH hNet, GNMGFID nStartFID,
51 GNMGFID nEndFID, GNMGraphAlgorithmType eAlgorithm,
52 char** papszOptions);
53
54
55
56 CPLErr CPL_DLL CPL_STDCALL GNMConnectFeatures (GNMGenericNetworkH hNet,
57 GNMGFID nSrcFID, GNMGFID nTgtFID,
58 GNMGFID nConFID, double dfCost,
59 double dfInvCost,
60 GNMDirection eDir);
61
62 CPLErr CPL_DLL CPL_STDCALL GNMDisconnectFeatures (GNMGenericNetworkH hNet,
63 GNMGFID nSrcFID, GNMGFID nTgtFID,
64 GNMGFID nConFID);
65
66 CPLErr CPL_DLL CPL_STDCALL GNMDisconnectFeaturesWithId(GNMGenericNetworkH hNet,
67 GNMGFID nFID);
68
69
70 CPLErr CPL_DLL CPL_STDCALL GNMReconnectFeatures (GNMGenericNetworkH hNet,
71 GNMGFID nSrcFID, GNMGFID nTgtFID,
72 GNMGFID nConFID, double dfCost,
73 double dfInvCost, GNMDirection eDir);
74
75 CPLErr CPL_DLL CPL_STDCALL GNMCreateRule (GNMGenericNetworkH hNet,
76 const char *pszRuleStr);
77
78 CPLErr CPL_DLL CPL_STDCALL GNMDeleteAllRules(GNMGenericNetworkH hNet);
79
80 CPLErr CPL_DLL CPL_STDCALL GNMDeleteRule(GNMGenericNetworkH hNet,
81 const char *pszRuleStr);
82
83 char CPL_DLL ** CPL_STDCALL GNMGetRules(GNMGenericNetworkH hNet);
84
85 CPLErr CPL_DLL CPL_STDCALL GNMConnectPointsByLines (GNMGenericNetworkH hNet,
86 char **papszLayerList,
87 double dfTolerance,
88 double dfCost,
89 double dfInvCost,
90 GNMDirection eDir);
91
92 CPLErr CPL_DLL CPL_STDCALL GNMChangeBlockState (GNMGenericNetworkH hNet,
93 GNMGFID nFID, bool bIsBlock);
94
95 CPLErr CPL_DLL CPL_STDCALL GNMChangeAllBlockState (GNMGenericNetworkH hNet,
96 int bIsBlock);
97
98 CPL_C_END
99
100 #endif // GNM_API

Generated for GDAL by 1.8.8.