https://github.com/mediacomem/ogc-api-features
Generic implementation of OGC API Features with Node.js, Express and PostgreSQL
https://github.com/mediacomem/ogc-api-features
Last synced: about 1 year ago
JSON representation
Generic implementation of OGC API Features with Node.js, Express and PostgreSQL
- Host: GitHub
- URL: https://github.com/mediacomem/ogc-api-features
- Owner: MediaComem
- Created: 2023-02-13T13:05:04.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-01T12:41:21.000Z (about 3 years ago)
- Last Synced: 2025-02-14T17:43:27.052Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 58.6 KB
- Stars: 0
- Watchers: 8
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OGC API with Node.js, Express, and PostgreSQL
Generic implementation of OGC API with Node.js, Express and PostgreSQL
## Step #1
Run `cp env.sample .env` and adapt the content of the `.env` file to your environment.
It must at least have the following environment variables:
```bash
DB_NAME=''
DB_HOST=''
DB_PORT=
DB_USER=''
DB_PASSWORD=''
APP_HOST_PORT=
```
## Step #2
Create a `config.yml` file with the informations you want to display for each collection. You can take example on `config.example.yml`.
## Step #3
Install the dependencies running the following command:
`npm ci`
## Step #4
Start the server running the following command:
`node index.js`
__Note:__ For development purposes, you can use `nodemon` to automatically restart the server when a file is changed. To do so, run the following command:
`nodemon index.js`
## Step 5
If you want to have geopose information, add the entries `is_azimuth` (in case you have an azimuth instead of a yaw, the boolean must be `true`. In this case, we convert your azimuth to yaw), `yaw_field`, `roll_field` and `pitch_field` to your configuration file, as in the following example:
```
providers:
- type: feature
name: PostgreSQL
data:
schema: public
id_field: id
table: images
geom_field: location
is_azimuth: true
yaw_field: azimuth
roll_field: roll
pitch_field: tilt
```