Giter VIP home page Giter VIP logo

provider-ogcapi-features's Introduction

@koopjs/provider-ogcapi-features

npm Build Status

Experimental Koop provider for OGC API - Features

Installation

npm install @koopjs/provider-ogcapi-features

Configuration

The configuration of this provider is defined under the provider-ogcapi-features namespace. You can update the configuration file for the Koop app to configure this plugin.

{
  "provider-ogcapi-features": {
    // the "hosts" object defines a list of hosts that exposes OGC Features API
    "hosts": {
      // each host has a unique id, which will be used in the request URL
      "host_id": {
        // host URL
        "url": "https://server-url.com",
        // optional, the name of ID field in the feature properties
        "idField": "id_field_name"
      }
    }
  }
}

For example, the following configuration specifies that a host cubeserv with the host URL.

{
  "provider-ogcapi-features": {
    "hosts": {
      "cubeserv": {
        "url": "http://www.pvretano.com/cubewerx/cubeserv/default/wfs/3.0.0/framework"
      }
    }
  }
}

This provider uses the :host and :id parameter in the URL to identify the target collection.

The :host parameter is the host id defined in the configuration file. In the above example, the user can construct the request URL with the host cubeserv.

The :id parameter is a collection id from the selected host service. According to the OGCAPI spec, the user can get a list of all collections from the /collections request. In the above example, the collection id can be found in

http://www.pvretano.com/cubewerx/cubeserv/default/wfs/3.0.0/framework/collections?f=json

and JURISDICTIONAL is a valid colleciton id.

Then the user is able to fetch the features from this collection with the following URL:

/ogcapi-features/cubeserv/JURISDICTIONAL/FeatureServer/0/query

The actual data comes from the service request

https://eratosthenes.pvretano.com/cubewerx/cubeserv/default/wfs/3.0.0/framework/collections/JURISDICTIONAL/items?f=json

Usage

This provider can be registered in a Koop app.

const Koop = require("koop");
const ogcProvider = require("@koopjs/provider-ogcapi-features");

Koop.register(ogcProvider);

If the app is developed using the Koop CLI, it can be auto-registered with

koop add @koopjs/provider-ogcapi-features

Roadmap

  • Support pagination using the limit parameter or prev/next link
  • Support property filtering

provider-ogcapi-features's People

Contributors

haoliangyu avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.