brambow / koop-provider-postgis

PostGIS provider for Koop.js
Other
8 stars 7 forks source link

koop-provider-postgis

A PostGIS provider for Koop.js. Serve ESRI GeoServices from a PostGIS database!

Installation

npm install brambow/koop-provider-postgis 

Configuration

After install you need to set the PostGIS connection string in config/default.json, where you set username, password, server, port, and database values.

{
  "db": {
    "postgis": "postgres://username:password@server:port/database"
  }
}

Example:

{
  "db": {
    "postgis": "postgres://postgres:postgres@localhost:5432/test-database"
  }
}

Usage

This provider comes with a built-in server for testing purposes. Simply run npm start

The structure of the URLs is like this (for now, expect changes in the future)

http://{yourserver}/postgis/FeatureServer/0/query?table={schema.tablename}&columns={columns}

However, this is designed to be used as a provider within a Koop application. See koopjs/koop-sample-app for examples.

To Do