Skip to content
This repository was archived by the owner on Sep 19, 2024. It is now read-only.

WFS Connector

Henning Bredel edited this page Aug 29, 2014 · 24 revisions

The OGC Web Feature Service (WFS) provides standardized access to features provided by a remote Web server. The connector is able to read feature resources from WFS 1.1.0 compliant servers. In the future more versions may be supported.

  • [Concepts and Workflow](Concepts and Workflow (WFS))
  • Architecture

Simple Usage

Load WFS feature types into a catalog, load first feature type to an IFeatureCoverage and store the same into an ESRI .shp file:

QUrl connectionString("http://ogi.state.ok.us/geoserver/wfs?service=WFS");
Resource wfsCatalog(connectionString, itCATALOG);
ICatalog cat(wfsCatalog);

IFeatureCoverage coverage;
std::vector<Resource> items = cat->items();
if ( !coverage.prepare(items.front())) {
    std::cout << "Could not prepare coverage.";
    return;
}

QDir baseDataPath = TestSuite::instance()->outputDataPath();
QUrl outputFeature = QUrl("file:///C/somepath/feature.shp");
coverage->connectTo(outputFeature.toString(), "ESRI Shapefile", "gdal", IlwisObject::cmOUTPUT);
coverage->store();

Open Tasks

The WFS connector does not make use of the full WFS funcionality (yet). The following features are should be considered in a next implementation phase:

  • Make use of querying features (spatial, temporal, thematic)
  • Separate loading attribute/geometry data from whole feature loading
  • Implement transactional client

Clone this wiki locally