Table of Contents
Make and Update SEQUENCE in PostgreSQL - GeoServer WMST with Image mosaicking plugin
Create Table, Index, SEQUENCE, COMMENT
DROP TABLE IF EXISTS "img_lst";
DROP SEQUENCE IF EXISTS raster.img_lst_fid_seq;
CREATE SEQUENCE raster.img_lst_fid_seq INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 CACHE 1;
CREATE TABLE "raster"."img_lst" (
"fid" integer DEFAULT nextval('raster.img_lst_fid_seq') NOT NULL,
"the_geom" public.geometry(Polygon,32648),
"location" character varying(255),
"ingestion" timestamp,
"elevation" integer,
"nguon" character varying,
CONSTRAINT "img_lst_pkey" PRIMARY KEY ("fid")
) WITH (oids = false);
CREATE INDEX "spatial_img_lst_the_geom" ON "raster"."img_lst" USING btree ("the_geom");
COMMENT ON TABLE "raster"."img_lst" IS 'Danh sách ảnh Nhiệt độ bề mặt (LST)';
COMMENT ON COLUMN "raster"."img_lst"."fid" IS '{"label": "FID","isshow": 1,"isnull": 0,"type": "text"}';
COMMENT ON COLUMN "raster"."img_lst"."the_geom" IS '{"label": "Geometry","isshow": 0,"isnull": 0,"type": "text"}';
COMMENT ON COLUMN "raster"."img_lst"."location" IS '{"label": "Tên ảnh","isshow": 1,"isnull": 0,"type": "text"}';
COMMENT ON COLUMN "raster"."img_lst"."ingestion" IS '{"label": "Thời gian","isshow": 1,"isnull": 0,"type": "date"}';
COMMENT ON COLUMN "raster"."img_lst"."nguon" IS '{"label": "Nguồn","isshow": 1,"isnull": 0,"type": "text"}';
INSERT INTO "img_lst" ("fid", "the_geom", "location", "ingestion", "elevation", "nguon") VALUES
(5, '0103000020887F000001000000050000000000000042C8234100000000118331410000000042C823410000000055D43241000000008A0526410000000055D43241000000008A05264100000000118331410000000042C823410000000011833141', 'HoChiMinhIMAGES_20180217_BLST.TIF', '2018-02-17 07:00:00', NULL, NULL),
(1, '0103000020887F000001000000050000000000000042C8234100000000118331410000000042C823410000000055D43241000000008A0526410000000055D43241000000008A05264100000000118331410000000042C823410000000011833141', 'HoChiMinhIMAGES_20140326_BLST.TIF', '2014-03-26 07:00:00', NULL, 'Trung tâm Vũ trụ Việt Nam'),
(2, '0103000020887F000001000000050000000000000042C8234100000000118331410000000042C823410000000055D43241000000008A0526410000000055D43241000000008A05264100000000118331410000000042C823410000000011833141', 'HoChiMinhIMAGES_20150209_BLST.TIF', '2015-02-09 07:00:00', NULL, 'Trung tâm Vũ trụ Việt Nam'),
(3, '0103000020887F000001000000050000000000000042C8234100000000118331410000000042C823410000000055D43241000000008A0526410000000055D43241000000008A05264100000000118331410000000042C823410000000011833141', 'HoChiMinhIMAGES_20160228_BLST.TIF', '2016-02-28 07:00:00', NULL, 'Trung tâm Vũ trụ Việt Nam'),
(4, '0103000020887F000001000000050000000000000042C8234100000000118331410000000042C823410000000055D43241000000008A0526410000000055D43241000000008A05264100000000118331410000000042C823410000000011833141', 'HoChiMinhIMAGES_20170214_BLST.TIF', '2017-02-14 07:00:00', NULL, 'Trung tâm Vũ trụ Việt Nam'),
(6, '0103000020887F000001000000050000000000000042C8234100000000118331410000000042C823410000000055D43241000000008A0526410000000055D43241000000008A05264100000000118331410000000042C823410000000011833141', 'HoChiMinhIMAGES_20190220_BLST.TIF', '2019-02-20 07:00:00', NULL, 'Trung tâm Vũ trụ Việt Nam');
-- 2019-11-05 09:31:02.852158+07
SELECT setval('raster.img_lst_fid_seq', max(fid)) FROM raster.img_lst;
Update schema
ALTER TABLE diadanh_point
SET SCHEMA bentre;