SpatiaLite  4.2.0
 All Data Structures Files Functions Variables Typedefs Macros Pages
gg_wfs.h
Go to the documentation of this file.
1 /*
2  gg_wfs.h -- Gaia common support for WFS
3 
4  version 4.2, 2014 July 25
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-2013
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_base_request_url (gaiaWFScatalogPtr
203  handle);
204 
215  SPATIALITE_DECLARE const char *get_wfs_base_describe_url (gaiaWFScatalogPtr
216  handle);
217 
238  SPATIALITE_DECLARE char *get_wfs_request_url (gaiaWFScatalogPtr handle,
239  const char *name,
240  const char *version,
241  int srid, int max_features);
242 
259  SPATIALITE_DECLARE char *get_wfs_describe_url (gaiaWFScatalogPtr handle,
260  const char *name,
261  const char *version);
262 
274  SPATIALITE_DECLARE int get_wfs_catalog_count (gaiaWFScatalogPtr handle);
275 
291  SPATIALITE_DECLARE gaiaWFSitemPtr get_wfs_catalog_item (gaiaWFScatalogPtr
292  handle, int index);
293 
305  SPATIALITE_DECLARE const char *get_wfs_item_name (gaiaWFSitemPtr handle);
306 
318  SPATIALITE_DECLARE const char *get_wfs_item_title (gaiaWFSitemPtr handle);
319 
331  SPATIALITE_DECLARE const char *get_wfs_item_abstract (gaiaWFSitemPtr
332  handle);
333 
346  SPATIALITE_DECLARE int get_wfs_layer_srid_count (gaiaWFSitemPtr handle);
347 
361  SPATIALITE_DECLARE int get_wfs_layer_srid (gaiaWFSitemPtr handle,
362  int index);
363 
376  SPATIALITE_DECLARE int get_wfs_keyword_count (gaiaWFSitemPtr handle);
377 
391  SPATIALITE_DECLARE const char *get_wfs_keyword (gaiaWFSitemPtr handle,
392  int index);
393 
409  SPATIALITE_DECLARE gaiaWFSschemaPtr create_wfs_schema (const char
410  *path_or_url,
411  const char
412  *layer_name,
413  char **err_msg);
414 
423  SPATIALITE_DECLARE void destroy_wfs_schema (gaiaWFSschemaPtr handle);
424 
446  SPATIALITE_DECLARE int get_wfs_schema_geometry_info (gaiaWFSschemaPtr
447  handle,
448  const char **name,
449  int *type, int *srid,
450  int *dims,
451  int *nullable);
452 
465  SPATIALITE_DECLARE int get_wfs_schema_column_count (gaiaWFSschemaPtr
466  handle);
467 
482  SPATIALITE_DECLARE gaiaWFScolumnPtr get_wfs_schema_column (gaiaWFSschemaPtr
483  handle,
484  int index);
485 
501  SPATIALITE_DECLARE int get_wfs_schema_column_info (gaiaWFScolumnPtr handle,
502  const char **name,
503  int *type,
504  int *nullable);
505 
511  SPATIALITE_DECLARE void reset_wfs_http_connection (void);
512 
513 #ifdef __cplusplus
514 }
515 #endif
516 
517 #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_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. ...