Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brambow/koop-provider-postgis
PostGIS provider for Koop.js
https://github.com/brambow/koop-provider-postgis
Last synced: 18 days ago
JSON representation
PostGIS provider for Koop.js
- Host: GitHub
- URL: https://github.com/brambow/koop-provider-postgis
- Owner: brambow
- License: other
- Created: 2017-10-28T18:43:31.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-29T12:50:29.000Z (about 7 years ago)
- Last Synced: 2024-08-01T00:46:45.617Z (3 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 8
- Watchers: 1
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
* implement tests
* remove squel dependency (maybe)
* add routes/controllers for expanded API (e.g. run a buffer or intersection query)
* refactor for better connection initialization (i.e. set at app runtime)
* refactor URLs (e.g. make schema=host & table=id, or similar)