Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/geocml/tabor

Tabor is a database modeling language for GIS
https://github.com/geocml/tabor

command-line database-modeling gis postgis postgresql programming-language yaml

Last synced: 24 days ago
JSON representation

Tabor is a database modeling language for GIS

Awesome Lists containing this project

README

        

# Tabor

Tabor is a database modeling language for GIS based on YAML, but with additional syntax restrictions. The goal of the Tabor project is to allow GIS users to create and maintain complex database rules using plain-text configuration files. The following is an example of a Tabor configuration file for a PostGIS database:

```
tabor: 0.3.0
layers:

- name: grass
schema: public
owner: geocml
geometry: polygon
srid: 4326
fields:
- name: fid
type: int
pk: true

- name: trees
schema: public
owner: geocml
geometry: point
srid: 4326
fields:
- name: fid
type: int
pk: true
- name: genus
type: text
- name: species
type: text
- name: height_meters
type: numeric
- name: circumference_cm
type: numeric
constraints:
- name: on
layer: grass

- name: streams
schema: public
owner: geocml
geometry: polyline
srid: 4326
fields:
- name: fid
type: int
pk: true
```

Running this file through the Tabor command line utility generates a valid PostgreSQL schema query that can be used to create or update tables in a PostGIS database.

# Downloading and Installing Tabor

Tabor can be downloaded directly from this repository (under Releases). After downloading, simply extract the downloaded .zip file to a directory accessible on your terminal path.

# Usage

`tabor read --file ` -> Converts a .tabor file into a PostGIS schema query.

`tabor write --file --db --username --password --host --port --ignore ` -> Converts a PostGIS database to a .tabor file

`tabor load --file --db --username --password --host --port ` -> Loads a PostGIS database from a .tabor file.