| | |
| | | -- DROP TABLE IF EXISTS lf.sys_meta; |
| | | create table lf.sys_meta( |
| | | id serial primary key, |
| | | dirid integer, |
| | | depid integer, |
| | | name varchar(256), |
| | | format varchar(100), |
| | | fsize bigint default 0, |
| | | dirid integer default 0, |
| | | depid integer default 0, |
| | | verid integer default 0, |
| | | type varchar(100), |
| | | sizes bigint default 0, |
| | | cs varchar(50), |
| | | fscale varchar(50), |
| | | scale varchar(50), |
| | | resolution varchar(50), |
| | | gather timestamp(6) without time zone, |
| | | descr varchar(256), |
| | | guid varchar(40) default null, |
| | | create_user integer default 1, |
| | | create_time timestamp(6) without time zone default now(), |
| | | update_user integer, |
| | |
| | | CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geo) = 'POLYGON'::text OR geo IS NULL), |
| | | CONSTRAINT enforce_srid_geom CHECK (st_srid(geo) = 4490) |
| | | ); |
| | | create index index_sys_meta_geo on lf.sys_meta using gist (geo); |
| | | -- drop index index_sys_meta_geo; |
| | | create index index_sys_meta_geo on lf.sys_meta using GIST (geo); |
| | | comment on table lf.sys_meta is '元数据表'; |
| | | comment on column lf.sys_meta.id is '主键ID'; |
| | | comment on column lf.sys_meta.name is '名称'; |
| | | comment on column lf.sys_meta.dirid is '目录ID'; |
| | | comment on column lf.sys_meta.depid is '单位ID'; |
| | | comment on column lf.sys_meta.name is '名称'; |
| | | comment on column lf.sys_meta.format is '格式'; |
| | | comment on column lf.sys_meta.fsize is '大小:单位为kb'; |
| | | comment on column lf.sys_meta.verid is '版本ID'; |
| | | comment on column lf.sys_meta.type is '格式'; |
| | | comment on column lf.sys_meta.sizes is '大小:单位为B'; |
| | | comment on column lf.sys_meta.cs is '坐标系'; |
| | | comment on column lf.sys_meta.fscale is '比例尺'; |
| | | comment on column lf.sys_meta.scale is '比例尺'; |
| | | comment on column lf.sys_meta.resolution is '分辨率'; |
| | | comment on column lf.sys_meta.gather is '采集日期'; |
| | | comment on column lf.sys_meta.descr is '描述'; |
| | | comment on column lf.sys_meta.guid is '文件ID'; |
| | | comment on column lf.sys_meta.create_user is '创建人ID'; |
| | | comment on column lf.sys_meta.create_time is '创建时间'; |
| | | comment on column lf.sys_meta.update_user is '更新人ID'; |
| | | comment on column lf.sys_meta.update_time is '更新时间'; |
| | | comment on column lf.sys_meta.geo is '空间'; |
| | | --insert into lf.sys_meta(dirid,depid,name,geo) values (1,1,'Test',ST_PolygonFromText('POLYGON ((100 0,120 0,120 20,100 20,100 0))',4490)); |
| | | comment on column lf.sys_meta.geo is '空间位置'; |
| | | -- insert into lf.sys_meta(dirid,depid,name,geo) values (1,1,'Test',ST_PolygonFromText('POLYGON ((100 0,120 0,120 20,100 20,100 0))',4490)); |
| | | |
| | | select id,dirid,depid,name,descr,guid,create_user,create_time,update_user,update_time,st_astext(geo) from lf.sys_meta; |
| | | select * from lf.sys_meta; select id,name,dirid,depid,verid,type,sizes,descr,create_user,create_time,update_user,update_time,st_astext(geo) from lf.sys_meta; |
| | | ----------------------------------------------------------------------------------------------------- 17.元数据文件表 |
| | | -- DROP TABLE IF EXISTS lf.sys_meta_file; |
| | | create table lf.sys_meta_file( |
| | |
| | | comment on column lf.sys_download.create_time is '创建时间'; |
| | | comment on column lf.sys_download.download_user is '下载人ID'; |
| | | comment on column lf.sys_download.download_time is '下载时间'; |
| | | comment on column lf.sys_download.geo is '空间'; |
| | | comment on column lf.sys_download.bak is '备注'; |
| | | comment on column lf.sys_download.geo is '空间位置'; |
| | | -- insert into lf.sys_download (name,pwd,url,descr) values ('2022-09-27','123456','','测试下载'); |
| | | |
| | | select * from lf.sys_download; |