@crossbind/port-spatialite-wasi 2.0.0-beta.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/LICENSE +35 -0
  2. package/README.md +11 -0
  3. package/config.guess +1823 -0
  4. package/config.sub +1885 -0
  5. package/crossbind.build.js +1 -0
  6. package/crossbind.config.js +11 -0
  7. package/dist/prebuilt/CMakeLists.txt +57 -0
  8. package/dist/prebuilt/wasi-wasm32-st-release/crossbind-emccflags.fingerprint +1 -0
  9. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/control_points.h +259 -0
  10. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/debug.h +77 -0
  11. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gaia_network.h +627 -0
  12. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gaia_topology.h +1221 -0
  13. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gaiaaux.h +540 -0
  14. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gaiaconfig-msvc.h +56 -0
  15. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gaiaconfig-msvc.h.in +55 -0
  16. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gaiaconfig.h +68 -0
  17. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gaiaconfig.h.in +67 -0
  18. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gaiaexif.h +669 -0
  19. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gaiageo.h +77 -0
  20. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gaiamatrix.h +277 -0
  21. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/geojson.h +586 -0
  22. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/geopackage.h +198 -0
  23. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gg_advanced.h +5184 -0
  24. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gg_const.h +606 -0
  25. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gg_core.h +2294 -0
  26. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gg_dxf.h +993 -0
  27. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gg_dynamic.h +416 -0
  28. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gg_formats.h +2056 -0
  29. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gg_mbr.h +606 -0
  30. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gg_sequence.h +173 -0
  31. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gg_structs.h +880 -0
  32. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gg_wfs.h +581 -0
  33. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gg_xml.h +818 -0
  34. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/spatialite_ext.h +64 -0
  35. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/sqlite.h +70 -0
  36. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/stored_procedures.h +641 -0
  37. package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite.h +2098 -0
  38. package/dist/prebuilt/wasi-wasm32-st-release/lib/libspatialite.a +0 -0
  39. package/dist/prebuilt/wasi-wasm32-st-release/lib/libspatialite.la +41 -0
  40. package/dist/prebuilt/wasi-wasm32-st-release/lib/mod_spatialite.a +0 -0
  41. package/dist/prebuilt/wasi-wasm32-st-release/lib/mod_spatialite.la +41 -0
  42. package/dist/prebuilt/wasi-wasm32-st-release/lib/pkgconfig/spatialite.pc +12 -0
  43. package/e2e/main.c +38 -0
  44. package/e2e/run.mjs +89 -0
  45. package/package.json +40 -0
@@ -0,0 +1,581 @@
1
+ /*
2
+ gg_wfs.h -- Gaia common support for WFS
3
+
4
+ version 5.1.0, 2023 August 4
5
+
6
+ Author: Sandro Furieri a.furieri@lqt.it
7
+
8
+ ------------------------------------------------------------------------------
9
+
10
+ Version: MPL 1.1/GPL 2.0/LGPL 2.1
11
+
12
+ The contents of this file are subject to the Mozilla Public License Version
13
+ 1.1 (the "License"); you may not use this file except in compliance with
14
+ the License. You may obtain a copy of the License at
15
+ http://www.mozilla.org/MPL/
16
+
17
+ Software distributed under the License is distributed on an "AS IS" basis,
18
+ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
19
+ for the specific language governing rights and limitations under the
20
+ License.
21
+
22
+ The Original Code is the SpatiaLite library
23
+
24
+ The Initial Developer of the Original Code is Alessandro Furieri
25
+
26
+ Portions created by the Initial Developer are Copyright (C) 2008-2023
27
+ the Initial Developer. All Rights Reserved.
28
+
29
+ Contributor(s):
30
+
31
+ Alternatively, the contents of this file may be used under the terms of
32
+ either the GNU General Public License Version 2 or later (the "GPL"), or
33
+ the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
34
+ in which case the provisions of the GPL or the LGPL are applicable instead
35
+ of those above. If you wish to allow use of your version of this file only
36
+ under the terms of either the GPL or the LGPL, and not to allow others to
37
+ use your version of this file under the terms of the MPL, indicate your
38
+ decision by deleting the provisions above and replace them with the notice
39
+ and other provisions required by the GPL or the LGPL. If you do not delete
40
+ the provisions above, a recipient may use your version of this file under
41
+ the terms of any one of the MPL, the GPL or the LGPL.
42
+
43
+ */
44
+
45
+
46
+ /**
47
+ \file gg_wfs.h
48
+
49
+ WFS support
50
+ */
51
+
52
+ #ifndef _GG_WFS_H
53
+ #ifndef DOXYGEN_SHOULD_SKIP_THIS
54
+ #define _GG_WFS_H
55
+ #endif
56
+
57
+ #ifdef __cplusplus
58
+ extern "C"
59
+ {
60
+ #endif
61
+
62
+ typedef struct gaia_wfs_catalog gaiaWFScatalog;
63
+ typedef gaiaWFScatalog *gaiaWFScatalogPtr;
64
+
65
+ typedef struct gaia_wfs_item gaiaWFSitem;
66
+ typedef gaiaWFSitem *gaiaWFSitemPtr;
67
+
68
+ typedef struct gaia_wfs_schema gaiaWFSschema;
69
+ typedef gaiaWFSschema *gaiaWFSschemaPtr;
70
+
71
+ typedef struct gaia_wfs_column gaiaWFScolumn;
72
+ typedef gaiaWFScolumn *gaiaWFScolumnPtr;
73
+
74
+ /**
75
+ Loads data from some WFS source
76
+
77
+ \param sqlite handle to current DB connection
78
+ \param path_or_url pointer to some WFS-GetFeature XML Document (could be a pathname or an URL).
79
+ \param alt_describe_uri an alternative URI for DescribeFeatureType to be used
80
+ if no one is found within the XML document returned by GetFeature.
81
+ \param layer_name the name of the WFS layer.
82
+ \param swap_axes if TRUE the X and Y axes will be swapped
83
+ \param table the name of the table to be created
84
+ \param pk_column name of the Primary Key column; if NULL or mismatching
85
+ then "PK_UID" will be assumed by default.
86
+ \param spatial_index if TRUE an R*Tree Spatial Index will be created
87
+ \param rows on completion will contain the total number of actually imported rows
88
+ \param err_msg on completion will contain an error message (if any)
89
+ \param progress_callback pointer to a callback function to be invoked immediately
90
+ after processing each WFS page (could be NULL)
91
+ \param callback_ptr an arbitrary pointer (to be passed as the second argument
92
+ by the callback function).
93
+
94
+ \sa create_wfs_catalog, load_from_wfs_paged, reset_wfs_http_connection
95
+
96
+ \return 0 on failure, any other value on success
97
+
98
+ \note an eventual error message returned via err_msg requires to be deallocated
99
+ by invoking free()
100
+ \n please note: this one simply is a convenience method, and exactly corresponds
101
+ to load_from_wfs_paged() setting a negative page size.
102
+ */
103
+ SPATIALITE_DECLARE int load_from_wfs (sqlite3 * sqlite,
104
+ const char *path_or_url,
105
+ const char *alt_describe_uri,
106
+ const char *layer_name,
107
+ int swap_axes, const char *table,
108
+ const char *pk_column_name,
109
+ int spatial_index, int *rows,
110
+ char **err_msg,
111
+ void (*progress_callback) (int,
112
+ void *),
113
+ void *callback_ptr);
114
+
115
+ /**
116
+ Loads data from some WFS source (using WFS paging)
117
+
118
+ \param sqlite handle to current DB connection
119
+ \param path_or_url pointer to some WFS-GetFeature XML Document (could be a pathname or an URL).
120
+ \param alt_describe_uri an alternative URI for DescribeFeatureType to be used
121
+ if no one is found within the XML document returned by GetFeature.
122
+ \param layer_name the name of the WFS layer.
123
+ \param swap_axes if TRUE the X and Y axes will be swapped
124
+ \param table the name of the table to be created
125
+ \param pk_column name of the Primary Key column; if NULL or mismatching
126
+ then "PK_UID" will be assumed by default.
127
+ \param spatial_index if TRUE an R*Tree Spatial Index will be created
128
+ \param page_size max number of features for each single WFS call; if zero or
129
+ negative a single monolithic page is assumed (i.e. paging will not be applied).
130
+ \param rows on completion will contain the total number of actually imported rows
131
+ \param err_msg on completion will contain an error message (if any)
132
+ \param progress_callback pointer to a callback function to be invoked immediately
133
+ after processing each WFS page (could be NULL)
134
+ \param callback_ptr an arbitrary pointer (to be passed as the second argument
135
+ by the callback function).
136
+
137
+ \sa create_wfs_catalog, load_from_wfs, reset_wfs_http_connection,
138
+ load_from_wfs_paged_ex
139
+
140
+ \return 0 on failure, any other value on success
141
+
142
+ \note an eventual error message returned via err_msg requires to be deallocated
143
+ by invoking free()
144
+
145
+ \note the progress_callback function must have this signature:
146
+ \b void \b myfunct(\b int \b count, \b void \b *ptr);
147
+ \n and will cyclically report how many features have been processed since the initial call start.
148
+
149
+ \note this function is now deprecated and simply defaults to a call to
150
+ load_from_wfs_paged_ex assuming WFS version 1.1.0
151
+ */
152
+ SPATIALITE_DECLARE int load_from_wfs_paged (sqlite3 * sqlite,
153
+ const char *path_or_url,
154
+ const char *alt_describe_uri,
155
+ const char *layer_name,
156
+ int swap_axes,
157
+ const char *table,
158
+ const char *pk_column_name,
159
+ int spatial_index,
160
+ int page_size, int *rows,
161
+ char **err_msg,
162
+ void (*progress_callback)
163
+ (int, void *),
164
+ void *callback_ptr);
165
+
166
+ /**
167
+ Loads data from some WFS source (using WFS paging) - Extended
168
+
169
+ \param sqlite handle to current DB connection
170
+ \param wfs_version one of "1.0.0", "1.1.0", "2.0.0" or "2.0.2"
171
+ \param path_or_url pointer to some WFS-GetFeature XML Document (could be a pathname or an URL).
172
+ \param alt_describe_uri an alternative URI for DescribeFeatureType to be used
173
+ if no one is found within the XML document returned by GetFeature.
174
+ \param layer_name the name of the WFS layer.
175
+ \param swap_axes if TRUE the X and Y axes will be swapped
176
+ \param table the name of the table to be created
177
+ \param pk_column name of the Primary Key column; if NULL or mismatching
178
+ then "PK_UID" will be assumed by default.
179
+ \param spatial_index if TRUE an R*Tree Spatial Index will be created
180
+ \param page_size max number of features for each single WFS call; if zero or
181
+ negative a single monolithic page is assumed (i.e. paging will not be applied).
182
+ \param rows on completion will contain the total number of actually imported rows
183
+ \param err_msg on completion will contain an error message (if any)
184
+ \param progress_callback pointer to a callback function to be invoked immediately
185
+ after processing each WFS page (could be NULL)
186
+ \param callback_ptr an arbitrary pointer (to be passed as the second argument
187
+ by the callback function).
188
+
189
+ \sa create_wfs_catalog, load_from_wfs, reset_wfs_http_connection
190
+
191
+ \return 0 on failure, any other value on success
192
+
193
+ \note an eventual error message returned via err_msg requires to be deallocated
194
+ by invoking free()
195
+
196
+ \note the progress_callback function must have this signature:
197
+ \b void \b myfunct(\b int \b count, \b void \b *ptr);
198
+ \n and will cyclically report how many features have been processed since the initial call start.
199
+ */
200
+ SPATIALITE_DECLARE int load_from_wfs_paged_ex (sqlite3 * sqlite,
201
+ const char *wfs_version,
202
+ const char *path_or_url,
203
+ const char *alt_describe_uri,
204
+ const char *layer_name,
205
+ int swap_axes,
206
+ const char *table,
207
+ const char *pk_column_name,
208
+ int spatial_index,
209
+ int page_size, int *rows,
210
+ char **err_msg,
211
+ void (*progress_callback)
212
+ (int, void *),
213
+ void *callback_ptr);
214
+
215
+ /**
216
+ Creates a Catalog for some WFS service
217
+
218
+ \param path_or_url pointer to some WFS-GetCapabilities XML Document (could be a pathname or an URL).
219
+ \param err_msg on completion will contain an error message (if any)
220
+
221
+ \return the pointer to the corresponding WFS-Catalog object: NULL on failure
222
+
223
+ \sa destroy_wfs_catalog, get_wfs_catalog_count, get_wfs_catalog_item, load_from_wfs,
224
+ reset_wfs_http_connection, get_wfs_version
225
+
226
+ \note an eventual error message returned via err_msg requires to be deallocated
227
+ by invoking free().\n
228
+ you are responsible to destroy (before or after) any WFS-Catalog returned by create_wfs_catalog().
229
+ */
230
+ SPATIALITE_DECLARE gaiaWFScatalogPtr create_wfs_catalog (const char
231
+ *path_or_url,
232
+ char **err_msg);
233
+
234
+ /**
235
+ Destroys a WFS-Catalog object freeing any allocated resource
236
+
237
+ \param handle the pointer to a valid WFS-Catalog returned by a previous call
238
+ to create_wfs_catalog()
239
+
240
+ \sa create_wfs_catalog
241
+ */
242
+ SPATIALITE_DECLARE void destroy_wfs_catalog (gaiaWFScatalogPtr handle);
243
+
244
+ /**
245
+ Return the WFS-Version string as reported by GetCapabilities
246
+
247
+ \param handle the pointer to a valid WFS-Item returned by a previous call
248
+ to get_wfs_catalog_item().
249
+
250
+ \return the WFS Version string: NULL is undefined
251
+
252
+ \sa create_wfs_catalog
253
+ */
254
+ SPATIALITE_DECLARE const char *get_wfs_version (gaiaWFScatalogPtr handle);
255
+
256
+ /**
257
+ Return the base URL for any WFS-GetFeature call
258
+
259
+ \param handle the pointer to a valid WFS-Item returned by a previous call
260
+ to get_wfs_catalog_item().
261
+
262
+ \return the base URL for any WFS-GetFeature call: NULL is undefined
263
+
264
+ \sa create_wfs_catalog, get_wfs_base_describe_url, get_wfs_request_url
265
+ */
266
+ SPATIALITE_DECLARE const char *get_wfs_base_request_url (gaiaWFScatalogPtr
267
+ handle);
268
+
269
+ /**
270
+ Return the base URL for any WFS-DescribeFeatureType call
271
+
272
+ \param handle the pointer to a valid WFS-Item returned by a previous call
273
+ to get_wfs_catalog_item().
274
+
275
+ \return the base URL for any WFS-DescribeFeatureType call: NULL is undefined
276
+
277
+ \sa create_wfs_catalog, get_wfs_base_request_url, get_wfs_describe_url
278
+ */
279
+ SPATIALITE_DECLARE const char
280
+ *get_wfs_base_describe_url (gaiaWFScatalogPtr handle);
281
+
282
+ /**
283
+ Return a GetFeature URL (GET)
284
+
285
+ \param handle the pointer to a valid WFS-Item returned by a previous call
286
+ to get_wfs_catalog_item().
287
+ \param name the NAME uniquely identifying the required WFS layer.
288
+ \param version could be "1.0.0" or "1.1.0"; if NULL or invalid "1.1.0"
289
+ will be assumed.
290
+ \param srid the preferred SRS to be used for WFS geometries; if negative
291
+ or mismatching will be simply ignored.
292
+ \param max_features the WFS MAXFEATURES argument; any negative or zero
293
+ value will be ignored.
294
+
295
+ \return the GetFeature URL: NULL if any error is found.
296
+
297
+ \sa get_wfs_base_request_url, get_wfs_describe_url
298
+
299
+ \note you are responsible to destroy (before or after) any allocated
300
+ memory returned by get_wfs_request_url().
301
+ */
302
+ SPATIALITE_DECLARE char *get_wfs_request_url (gaiaWFScatalogPtr handle,
303
+ const char *name,
304
+ const char *version,
305
+ int srid, int max_features);
306
+
307
+ /**
308
+ Return a DescribeFeatureType URL (GET)
309
+
310
+ \param handle the pointer to a valid WFS-Item returned by a previous call
311
+ to get_wfs_catalog_item().
312
+ \param name the NAME uniquely identifying the required WFS layer.
313
+ \param version could be "1.0.0" or "1.1.0"; if NULL or invalid "1.1.0"
314
+ will be assumed.
315
+
316
+ \return the DescribeFeatureType URL: NULL if any error is found.
317
+
318
+ \sa get_wfs_base_describe_url, get_wfs_request_url
319
+
320
+ \note you are responsible to destroy (before or after) any allocated
321
+ memory returned by get_wfs_describe_url().
322
+ */
323
+ SPATIALITE_DECLARE char *get_wfs_describe_url (gaiaWFScatalogPtr handle,
324
+ const char *name,
325
+ const char *version);
326
+
327
+ /**
328
+ Return the total count of items (aka Layers) defined within a WFS-Catalog object
329
+
330
+ \param handle the pointer to a valid WFS-Catalog returned by a previous call
331
+ to create_wfs_catalog()
332
+
333
+ \return the total count of items (aka Layers) defined within a WFS-Catalog object:
334
+ a negative number if the WFS-Catalog isn't valid
335
+
336
+ \sa create_wfs_catalog, get_wfs_catalog_item
337
+ */
338
+ SPATIALITE_DECLARE int get_wfs_catalog_count (gaiaWFScatalogPtr handle);
339
+
340
+ /**
341
+ Return the pointer to some specific Layer defined within a WFS-Catalog object
342
+
343
+ \param handle the pointer to a valid WFS-Catalog returned by a previous call
344
+ to create_wfs_catalog()
345
+ \param index the relative index identifying the required WFS-Layer (the first
346
+ Item in the WFS-Catalaog object has index ZERO).
347
+
348
+ \return the pointer to the required WFS-Layer object: NULL if the passed index
349
+ isn't valid
350
+
351
+ \sa create_wfs_catalog, get_wfs_catalog_count, get_wfs_item_name, get_wfs_item_title,
352
+ get_wfs_item_abstract, get_wfs_layer_srid_count, get_wfs_layer_srid,
353
+ get_wfs_keyword_count, get_wfs_keyword
354
+ */
355
+ SPATIALITE_DECLARE gaiaWFSitemPtr get_wfs_catalog_item (gaiaWFScatalogPtr
356
+ handle, int index);
357
+
358
+ /**
359
+ Return the name corresponding to some WFS-Item (aka Layer) object
360
+
361
+ \param handle the pointer to a valid WFS-Item returned by a previous call
362
+ to get_wfs_catalog_item().
363
+
364
+ \return the name corresponding to the WFS-Layer object
365
+
366
+ \sa get_wfs_layer_title, get_wfs_layer_abstract, get_wfs_layer_srid_count, get_wfs_layer_srid,
367
+ get_wfs_keyword_count, get_wfs_keyword
368
+ */
369
+ SPATIALITE_DECLARE const char *get_wfs_item_name (gaiaWFSitemPtr handle);
370
+
371
+ /**
372
+ Return the title corresponding to some WFS-Item (aka Layer) object
373
+
374
+ \param handle the pointer to a valid WFS-Item returned by a previous call
375
+ to get_wfs_catalog_item().
376
+
377
+ \return the title corresponding to the WFS-Layer object
378
+
379
+ \sa get_wfs_item_name, get_wfs_item_abstract, get_wfs_layer_srid_count, get_wfs_layer_srid,
380
+ get_wfs_keyword_count, get_wfs_keyword
381
+ */
382
+ SPATIALITE_DECLARE const char *get_wfs_item_title (gaiaWFSitemPtr handle);
383
+
384
+ /**
385
+ Return the abstract corresponding to some WFS-Item (aka Layer) object
386
+
387
+ \param handle the pointer to a valid WFS-Item returned by a previous call
388
+ to get_wfs_catalog_item().
389
+
390
+ \return the abstract corresponding to the WFS-Layer object
391
+
392
+ \sa get_wfs_item_name, get_wfs_item_title, get_wfs_layer_srid_count, get_wfs_layer_srid,
393
+ get_wfs_keyword_count, get_wfs_keyword
394
+ */
395
+ SPATIALITE_DECLARE const char *get_wfs_item_abstract (gaiaWFSitemPtr
396
+ handle);
397
+
398
+ /**
399
+ Return the total count of SRIDs supported by a WFS-Item object
400
+
401
+ \param handle the pointer to a valid WFS-Item returned by a previous call
402
+ to get_wfs_catalog_item().
403
+
404
+ \return the total count of SRIDs supported by a WFS-Item object:
405
+ a negative number if the WFS-Item isn't valid
406
+
407
+ \sa get_wfs_item_name, get_wfs_item_title, get_wfs_item_abstract,
408
+ get_wfs_layer_srid, get_wfs_keyword_count, get_wfs_keyword
409
+ */
410
+ SPATIALITE_DECLARE int get_wfs_layer_srid_count (gaiaWFSitemPtr handle);
411
+
412
+ /**
413
+ Return one of the SRIDs supported by a WFS-Item object
414
+
415
+ \param handle the pointer to a valid WFS-Item returned by a previous call
416
+ to get_wfs_catalog_item().
417
+ \param index the relative index identifying the required SRID (the first
418
+ SRID value supported by a WFS-Item object has index ZERO).
419
+
420
+ \return the SRID-value: a negative number if the required SRID-value isn't defined.
421
+
422
+ \sa get_wfs_item_name, get_wfs_item_title, get_wfs_item_abstract,
423
+ get_wfs_layer_srid_count, get_wfs_keyword_count, get_wfs_keyword
424
+ */
425
+ SPATIALITE_DECLARE int get_wfs_layer_srid (gaiaWFSitemPtr handle,
426
+ int index);
427
+
428
+ /**
429
+ Return the total count of Keywords associated to a WFS-Item object
430
+
431
+ \param handle the pointer to a valid WFS-Item returned by a previous call
432
+ to get_wfs_catalog_item().
433
+
434
+ \return the total count of Keyword associated to a WFS-Item object:
435
+ a negative number if the WFS-Item isn't valid
436
+
437
+ \sa get_wfs_item_name, get_wfs_item_title, get_wfs_item_abstract,
438
+ get_wfs_layer_srid_count, get_wfs_layer_srid, get_wfs_layer_keyword
439
+ */
440
+ SPATIALITE_DECLARE int get_wfs_keyword_count (gaiaWFSitemPtr handle);
441
+
442
+ /**
443
+ Return one of the Keywords supported by a WFS-Item object
444
+
445
+ \param handle the pointer to a valid WFS-Item returned by a previous call
446
+ to get_wfs_catalog_item().
447
+ \param index the relative index identifying the required Keyword (the first
448
+ Keyword associated to a WFS-Item object has index ZERO).
449
+
450
+ \return the Keyword value: NULL if the required Keyword isn't defined.
451
+
452
+ \sa get_wfs_item_name, get_wfs_item_title, get_wfs_item_abstract,
453
+ get_wfs_layer_srid_count, get_wfs_layer_srid, get_wfs_layer_keyword
454
+ */
455
+ SPATIALITE_DECLARE const char *get_wfs_keyword (gaiaWFSitemPtr handle,
456
+ int index);
457
+
458
+ /**
459
+ Creates a Schema representing some WFS Layer
460
+
461
+ \param path_or_url pointer to some WFS-DescribeFeatureType XML Document (could be a pathname or an URL).
462
+ \param err_msg on completion will contain an error message (if any)
463
+
464
+ \return the pointer to the corresponding WFS-Schema object: NULL on failure
465
+
466
+ \sa destroy_wfs_schema,get_wfs_schema_column_count, get_wfs_schema_column_info,
467
+ get_wfs_schema_geometry_info
468
+
469
+ \note an eventual error message returned via err_msg requires to be deallocated
470
+ by invoking free().\n
471
+ you are responsible to destroy (before or after) any WFS-Schema returned by create_wfs_schema().
472
+ */
473
+ SPATIALITE_DECLARE gaiaWFSschemaPtr create_wfs_schema (const char
474
+ *path_or_url,
475
+ const char
476
+ *layer_name,
477
+ char **err_msg);
478
+
479
+ /**
480
+ Destroys a WFS-schema object freeing any allocated resource
481
+
482
+ \param handle the pointer to a valid WFS-Catalog returned by a previous call
483
+ to create_wfs_schema()
484
+
485
+ \sa create_wfs_schema
486
+ */
487
+ SPATIALITE_DECLARE void destroy_wfs_schema (gaiaWFSschemaPtr handle);
488
+
489
+ /**
490
+ Return the infos describing some WFS-GeometryColumn object
491
+
492
+ \param handle the pointer to a valid WFS-Schema returned by a previous call
493
+ to create_wfs_schema().
494
+ \param name on completion will contain a pointer to the GeometryColumn name
495
+ \param type on completion will contain the GeometryType set for the Column;
496
+ could be one of GAIA_POINT, GAIA_LINESTRING, GAIA_POLYGON, GAIA_MULTIPOINT,
497
+ GAIA_MULTILINESTRING, GAIA_MULTIPOLYGON or GAIA_GEOMETRYCOLLECTION
498
+ \param srid on completion will contain the SRID-value set for the GeometryColumn
499
+ \param dims on completion will contain the dimensions (2 or 3) set
500
+ for the GeometryColumn
501
+ \param nullable on completion will contain a Boolean value; if TRUE
502
+ the Column may contain NULL-values.
503
+
504
+ \return TRUE on success, FALSE if any error is encountered or if
505
+ the WFS-Schema hasn't any Geometry-Column defined.
506
+
507
+ \sa create_wfs_schema, get_wfs_schema_column_count, get_wfs_schema_column,
508
+ get_wfs_schema_column_info
509
+ */
510
+ SPATIALITE_DECLARE int get_wfs_schema_geometry_info (gaiaWFSschemaPtr
511
+ handle,
512
+ const char **name,
513
+ int *type, int *srid,
514
+ int *dims,
515
+ int *nullable);
516
+
517
+ /**
518
+ Return the total count of items (aka Columns) defined within a WFS-Schema object
519
+
520
+ \param handle the pointer to a valid WFS-Schema returned by a previous call
521
+ to create_wfs_schema()
522
+
523
+ \return the total count of items (aka Columns) defined within a WFS-Schema object:
524
+ a negative number if the WFS-Schema isn't valid
525
+
526
+ \sa create_wfs_schema, get_wfs_schema_geometry_info,
527
+ get_wfs_schema_column, get_wfs_schema_column_info
528
+ */
529
+ SPATIALITE_DECLARE int get_wfs_schema_column_count (gaiaWFSschemaPtr
530
+ handle);
531
+
532
+ /**
533
+ Return the pointer to some specific Column defined within a WFS-Schema object
534
+
535
+ \param handle the pointer to a valid WFS-Schema returned by a previous call
536
+ to create_wfs_schema()
537
+ \param index the relative index identifying the required WFS-Column (the first
538
+ Item in the WFS-Schema object has index ZERO).
539
+
540
+ \return the pointer to the required WFS-Column object: NULL if the passed index
541
+ isn't valid
542
+
543
+ \sa create_wfs_schema, get_wfs_schema_geometry_info,
544
+ get_wfs_schema_column_count, get_wfs_schema_column_info
545
+ */
546
+ SPATIALITE_DECLARE gaiaWFScolumnPtr
547
+ get_wfs_schema_column (gaiaWFSschemaPtr handle, int index);
548
+
549
+ /**
550
+ Return the infos describing some WFS-Column object
551
+
552
+ \param handle the pointer to a valid WFS-Column returned by a previous call
553
+ to get_wfs_schema_column().
554
+ \param name on completion will contain a pointer to the Column name
555
+ \param type on completion will contain the datatype set for the Column;
556
+ could be one of SQLITE_TEXT, SQLITE_INTEGER or SQLITE_FLOAT
557
+ \param nullable on completion will contain a Boolean value; if TRUE
558
+ the Column may contain NULL-values.
559
+
560
+ \return TRUE on success, FALSE if any error is encountered
561
+
562
+ \sa get_wfs_schema_column, get_wfs_schema_geometry_info
563
+ */
564
+ SPATIALITE_DECLARE int get_wfs_schema_column_info (gaiaWFScolumnPtr
565
+ handle,
566
+ const char **name,
567
+ int *type,
568
+ int *nullable);
569
+
570
+ /**
571
+ Resets the libxml2 "nano HTTP": useful when changing the HTTP_PROXY settings
572
+
573
+ \sa create_wfs_catalog, load_from_wfs, load_from_wfs_paged
574
+ */
575
+ SPATIALITE_DECLARE void reset_wfs_http_connection (void);
576
+
577
+ #ifdef __cplusplus
578
+ }
579
+ #endif
580
+
581
+ #endif /* _GG_WFS_H */