SpatiaLite  4.3.0
gg_wfs.h
Go to the documentation of this file.
1 /*
2  gg_wfs.h -- Gaia common support for WFS
3 
4  version 4.3, 2015 June 29
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-2015
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, int swap_axes,
107  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 
148  SPATIALITE_DECLARE int load_from_wfs_paged (sqlite3 * sqlite,
149  const char *path_or_url,
150  const char *alt_describe_uri,
151  const char *layer_name,
152  int swap_axes,
153  const char *table,
154  const char *pk_column_name,
155  int spatial_index,
156  int page_size, int *rows,
157  char **err_msg,
158  void (*progress_callback) (int,
159  void
160  *),
161  void *callback_ptr);
162 
178  SPATIALITE_DECLARE gaiaWFScatalogPtr create_wfs_catalog (const char
179  *path_or_url,
180  char **err_msg);
181 
190  SPATIALITE_DECLARE void destroy_wfs_catalog (gaiaWFScatalogPtr handle);
191 
202  SPATIALITE_DECLARE const char *get_wfs_version (gaiaWFScatalogPtr handle);
203 
214  SPATIALITE_DECLARE const char *get_wfs_base_request_url (gaiaWFScatalogPtr
215  handle);
216 
227  SPATIALITE_DECLARE const char *get_wfs_base_describe_url (gaiaWFScatalogPtr
228  handle);
229 
250  SPATIALITE_DECLARE char *get_wfs_request_url (gaiaWFScatalogPtr handle,
251  const char *name,
252  const char *version,
253  int srid, int max_features);
254 
271  SPATIALITE_DECLARE char *get_wfs_describe_url (gaiaWFScatalogPtr handle,
272  const char *name,
273  const char *version);
274 
286  SPATIALITE_DECLARE int get_wfs_catalog_count (gaiaWFScatalogPtr handle);
287 
303  SPATIALITE_DECLARE gaiaWFSitemPtr get_wfs_catalog_item (gaiaWFScatalogPtr
304  handle, int index);
305 
317  SPATIALITE_DECLARE const char *get_wfs_item_name (gaiaWFSitemPtr handle);
318 
330  SPATIALITE_DECLARE const char *get_wfs_item_title (gaiaWFSitemPtr handle);
331 
343  SPATIALITE_DECLARE const char *get_wfs_item_abstract (gaiaWFSitemPtr
344  handle);
345 
358  SPATIALITE_DECLARE int get_wfs_layer_srid_count (gaiaWFSitemPtr handle);
359 
373  SPATIALITE_DECLARE int get_wfs_layer_srid (gaiaWFSitemPtr handle,
374  int index);
375 
388  SPATIALITE_DECLARE int get_wfs_keyword_count (gaiaWFSitemPtr handle);
389 
403  SPATIALITE_DECLARE const char *get_wfs_keyword (gaiaWFSitemPtr handle,
404  int index);
405 
421  SPATIALITE_DECLARE gaiaWFSschemaPtr create_wfs_schema (const char
422  *path_or_url,
423  const char
424  *layer_name,
425  char **err_msg);
426 
435  SPATIALITE_DECLARE void destroy_wfs_schema (gaiaWFSschemaPtr handle);
436 
458  SPATIALITE_DECLARE int get_wfs_schema_geometry_info (gaiaWFSschemaPtr
459  handle,
460  const char **name,
461  int *type, int *srid,
462  int *dims,
463  int *nullable);
464 
477  SPATIALITE_DECLARE int get_wfs_schema_column_count (gaiaWFSschemaPtr
478  handle);
479 
494  SPATIALITE_DECLARE gaiaWFScolumnPtr get_wfs_schema_column (gaiaWFSschemaPtr
495  handle,
496  int index);
497 
513  SPATIALITE_DECLARE int get_wfs_schema_column_info (gaiaWFScolumnPtr handle,
514  const char **name,
515  int *type,
516  int *nullable);
517 
523  SPATIALITE_DECLARE void reset_wfs_http_connection (void);
524 
525 #ifdef __cplusplus
526 }
527 #endif
528 
529 #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 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. ...