0.4.1 • Published 6 years ago

wfs-client v0.4.1

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

wfs-client CircleCI

A very simple WFS client

npm version dependencies Status XO code style

Features

  • 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

Usage

Create a client

const WfsClient = require('wfs-client')
const client = new WfsClient('http://your-wfs-server.tld/wfs', options)

Options

Option nameTypeDescriptionDefaultExample
versionOptionalIf you want to by-pass version negociationundefined1.1.0
userAgentOptionalUser-Agent used in requestswfs-client/{version} (+https://github.com/geodatagouv/wfs-client)WFSBot 1.0

Get service capabilities

const capabilities = await client.capabilities()

// Service identification
console.log(capabilities.service)

// Feature types
console.log(capabilities.featureTypes)

Service identification example

{
  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'
}

Feature types example

[
  {
    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'
    ]
  }
]

TODO

  • 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

About

License

MIT

Author

Jérôme Desboeufs (@jdesboeufs)

0.4.1

6 years ago

0.4.0

6 years ago

0.3.0

7 years ago

0.2.2

7 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago