A very simple WFS client
- Support of versions 1.0.0, 1.1.0 and 2.0.0
- Version negociation
- Service identification in plain JavaScript / JSON
- List all feature types
- Based on Q promises
var wfs = require('wfs-client');
var client = wfs('http://your-wfs-server.tld/wfs', options);
Option name | Type | Description | Default | Example |
---|---|---|---|---|
version | Optional | If you want to by-pass version negociation | undefined | 1.1.0 |
retry | Optional | If your server is unstable and you want to try again N times | false | 2 |
userAgent | Optional | User-Agent used in requests | Empty | WFSBot 1.0 |
client.capabilities()
.done(function(capabilities) {
// Service identification
console.log(capabilities.service);
// Feature types
console.log(capabilities.featureTypes);
})
.fail(function(err) {
console.trace(err);
});
{
title: 'My WFS server title',
abstract: 'This WFS server is dedicated to environment data...',
keywords: [ 'Data', 'Water', 'Energy', 'France', 'Europa'],
serviceType: 'WFS',
serviceTypeVersion: '2.0.0',
fees: 'Free',
accessConstraints: 'None'
}
[
{
name: 'orgA:wind_power_zones',
title: 'Wind power zones',
keywords: [
'Wind power',
'Energy',
'Zoning'
]
},
{
name: 'orgB:solar_energy_zones',
title: 'Solar energy zones',
keywords: [
'Solar energy',
'Energy',
'Zoning'
]
}
]
- Read ServiceProvider (>= 1.1.0)
- Read Capability (1.0.0) and OperationsMetadata (>= 1.1.0)
- Read SRS and bounding boxes
- Support GetFeature
- Add Node-style callbacks
- Tests and more tests
MIT
Jérôme Desboeufs (@jdesboeufs)