regions_v090_sql.json

Thomas Gumbricht bio photo By Thomas Gumbricht

jsonsql/regions (setup_db)

Install tables that hold regions

The json command file regions_v090_sql.json is part of karttur’s GeoImagine project setup_db. Calling the json file will execute the following commands of the GeoImagine Framework.

{
  "process": [
    {
      "processid": "createtable",
      "overwrite": false,
      "delete": false,
      "parameters": {
        "db": "karttur",
        "schema": "regions",
        "table": "regions",
        "command": [
          "system varchar(16)",
          "regioncat varchar(32)",
          "regionid varchar(64)",
          "regiontype char(1)",
          "epsg smallint",
          "ullat double precision",
          "ullon double precision",
          "urlat double precision",
          "urlon double precision",
          "lrlat double precision",
          "lrlon double precision",
          "lllat double precision",
          "lllon double precision",
          "minx double precision",
          "miny double precision",
          "maxx double precision",
          "maxy double precision",
          "PRIMARY KEY (system, regionid)"
        ]
      }
    },
    {
      "processid": "createtable",
      "overwrite": false,
      "delete": false,
      "parameters": {
        "db": "karttur",
        "schema": "regions",
        "table": "defregions",
        "command": [
          "system varchar(16)",
          "regioncat varchar(32) NOT NULL",
          "regionid varchar(64)",
          "regionname varchar(64)",
          "parentid varchar(32) NOT NULL",
          "title TEXT",
          "label TEXT",
          "PRIMARY KEY (system,regioncat,regionid)"
        ]
      }
    },
    {
      "processid": "createtable",
      "overwrite": false,
      "delete": false,
      "parameters": {
        "db": "karttur",
        "schema": "regions",
        "table": "tracts",
        "command": [
          "system varchar(16)",
          "parentid TEXT NOT NULL",
          "tractid TEXT",
          "tractname varchar(64)",
          "regiontype char(1)",
          "creator varchar(32)",
          "owner varchar(32)",
          "title varchar(64)",
          "label varchar(128)",
          "share smallint DEFAULT 5",
          "createdate date DEFAULT CURRENT_DATE",
          "PRIMARY KEY (system,tractid)"
        ]
      }
    },
    {
      "processid": "createtable",
      "overwrite": false,
      "delete": false,
      "parameters": {
        "db": "karttur",
        "schema": "regions",
        "table": "sites",
        "command": [
          "system varchar(16)",
          "siteid TEXT",
          "sitename varchar(64)",
          "owner varchar(32)",
          "tractid TEXT",
          "title TEXT",
          "label TEXT",
          "share smallint DEFAULT 5",
          "createdate date DEFAULT CURRENT_DATE",
          "PRIMARY KEY (system,siteid,tractid,owner)"
        ]
      }
    }
  ]
}