SpatiaLite  4.1.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.1, 2013 May 14
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 
177  SPATIALITE_DECLARE gaiaWFScatalogPtr create_wfs_catalog (const char
178  *path_or_url,
179  char **err_msg);
180 
189  SPATIALITE_DECLARE void destroy_wfs_catalog (gaiaWFScatalogPtr handle);
190 
201  SPATIALITE_DECLARE const char *get_wfs_base_request_url (gaiaWFScatalogPtr
202  handle);
203 
214  SPATIALITE_DECLARE const char *get_wfs_base_describe_url (gaiaWFScatalogPtr
215  handle);
216 
237  SPATIALITE_DECLARE char *get_wfs_request_url (gaiaWFScatalogPtr handle,
238  const char *name,
239  const char *version,
240  int srid, int max_features);
241 
258  SPATIALITE_DECLARE char *get_wfs_describe_url (gaiaWFScatalogPtr handle,
259  const char *name,
260  const char *version);
261 
273  SPATIALITE_DECLARE int get_wfs_catalog_count (gaiaWFScatalogPtr handle);
274 
290  SPATIALITE_DECLARE gaiaWFSitemPtr get_wfs_catalog_item (gaiaWFScatalogPtr
291  handle, int index);
292 
304  SPATIALITE_DECLARE const char *get_wfs_item_name (gaiaWFSitemPtr handle);
305 
317  SPATIALITE_DECLARE const char *get_wfs_item_title (gaiaWFSitemPtr handle);
318 
330  SPATIALITE_DECLARE const char *get_wfs_item_abstract (gaiaWFSitemPtr
331  handle);
332 
345  SPATIALITE_DECLARE int get_wfs_layer_srid_count (gaiaWFSitemPtr handle);
346 
360  SPATIALITE_DECLARE int get_wfs_layer_srid (gaiaWFSitemPtr handle,
361  int index);
362 
375  SPATIALITE_DECLARE int get_wfs_keyword_count (gaiaWFSitemPtr handle);
376 
390  SPATIALITE_DECLARE const char *get_wfs_keyword (gaiaWFSitemPtr handle,
391  int index);
392 
408  SPATIALITE_DECLARE gaiaWFSschemaPtr create_wfs_schema (const char
409  *path_or_url,
410  const char
411  *layer_name,
412  char **err_msg);
413 
422  SPATIALITE_DECLARE void destroy_wfs_schema (gaiaWFSschemaPtr handle);
423 
445  SPATIALITE_DECLARE int get_wfs_schema_geometry_info (gaiaWFSschemaPtr
446  handle,
447  const char **name,
448  int *type, int *srid,
449  int *dims,
450  int *nullable);
451 
464  SPATIALITE_DECLARE int get_wfs_schema_column_count (gaiaWFSschemaPtr
465  handle);
466 
481  SPATIALITE_DECLARE gaiaWFScolumnPtr get_wfs_schema_column (gaiaWFSschemaPtr
482  handle,
483  int index);
484 
500  SPATIALITE_DECLARE int get_wfs_schema_column_info (gaiaWFScolumnPtr handle,
501  const char **name,
502  int *type,
503  int *nullable);
504 
505 #ifdef __cplusplus
506 }
507 #endif
508 
509 #endif /* _GG_WFS_H */