SpatiaLite  5.0.0
gg_wfs.h
Go to the documentation of this file.
1 /*
2  gg_wfs.h -- Gaia common support for WFS
3 
4  version 5.0, 2020 August 1
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-2020
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 
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 
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 
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 
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 
230  SPATIALITE_DECLARE gaiaWFScatalogPtr create_wfs_catalog (const char
231  *path_or_url,
232  char **err_msg);
233 
242  SPATIALITE_DECLARE void destroy_wfs_catalog (gaiaWFScatalogPtr handle);
243 
254  SPATIALITE_DECLARE const char *get_wfs_version (gaiaWFScatalogPtr handle);
255 
266  SPATIALITE_DECLARE const char *get_wfs_base_request_url (gaiaWFScatalogPtr
267  handle);
268 
279  SPATIALITE_DECLARE const char
280  *get_wfs_base_describe_url (gaiaWFScatalogPtr handle);
281 
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 
323  SPATIALITE_DECLARE char *get_wfs_describe_url (gaiaWFScatalogPtr handle,
324  const char *name,
325  const char *version);
326 
338  SPATIALITE_DECLARE int get_wfs_catalog_count (gaiaWFScatalogPtr handle);
339 
355  SPATIALITE_DECLARE gaiaWFSitemPtr get_wfs_catalog_item (gaiaWFScatalogPtr
356  handle, int index);
357 
369  SPATIALITE_DECLARE const char *get_wfs_item_name (gaiaWFSitemPtr handle);
370 
382  SPATIALITE_DECLARE const char *get_wfs_item_title (gaiaWFSitemPtr handle);
383 
395  SPATIALITE_DECLARE const char *get_wfs_item_abstract (gaiaWFSitemPtr
396  handle);
397 
410  SPATIALITE_DECLARE int get_wfs_layer_srid_count (gaiaWFSitemPtr handle);
411 
425  SPATIALITE_DECLARE int get_wfs_layer_srid (gaiaWFSitemPtr handle,
426  int index);
427 
440  SPATIALITE_DECLARE int get_wfs_keyword_count (gaiaWFSitemPtr handle);
441 
455  SPATIALITE_DECLARE const char *get_wfs_keyword (gaiaWFSitemPtr handle,
456  int index);
457 
473  SPATIALITE_DECLARE gaiaWFSschemaPtr create_wfs_schema (const char
474  *path_or_url,
475  const char
476  *layer_name,
477  char **err_msg);
478 
487  SPATIALITE_DECLARE void destroy_wfs_schema (gaiaWFSschemaPtr handle);
488 
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 
529  SPATIALITE_DECLARE int get_wfs_schema_column_count (gaiaWFSschemaPtr
530  handle);
531 
546  SPATIALITE_DECLARE gaiaWFScolumnPtr
547  get_wfs_schema_column (gaiaWFSschemaPtr handle, int index);
548 
564  SPATIALITE_DECLARE int get_wfs_schema_column_info (gaiaWFScolumnPtr
565  handle,
566  const char **name,
567  int *type,
568  int *nullable);
569 
575  SPATIALITE_DECLARE void reset_wfs_http_connection (void);
576 
577 #ifdef __cplusplus
578 }
579 #endif
580 
581 #endif /* _GG_WFS_H */
SPATIALITE_DECLARE int get_wfs_schema_geometry_info(gaiaWFSschemaPtr handle, const char **name, int *type, int *srid, int *dims, int *nullable)
Return the infos describing some WFS-GeometryColumn object.
SPATIALITE_DECLARE gaiaWFScatalogPtr create_wfs_catalog(const char *path_or_url, char **err_msg)
Creates a Catalog for some WFS service.
SPATIALITE_DECLARE const char * get_wfs_item_title(gaiaWFSitemPtr handle)
Return the title corresponding to some WFS-Item (aka Layer) object.
SPATIALITE_DECLARE int get_wfs_schema_column_info(gaiaWFScolumnPtr handle, const char **name, int *type, int *nullable)
Return the infos describing some WFS-Column object.
SPATIALITE_DECLARE int get_wfs_layer_srid_count(gaiaWFSitemPtr handle)
Return the total count of SRIDs supported by a WFS-Item object.
SPATIALITE_DECLARE int get_wfs_layer_srid(gaiaWFSitemPtr handle, int index)
Return one of the SRIDs supported by a WFS-Item object.
SPATIALITE_DECLARE char * get_wfs_request_url(gaiaWFScatalogPtr handle, const char *name, const char *version, int srid, int max_features)
Return a GetFeature URL (GET)
SPATIALITE_DECLARE void destroy_wfs_schema(gaiaWFSschemaPtr handle)
Destroys a WFS-schema object freeing any allocated resource.
SPATIALITE_DECLARE int load_from_wfs_paged(sqlite3 *sqlite, const char *path_or_url, const char *alt_describe_uri, const char *layer_name, int swap_axes, const char *table, const char *pk_column_name, int spatial_index, int page_size, int *rows, char **err_msg, void(*progress_callback)(int, void *), void *callback_ptr)
Loads data from some WFS source (using WFS paging)
SPATIALITE_DECLARE int get_wfs_catalog_count(gaiaWFScatalogPtr handle)
Return the total count of items (aka Layers) defined within a WFS-Catalog object.
SPATIALITE_DECLARE gaiaWFScolumnPtr get_wfs_schema_column(gaiaWFSschemaPtr handle, int index)
Return the pointer to some specific Column defined within a WFS-Schema object.
SPATIALITE_DECLARE const char * get_wfs_item_abstract(gaiaWFSitemPtr handle)
Return the abstract corresponding to some WFS-Item (aka Layer) object.
SPATIALITE_DECLARE gaiaWFSitemPtr get_wfs_catalog_item(gaiaWFScatalogPtr handle, int index)
Return the pointer to some specific Layer defined within a WFS-Catalog object.
SPATIALITE_DECLARE const char * get_wfs_item_name(gaiaWFSitemPtr handle)
Return the name corresponding to some WFS-Item (aka Layer) object.
SPATIALITE_DECLARE const char * get_wfs_version(gaiaWFScatalogPtr handle)
Return the WFS-Version string as reported by GetCapabilities.
SPATIALITE_DECLARE const char * get_wfs_base_request_url(gaiaWFScatalogPtr handle)
Return the base URL for any WFS-GetFeature call.
SPATIALITE_DECLARE const char * get_wfs_base_describe_url(gaiaWFScatalogPtr handle)
Return the base URL for any WFS-DescribeFeatureType call.
SPATIALITE_DECLARE void reset_wfs_http_connection(void)
Resets the libxml2 "nano HTTP": useful when changing the HTTP_PROXY settings.
SPATIALITE_DECLARE void destroy_wfs_catalog(gaiaWFScatalogPtr handle)
Destroys a WFS-Catalog object freeing any allocated resource.
SPATIALITE_DECLARE char * get_wfs_describe_url(gaiaWFScatalogPtr handle, const char *name, const char *version)
Return a DescribeFeatureType URL (GET)
SPATIALITE_DECLARE int load_from_wfs_paged_ex(sqlite3 *sqlite, const char *wfs_version, const char *path_or_url, const char *alt_describe_uri, const char *layer_name, int swap_axes, const char *table, const char *pk_column_name, int spatial_index, int page_size, int *rows, char **err_msg, void(*progress_callback)(int, void *), void *callback_ptr)
Loads data from some WFS source (using WFS paging) - Extended.
SPATIALITE_DECLARE gaiaWFSschemaPtr create_wfs_schema(const char *path_or_url, const char *layer_name, char **err_msg)
Creates a Schema representing some WFS Layer.
SPATIALITE_DECLARE int get_wfs_keyword_count(gaiaWFSitemPtr handle)
Return the total count of Keywords associated to a WFS-Item object.
SPATIALITE_DECLARE int load_from_wfs(sqlite3 *sqlite, const char *path_or_url, const char *alt_describe_uri, const char *layer_name, int swap_axes, const char *table, const char *pk_column_name, int spatial_index, int *rows, char **err_msg, void(*progress_callback)(int, void *), void *callback_ptr)
Loads data from some WFS source.
SPATIALITE_DECLARE const char * get_wfs_keyword(gaiaWFSitemPtr handle, int index)
Return one of the Keywords supported by a WFS-Item object.
SPATIALITE_DECLARE int get_wfs_schema_column_count(gaiaWFSschemaPtr handle)
Return the total count of items (aka Columns) defined within a WFS-Schema object.