QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
sidx_api.h
Go to the documentation of this file.
1/******************************************************************************
2 * Project: libsidx - A C API wrapper around libspatialindex
3 * Purpose: C API.
4 * Author: Howard Butler, [email protected]
5 ******************************************************************************
6 * Copyright (c) 2009, Howard Butler
7 *
8 * All rights reserved.
9 *
10 * Permission is hereby granted, free of charge, to any person obtaining a
11 * copy of this software and associated documentation files (the "Software"),
12 * to deal in the Software without restriction, including without limitation
13 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 * and/or sell copies of the Software, and to permit persons to whom the
15 * Software is furnished to do so, subject to the following conditions:
16 *
17 * The above copyright notice and this permission notice shall be included
18 * in all copies or substantial portions of the Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26 * DEALINGS IN THE SOFTWARE.
27******************************************************************************/
28
29#ifndef SIDX_API_H_INCLUDED
30#define SIDX_API_H_INCLUDED
31
32#define SIDX_C_API 1
33
34#include "sidx_config.h"
35
37
39
41 int (*readNext)(int64_t *id, double **pMin, double **pMax, uint32_t *nDimension, const uint8_t **pData, size_t *nDataLength)
42 );
43
46
48 int64_t id,
49 double* pdMin,
50 double* pdMax,
51 uint32_t nDimension);
52
54 int64_t id,
55 double* pdMin,
56 double* pdMax,
57 double* pdVMin,
58 double* pdVMax,
59 double tStart,
60 double tEnd,
61 uint32_t nDimension
62 );
63
65 int64_t id,
66 double* pdMin,
67 double* pdMax,
68 double tStart,
69 double tEnd,
70 uint32_t nDimension
71 );
72
74 int64_t id,
75 double* pdMin,
76 double* pdMax,
77 uint32_t nDimension,
78 const uint8_t* pData,
79 size_t nDataLength);
80
82 int64_t id,
83 double* pdMin,
84 double* pdMax,
85 double* pdVMin,
86 double* pdVMax,
87 double tStart,
88 double tEnd,
89 uint32_t nDimension,
90 const uint8_t* pData,
91 size_t nDataLength);
92
94 int64_t id,
95 double* pdMin,
96 double* pdMax,
97 double tStart,
98 double tEnd,
99 uint32_t nDimension,
100 const uint8_t* pData,
101 size_t nDataLength);
102
104
106 double* pdMin,
107 double* pdMax,
108 double* pdVMin,
109 double* pdVMax,
110 double tStart,
111 double tEnd,
112 uint32_t nDimension,
113 IndexItemH** items,
114 uint64_t* nResults);
115
117 double* pdMin,
118 double* pdMax,
119 double tStart,
120 double tEnd,
121 uint32_t nDimension,
122 IndexItemH** items,
123 uint64_t* nResults);
124
126 double* pdMin,
127 double* pdMax,
128 uint32_t nDimension,
129 IndexItemH** items,
130 uint64_t* nResults);
131
133 double* pdMin,
134 double* pdMax,
135 double* pdVMin,
136 double* pdVMax,
137 double tStart,
138 double tEnd,
139 uint32_t nDimension,
140 int64_t** ids,
141 uint64_t* nResults);
142
144 double* pdMin,
145 double* pdMax,
146 double tStart,
147 double tEnd,
148 uint32_t nDimension,
149 int64_t** ids,
150 uint64_t* nResults);
151
153 double* pdMin,
154 double* pdMax,
155 uint32_t nDimension,
156 int64_t** items,
157 uint64_t* nResults);
158
160 double* pdMin,
161 double* pdMax,
162 double* pdVMin,
163 double* pdVMax,
164 double tStart,
165 double tEnd,
166 uint32_t nDimension,
167 uint64_t* nResults);
168
170 double* pdMin,
171 double* pdMax,
172 double tStart,
173 double tEnd,
174 uint32_t nDimension,
175 uint64_t* nResults);
176
178 double* pdMin,
179 double* pdMax,
180 uint32_t nDimension,
181 uint64_t* nResults);
182
184 double* pdMin,
185 double* pdMax,
186 double* pdVMin,
187 double* pdVMax,
188 double tStart,
189 double tEnd,
190 uint32_t nDimension,
191 IndexItemH** items,
192 uint64_t* nResults);
193
195 double* pdMin,
196 double* pdMax,
197 double tStart,
198 double tEnd,
199 uint32_t nDimension,
200 IndexItemH** items,
201 uint64_t* nResults);
202
204 double* pdMin,
205 double* pdMax,
206 uint32_t nDimension,
207 IndexItemH** items,
208 uint64_t* nResults);
209
211 double* pdMin,
212 double* pdMax,
213 double* pdVMin,
214 double* pdVMax,
215 double tStart,
216 double tEnd,
217 uint32_t nDimension,
218 int64_t** ids,
219 uint64_t* nResults);
220
222 double* pdMin,
223 double* pdMax,
224 double tStart,
225 double tEnd,
226 uint32_t nDimension,
227 int64_t** ids,
228 uint64_t* nResults);
229
231 double* pdMin,
232 double* pdMax,
233 uint32_t nDimension,
234 int64_t** items,
235 uint64_t* nResults);
236
238 double** ppdMin,
239 double** ppdMax,
240 uint32_t* nDimension);
241
242
244 uint32_t* nLeafNodes,
245 uint32_t** nLeafSizes,
246 int64_t** nLeafIDs,
247 int64_t*** nLeafChildIDs,
248 double*** pppdMin,
249 double*** pppdMax,
250 uint32_t* nDimension);
251
254
257
258SIDX_DLL void Index_DestroyObjResults(IndexItemH* results, uint32_t nResults);
260SIDX_DLL void Index_Free(void* object);
262
265
266SIDX_DLL RTError IndexItem_GetData(IndexItemH item, uint8_t** data, uint64_t* length);
267
269 double** ppdMin,
270 double** ppdMax,
271 uint32_t* nDimension);
272
275
278
281
284
287
290
293
296
299
302
305
308
311
314
317
320
323
326
329
332
335
338
341
344
347
350
353
354SIDX_C_DLL void* SIDX_NewBuffer(size_t bytes);
355SIDX_C_DLL void SIDX_DeleteBuffer(void* buffer);
356
359
361
363
365
366#endif
Definition Index.h:34
Definition SpatialIndex.h:127
Definition Tools.h:308
SIDX_DLL RTError Index_Intersects_id(IndexH index, double *pdMin, double *pdMax, uint32_t nDimension, int64_t **items, uint64_t *nResults)
SIDX_DLL RTError IndexProperty_SetPagesize(IndexPropertyH iprop, uint32_t value)
SIDX_C_DLL RTError Index_InsertTPData(IndexH index, int64_t id, double *pdMin, double *pdMax, double *pdVMin, double *pdVMax, double tStart, double tEnd, uint32_t nDimension, const uint8_t *pData, size_t nDataLength)
SIDX_C_DLL RTError Index_MVRNearestNeighbors_id(IndexH index, double *pdMin, double *pdMax, double tStart, double tEnd, uint32_t nDimension, int64_t **ids, uint64_t *nResults)
SIDX_DLL RTError IndexProperty_SetWriteThrough(IndexPropertyH iprop, uint32_t value)
IDX_C_START SIDX_DLL IndexH Index_Create(IndexPropertyH properties)
SIDX_DLL RTError IndexItem_GetData(IndexItemH item, uint8_t **data, uint64_t *length)
SIDX_DLL RTError Index_SetResultSetLimit(IndexH index, int64_t value)
SIDX_C_DLL char * Error_GetLastErrorMsg(void)
SIDX_DLL uint32_t IndexProperty_GetNearMinimumOverlapFactor(IndexPropertyH iprop)
SIDX_DLL RTError IndexProperty_SetIndexVariant(IndexPropertyH iprop, RTIndexVariant value)
SIDX_DLL uint32_t IndexProperty_GetDimension(IndexPropertyH iprop)
SIDX_DLL RTIndexVariant IndexProperty_GetIndexVariant(IndexPropertyH iprop)
SIDX_DLL RTError Index_Intersects_count(IndexH index, double *pdMin, double *pdMax, uint32_t nDimension, uint64_t *nResults)
SIDX_DLL uint32_t IndexProperty_GetIndexPoolCapacity(IndexPropertyH iprop)
SIDX_DLL char * IndexProperty_GetFileNameExtensionIdx(IndexPropertyH iprop)
SIDX_DLL RTError IndexProperty_SetIndexCapacity(IndexPropertyH iprop, uint32_t value)
SIDX_DLL RTError IndexProperty_SetDimension(IndexPropertyH iprop, uint32_t value)
SIDX_DLL RTError Index_GetBounds(IndexH index, double **ppdMin, double **ppdMax, uint32_t *nDimension)
SIDX_DLL RTError IndexProperty_SetBufferingCapacity(IndexPropertyH iprop, uint32_t value)
SIDX_DLL uint32_t IndexProperty_GetIndexCapacity(IndexPropertyH iprop)
SIDX_DLL uint32_t Index_IsValid(IndexH index)
SIDX_DLL uint32_t IndexProperty_GetLeafPoolCapacity(IndexPropertyH iprop)
SIDX_DLL RTError IndexProperty_SetIndexStorage(IndexPropertyH iprop, RTStorageType value)
SIDX_DLL uint64_t IndexProperty_GetResultSetLimit(IndexPropertyH iprop)
SIDX_C_DLL RTError Index_TPNearestNeighbors_obj(IndexH index, double *pdMin, double *pdMax, double *pdVMin, double *pdVMax, double tStart, double tEnd, uint32_t nDimension, IndexItemH **items, uint64_t *nResults)
SIDX_DLL RTError IndexProperty_SetPointPoolCapacity(IndexPropertyH iprop, uint32_t value)
SIDX_C_DLL RTError Index_MVRIntersects_obj(IndexH index, double *pdMin, double *pdMax, double tStart, double tEnd, uint32_t nDimension, IndexItemH **items, uint64_t *nResults)
SIDX_C_DLL RTError Index_TPIntersects_count(IndexH index, double *pdMin, double *pdMax, double *pdVMin, double *pdVMax, double tStart, double tEnd, uint32_t nDimension, uint64_t *nResults)
SIDX_DLL RTError IndexProperty_SetRegionPoolCapacity(IndexPropertyH iprop, uint32_t value)
SIDX_DLL uint32_t IndexProperty_GetCustomStorageCallbacksSize(IndexPropertyH iprop)
SIDX_DLL void Index_DestroyObjResults(IndexItemH *results, uint32_t nResults)
SIDX_DLL RTError IndexProperty_SetFillFactor(IndexPropertyH iprop, double value)
SIDX_DLL double IndexProperty_GetTPRHorizon(IndexPropertyH iprop)
SIDX_DLL RTError IndexProperty_SetCustomStorageCallbacks(IndexPropertyH iprop, const void *value)
SIDX_DLL RTError IndexProperty_SetReinsertFactor(IndexPropertyH iprop, double value)
SIDX_C_DLL RTError Index_DeleteMVRData(IndexH index, int64_t id, double *pdMin, double *pdMax, double tStart, double tEnd, uint32_t nDimension)
SIDX_DLL void IndexProperty_Destroy(IndexPropertyH hProp)
SIDX_DLL RTError IndexProperty_SetIndexPoolCapacity(IndexPropertyH iprop, uint32_t value)
SIDX_DLL double IndexProperty_GetFillFactor(IndexPropertyH iprop)
SIDX_DLL uint32_t IndexProperty_GetBufferingCapacity(IndexPropertyH iprop)
SIDX_DLL void IndexItem_Destroy(IndexItemH item)
SIDX_C_DLL RTError Index_MVRIntersects_count(IndexH index, double *pdMin, double *pdMax, double tStart, double tEnd, uint32_t nDimension, uint64_t *nResults)
SIDX_C_DLL RTError Index_InsertMVRData(IndexH index, int64_t id, double *pdMin, double *pdMax, double tStart, double tEnd, uint32_t nDimension, const uint8_t *pData, size_t nDataLength)
SIDX_DLL int64_t IndexItem_GetID(IndexItemH item)
SIDX_C_DLL RTError Index_TPIntersects_id(IndexH index, double *pdMin, double *pdMax, double *pdVMin, double *pdVMax, double tStart, double tEnd, uint32_t nDimension, int64_t **ids, uint64_t *nResults)
SIDX_DLL RTError IndexProperty_SetSplitDistributionFactor(IndexPropertyH iprop, double value)
SIDX_DLL RTError IndexProperty_SetOverwrite(IndexPropertyH iprop, uint32_t value)
SIDX_DLL double IndexProperty_GetSplitDistributionFactor(IndexPropertyH iprop)
SIDX_C_DLL RTError Index_TPIntersects_obj(IndexH index, double *pdMin, double *pdMax, double *pdVMin, double *pdVMax, double tStart, double tEnd, uint32_t nDimension, IndexItemH **items, uint64_t *nResults)
SIDX_DLL void Index_ClearBuffer(IndexH index)
SIDX_DLL RTError IndexProperty_SetFileName(IndexPropertyH iprop, const char *value)
SIDX_DLL RTError Index_NearestNeighbors_obj(IndexH index, double *pdMin, double *pdMax, uint32_t nDimension, IndexItemH **items, uint64_t *nResults)
SIDX_DLL RTError Index_DeleteData(IndexH index, int64_t id, double *pdMin, double *pdMax, uint32_t nDimension)
SIDX_DLL RTError IndexProperty_SetResultSetLimit(IndexPropertyH iprop, uint64_t value)
SIDX_DLL IndexPropertyH Index_GetProperties(IndexH index)
SIDX_DLL RTError Index_InsertData(IndexH index, int64_t id, double *pdMin, double *pdMax, uint32_t nDimension, const uint8_t *pData, size_t nDataLength)
SIDX_DLL uint32_t IndexProperty_GetPagesize(IndexPropertyH iprop)
SIDX_DLL char * IndexProperty_GetFileNameExtensionDat(IndexPropertyH iprop)
SIDX_DLL RTStorageType IndexProperty_GetIndexStorage(IndexPropertyH iprop)
SIDX_DLL char * IndexProperty_GetFileName(IndexPropertyH iprop)
SIDX_DLL RTIndexType IndexProperty_GetIndexType(IndexPropertyH iprop)
SIDX_DLL RTError IndexProperty_SetLeafPoolCapacity(IndexPropertyH iprop, uint32_t value)
SIDX_DLL RTError IndexProperty_SetNearMinimumOverlapFactor(IndexPropertyH iprop, uint32_t value)
SIDX_C_DLL RTError Index_GetLeaves(IndexH index, uint32_t *nLeafNodes, uint32_t **nLeafSizes, int64_t **nLeafIDs, int64_t ***nLeafChildIDs, double ***pppdMin, double ***pppdMax, uint32_t *nDimension)
SIDX_DLL RTError Index_Intersects_obj(IndexH index, double *pdMin, double *pdMax, uint32_t nDimension, IndexItemH **items, uint64_t *nResults)
SIDX_DLL RTError IndexProperty_SetLeafCapacity(IndexPropertyH iprop, uint32_t value)
SIDX_C_DLL RTError Index_MVRIntersects_id(IndexH index, double *pdMin, double *pdMax, double tStart, double tEnd, uint32_t nDimension, int64_t **ids, uint64_t *nResults)
SIDX_C_DLL char * SIDX_Version()
SIDX_DLL uint32_t IndexProperty_GetEnsureTightMBRs(IndexPropertyH iprop)
SIDX_DLL IndexH Index_CreateWithStream(IndexPropertyH properties, int(*readNext)(int64_t *id, double **pMin, double **pMax, uint32_t *nDimension, const uint8_t **pData, size_t *nDataLength))
SIDX_DLL uint32_t IndexProperty_GetWriteThrough(IndexPropertyH iprop)
SIDX_DLL void Index_Destroy(IndexH index)
SIDX_DLL RTError Index_SetResultSetOffset(IndexH index, int64_t value)
SIDX_DLL RTError IndexProperty_SetFileNameExtensionDat(IndexPropertyH iprop, const char *value)
SIDX_DLL RTError IndexProperty_SetCustomStorageCallbacksSize(IndexPropertyH iprop, uint32_t value)
SIDX_C_DLL RTError Index_TPNearestNeighbors_id(IndexH index, double *pdMin, double *pdMax, double *pdVMin, double *pdVMax, double tStart, double tEnd, uint32_t nDimension, int64_t **ids, uint64_t *nResults)
SIDX_DLL int64_t IndexProperty_GetIndexID(IndexPropertyH iprop)
SIDX_DLL uint32_t IndexProperty_GetPointPoolCapacity(IndexPropertyH iprop)
SIDX_DLL RTError IndexItem_GetBounds(IndexItemH item, double **ppdMin, double **ppdMax, uint32_t *nDimension)
SIDX_DLL RTError IndexProperty_SetFileNameExtensionIdx(IndexPropertyH iprop, const char *value)
SIDX_DLL RTError Index_NearestNeighbors_id(IndexH index, double *pdMin, double *pdMax, uint32_t nDimension, int64_t **items, uint64_t *nResults)
SIDX_DLL int64_t Index_GetResultSetOffset(IndexH index)
SIDX_DLL uint32_t IndexProperty_GetLeafCapacity(IndexPropertyH iprop)
SIDX_C_DLL void * SIDX_NewBuffer(size_t bytes)
SIDX_C_DLL RTError Index_DeleteTPData(IndexH index, int64_t id, double *pdMin, double *pdMax, double *pdVMin, double *pdVMax, double tStart, double tEnd, uint32_t nDimension)
SIDX_C_DLL void SIDX_DeleteBuffer(void *buffer)
SIDX_DLL RTError IndexProperty_SetEnsureTightMBRs(IndexPropertyH iprop, uint32_t value)
SIDX_C_DLL RTError Index_MVRNearestNeighbors_obj(IndexH index, double *pdMin, double *pdMax, double tStart, double tEnd, uint32_t nDimension, IndexItemH **items, uint64_t *nResults)
SIDX_DLL uint32_t IndexProperty_GetOverwrite(IndexPropertyH iprop)
SIDX_DLL uint32_t IndexProperty_GetRegionPoolCapacity(IndexPropertyH iprop)
SIDX_DLL IndexPropertyH IndexProperty_Create()
SIDX_DLL RTError IndexProperty_SetIndexID(IndexPropertyH iprop, int64_t value)
SIDX_DLL void * IndexProperty_GetCustomStorageCallbacks(IndexPropertyH iprop)
SIDX_DLL RTError IndexProperty_SetTPRHorizon(IndexPropertyH iprop, double value)
SIDX_DLL double IndexProperty_GetReinsertFactor(IndexPropertyH iprop)
SIDX_DLL void Index_Flush(IndexH index)
SIDX_DLL RTError IndexProperty_SetIndexType(IndexPropertyH iprop, RTIndexType value)
SIDX_DLL int64_t Index_GetResultSetLimit(IndexH index)
SIDX_DLL void Index_Free(void *object)
#define IDX_C_END
Definition sidx_config.h:106
RTError
Definition sidx_config.h:68
RTIndexVariant
Definition sidx_config.h:93
#define IDX_C_START
Definition sidx_config.h:105
RTStorageType
Definition sidx_config.h:85
RTIndexType
Definition sidx_config.h:77
#define SIDX_C_DLL
Definition sidx_export.h:40
#define SIDX_DLL
Definition sidx_export.h:41