WFS support. More...
Go to the source code of this file.
Functions | |
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. More... | |
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) More... | |
SPATIALITE_DECLARE gaiaWFScatalogPtr | create_wfs_catalog (const char *path_or_url, char **err_msg) |
Creates a Catalog for some WFS service. More... | |
SPATIALITE_DECLARE void | destroy_wfs_catalog (gaiaWFScatalogPtr handle) |
Destroys a WFS-Catalog object freeing any allocated resource. More... | |
SPATIALITE_DECLARE const char * | get_wfs_base_request_url (gaiaWFScatalogPtr handle) |
Return the base URL for any WFS-GetFeature call. More... | |
SPATIALITE_DECLARE const char * | get_wfs_base_describe_url (gaiaWFScatalogPtr handle) |
Return the base URL for any WFS-DescribeFeatureType call. More... | |
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) More... | |
SPATIALITE_DECLARE char * | get_wfs_describe_url (gaiaWFScatalogPtr handle, const char *name, const char *version) |
Return a DescribeFeatureType URL (GET) More... | |
SPATIALITE_DECLARE int | get_wfs_catalog_count (gaiaWFScatalogPtr handle) |
Return the total count of items (aka Layers) defined within a WFS-Catalog object. More... | |
SPATIALITE_DECLARE gaiaWFSitemPtr | get_wfs_catalog_item (gaiaWFScatalogPtr handle, int index) |
Return the pointer to some specific Layer defined within a WFS-Catalog object. More... | |
SPATIALITE_DECLARE const char * | get_wfs_item_name (gaiaWFSitemPtr handle) |
Return the name corresponding to some WFS-Item (aka Layer) object. More... | |
SPATIALITE_DECLARE const char * | get_wfs_item_title (gaiaWFSitemPtr handle) |
Return the title corresponding to some WFS-Item (aka Layer) object. More... | |
SPATIALITE_DECLARE const char * | get_wfs_item_abstract (gaiaWFSitemPtr handle) |
Return the abstract corresponding to some WFS-Item (aka Layer) object. More... | |
SPATIALITE_DECLARE int | get_wfs_layer_srid_count (gaiaWFSitemPtr handle) |
Return the total count of SRIDs supported by a WFS-Item object. More... | |
SPATIALITE_DECLARE int | get_wfs_layer_srid (gaiaWFSitemPtr handle, int index) |
Return one of the SRIDs supported by a WFS-Item object. More... | |
SPATIALITE_DECLARE int | get_wfs_keyword_count (gaiaWFSitemPtr handle) |
Return the total count of Keywords associated to a WFS-Item object. More... | |
SPATIALITE_DECLARE const char * | get_wfs_keyword (gaiaWFSitemPtr handle, int index) |
Return one of the Keywords supported by a WFS-Item object. More... | |
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. More... | |
SPATIALITE_DECLARE void | destroy_wfs_schema (gaiaWFSschemaPtr handle) |
Destroys a WFS-schema object freeing any allocated resource. More... | |
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. More... | |
SPATIALITE_DECLARE int | get_wfs_schema_column_count (gaiaWFSschemaPtr handle) |
Return the total count of items (aka Columns) defined within a WFS-Schema object. More... | |
SPATIALITE_DECLARE gaiaWFScolumnPtr | get_wfs_schema_column (gaiaWFSschemaPtr handle, int index) |
Return the pointer to some specific Column defined within a WFS-Schema object. More... | |
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. More... | |
SPATIALITE_DECLARE void | reset_wfs_http_connection (void) |
Resets the libxml2 "nano HTTP": useful when changing the HTTP_PROXY settings. More... | |
WFS support.
SPATIALITE_DECLARE gaiaWFScatalogPtr create_wfs_catalog | ( | const char * | path_or_url, |
char ** | err_msg | ||
) |
Creates a Catalog for some WFS service.
path_or_url | pointer to some WFS-GetCapabilities XML Document (could be a pathname or an URL). |
err_msg | on completion will contain an error message (if any) |
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.
path_or_url | pointer to some WFS-DescribeFeatureType XML Document (could be a pathname or an URL). |
err_msg | on completion will contain an error message (if any) |
SPATIALITE_DECLARE void destroy_wfs_catalog | ( | gaiaWFScatalogPtr | handle | ) |
Destroys a WFS-Catalog object freeing any allocated resource.
handle | the pointer to a valid WFS-Catalog returned by a previous call to create_wfs_catalog() |
SPATIALITE_DECLARE void destroy_wfs_schema | ( | gaiaWFSschemaPtr | handle | ) |
Destroys a WFS-schema object freeing any allocated resource.
handle | the pointer to a valid WFS-Catalog returned by a previous call to create_wfs_schema() |
SPATIALITE_DECLARE const char* get_wfs_base_describe_url | ( | gaiaWFScatalogPtr | handle | ) |
Return the base URL for any WFS-DescribeFeatureType call.
handle | the pointer to a valid WFS-Item returned by a previous call to get_wfs_catalog_item(). |
SPATIALITE_DECLARE const char* get_wfs_base_request_url | ( | gaiaWFScatalogPtr | handle | ) |
Return the base URL for any WFS-GetFeature call.
handle | the pointer to a valid WFS-Item returned by a previous call to get_wfs_catalog_item(). |
SPATIALITE_DECLARE int get_wfs_catalog_count | ( | gaiaWFScatalogPtr | handle | ) |
Return the total count of items (aka Layers) defined within a WFS-Catalog object.
handle | the pointer to a valid WFS-Catalog returned by a previous call to create_wfs_catalog() |
SPATIALITE_DECLARE gaiaWFSitemPtr get_wfs_catalog_item | ( | gaiaWFScatalogPtr | handle, |
int | index | ||
) |
Return the pointer to some specific Layer defined within a WFS-Catalog object.
handle | the pointer to a valid WFS-Catalog returned by a previous call to create_wfs_catalog() |
index | the relative index identifying the required WFS-Layer (the first Item in the WFS-Catalaog object has index ZERO). |
SPATIALITE_DECLARE char* get_wfs_describe_url | ( | gaiaWFScatalogPtr | handle, |
const char * | name, | ||
const char * | version | ||
) |
Return a DescribeFeatureType URL (GET)
handle | the pointer to a valid WFS-Item returned by a previous call to get_wfs_catalog_item(). |
name | the NAME uniquely identifying the required WFS layer. |
version | could be "1.0.0" or "1.1.0"; if NULL or invalid "1.1.0" will be assumed. |
SPATIALITE_DECLARE const char* get_wfs_item_abstract | ( | gaiaWFSitemPtr | handle | ) |
Return the abstract corresponding to some WFS-Item (aka Layer) object.
handle | the pointer to a valid WFS-Item returned by a previous call to get_wfs_catalog_item(). |
SPATIALITE_DECLARE const char* get_wfs_item_name | ( | gaiaWFSitemPtr | handle | ) |
Return the name corresponding to some WFS-Item (aka Layer) object.
handle | the pointer to a valid WFS-Item returned by a previous call to get_wfs_catalog_item(). |
SPATIALITE_DECLARE const char* get_wfs_item_title | ( | gaiaWFSitemPtr | handle | ) |
Return the title corresponding to some WFS-Item (aka Layer) object.
handle | the pointer to a valid WFS-Item returned by a previous call to get_wfs_catalog_item(). |
SPATIALITE_DECLARE const char* get_wfs_keyword | ( | gaiaWFSitemPtr | handle, |
int | index | ||
) |
Return one of the Keywords supported by a WFS-Item object.
handle | the pointer to a valid WFS-Item returned by a previous call to get_wfs_catalog_item(). |
index | the relative index identifying the required Keyword (the first Keyword associated to a WFS-Item object has index ZERO). |
SPATIALITE_DECLARE int get_wfs_keyword_count | ( | gaiaWFSitemPtr | handle | ) |
Return the total count of Keywords associated to a WFS-Item object.
handle | the pointer to a valid WFS-Item returned by a previous call to get_wfs_catalog_item(). |
SPATIALITE_DECLARE int get_wfs_layer_srid | ( | gaiaWFSitemPtr | handle, |
int | index | ||
) |
Return one of the SRIDs supported by a WFS-Item object.
handle | the pointer to a valid WFS-Item returned by a previous call to get_wfs_catalog_item(). |
index | the relative index identifying the required SRID (the first SRID value supported by a WFS-Item object has index ZERO). |
SPATIALITE_DECLARE int get_wfs_layer_srid_count | ( | gaiaWFSitemPtr | handle | ) |
Return the total count of SRIDs supported by a WFS-Item object.
handle | the pointer to a valid WFS-Item returned by a previous call to get_wfs_catalog_item(). |
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)
handle | the pointer to a valid WFS-Item returned by a previous call to get_wfs_catalog_item(). |
name | the NAME uniquely identifying the required WFS layer. |
version | could be "1.0.0" or "1.1.0"; if NULL or invalid "1.1.0" will be assumed. |
srid | the preferred SRS to be used for WFS geometries; if negative or mismatching will be simply ignored. |
max_features | the WFS MAXFEATURES argument; any negative or zero value will be ignored. |
SPATIALITE_DECLARE gaiaWFScolumnPtr get_wfs_schema_column | ( | gaiaWFSschemaPtr | handle, |
int | index | ||
) |
Return the pointer to some specific Column defined within a WFS-Schema object.
handle | the pointer to a valid WFS-Schema returned by a previous call to create_wfs_schema() |
index | the relative index identifying the required WFS-Column (the first Item in the WFS-Schema object has index ZERO). |
SPATIALITE_DECLARE int get_wfs_schema_column_count | ( | gaiaWFSschemaPtr | handle | ) |
Return the total count of items (aka Columns) defined within a WFS-Schema object.
handle | the pointer to a valid WFS-Schema returned by a previous call to create_wfs_schema() |
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.
handle | the pointer to a valid WFS-Column returned by a previous call to get_wfs_schema_column(). |
name | on completion will contain a pointer to the Column name |
type | on completion will contain the datatype set for the Column; could be one of SQLITE_TEXT, SQLITE_INTEGER or SQLITE_FLOAT |
nullable | on completion will contain a Boolean value; if TRUE the Column may contain NULL-values. |
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.
handle | the pointer to a valid WFS-Schema returned by a previous call to create_wfs_schema(). |
name | on completion will contain a pointer to the GeometryColumn name |
type | on completion will contain the GeometryType set for the Column; could be one of GAIA_POINT, GAIA_LINESTRING, GAIA_POLYGON, GAIA_MULTIPOINT, GAIA_MULTILINESTRING, GAIA_MULTIPOLYGON or GAIA_GEOMETRYCOLLECTION |
srid | on completion will contain the SRID-value set for the GeometryColumn |
dims | on completion will contain the dimensions (2 or 3) set for the GeometryColumn |
nullable | on completion will contain a Boolean value; if TRUE the Column may contain NULL-values. |
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(*)(int, void *) | progress_callback, | ||
void * | callback_ptr | ||
) |
Loads data from some WFS source.
sqlite | handle to current DB connection |
path_or_url | pointer to some WFS-GetFeature XML Document (could be a pathname or an URL). |
alt_describe_uri | an alternative URI for DescribeFeatureType to be used if no one is found within the XML document returned by GetFeature. |
layer_name | the name of the WFS layer. |
swap_axes | if TRUE the X and Y axes will be swapped |
table | the name of the table to be created |
pk_column | name of the Primary Key column; if NULL or mismatching then "PK_UID" will be assumed by default. |
spatial_index | if TRUE an R*Tree Spatial Index will be created |
rows | on completion will contain the total number of actually imported rows |
err_msg | on completion will contain an error message (if any) |
progress_callback | pointer to a callback function to be invoked immediately after processing each WFS page (could be NULL) |
callback_ptr | an arbitrary pointer (to be passed as the second argument by the callback function). |
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(*)(int, void *) | progress_callback, | ||
void * | callback_ptr | ||
) |
Loads data from some WFS source (using WFS paging)
sqlite | handle to current DB connection |
path_or_url | pointer to some WFS-GetFeature XML Document (could be a pathname or an URL). |
alt_describe_uri | an alternative URI for DescribeFeatureType to be used if no one is found within the XML document returned by GetFeature. |
layer_name | the name of the WFS layer. |
swap_axes | if TRUE the X and Y axes will be swapped |
table | the name of the table to be created |
pk_column | name of the Primary Key column; if NULL or mismatching then "PK_UID" will be assumed by default. |
spatial_index | if TRUE an R*Tree Spatial Index will be created |
page_size | max number of features for each single WFS call; if zero or negative a single monolithic page is assumed (i.e. paging will not be applied). |
rows | on completion will contain the total number of actually imported rows |
err_msg | on completion will contain an error message (if any) |
progress_callback | pointer to a callback function to be invoked immediately after processing each WFS page (could be NULL) |
callback_ptr | an arbitrary pointer (to be passed as the second argument by the callback function). |
SPATIALITE_DECLARE void reset_wfs_http_connection | ( | void | ) |
Resets the libxml2 "nano HTTP": useful when changing the HTTP_PROXY settings.