Skip to content

Installation

Willy Wong edited this page Aug 1, 2019 · 9 revisions

CIL Image Viewer installation

  1. cd $YOUR_GIT_FOLDER

  2. git clone https://github.com/CRBS/CIL_Image_Viewer.git

  3. Make your CIL_Image_Viewer as the DocumentRoot in the Apache httpd.conf

  4. Edit application/config/config.php

  5. Create your own cil_annotation_service_config.json

Example:

{
  "cil_annotation_pgsql_db":"host=*** port=5432 dbname=cil_image_annotation_db user=*** password=****",
  "users":[
  	{
  		"username":"***",
  		"password":"****",
  		"salt": "*****"
  	}
  ]
}

  1. Create your PostgreSQL database
CREATE DATABASE cil_image_annotation_db
  WITH OWNER = ccdbd_dev
       ENCODING = 'UTF8'
       TABLESPACE = pg_default
       LC_COLLATE = 'en_US.UTF-8'
       LC_CTYPE = 'en_US.UTF-8'
       CONNECTION LIMIT = -1;

  1. Create tables
CREATE TABLE images
(
  id bigint NOT NULL,
  image_id text,
  max_z integer,
  is_rgb boolean,
  update_timestamp timestamp without time zone,
  is_public boolean,
  max_zoom integer,
  init_lat integer,
  init_lng integer,
  init_zoom integer,
  is_timeseries boolean DEFAULT false,
  max_t integer,
  x_pixel_offset bigint DEFAULT 0,
  y_pixel_offset bigint DEFAULT 0,
  original_file_location text,
  max_x bigint,
  max_y bigint,
  CONSTRAINT image_id_pk PRIMARY KEY (id),
  CONSTRAINT unique_image_id UNIQUE (image_id)
)
CREATE TABLE image_annotation_metadata
(
  id bigint NOT NULL,
  cil_id text,
  zindex integer,
  object_id text,
  description text,
  update_time timestamp without time zone,
  CONSTRAINT i_annotation_metadata_pk PRIMARY KEY (id)
)

CREATE TABLE image_annotation
(
  id bigint NOT NULL,
  cil_id text,
  z_index integer,
  geo_json text,
  update_timestamp timestamp without time zone,
  CONSTRAINT image_annotation_pk PRIMARY KEY (id)
)
CREATE TABLE image_annotation_history
(
  id bigint NOT NULL,
  cil_id text,
  z_index integer,
  geo_json text,
  update_timestamp timestamp without time zone,
  CONSTRAINT image_annotation_history_pk PRIMARY KEY (id)
)
  1. Create database sequences
CREATE SEQUENCE cdeep3m_seq
  INCREMENT 1
  MINVALUE 1
  MAXVALUE 9223372036854775807
  START 1
  CACHE 1;
CREATE SEQUENCE general_sequence
  INCREMENT 1
  MINVALUE 1
  MAXVALUE 9223372036854775807
  START 3483
  CACHE 1;
Clone this wiki locally