package com.moon.server.entity.shujian; import com.moon.server.helper.StringHelper; import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @SuppressWarnings("AlibabaLowerCamelCaseVariableNaming") public class CreateLayerEntity implements Serializable { private static final long serialVersionUID = 8392354493626395905L; private Layer layer; private List image_path_list; private ImageOvr image_ovr; private Integer create_service; public CreateLayerEntity() { this.create_service = 0; this.layer = new Layer(); this.image_ovr = new ImageOvr(); this.image_path_list = new ArrayList<>(); } public Layer getLayer() { return layer; } public void setLayer(Layer layer) { this.layer = layer; } public List getImage_path_list() { return image_path_list; } public void setImage_path_list(List image_path_list) { this.image_path_list = image_path_list; } public ImageOvr getImage_ovr() { return image_ovr; } public void setImage_ovr(ImageOvr image_ovr) { this.image_ovr = image_ovr; } public Integer getCreate_service() { return create_service; } public void setCreate_service(Integer create_service) { this.create_service = create_service; } public class Layer { private String name; /** * nodata设置,数组,数组大小和波段数等同 */ private List nodata; /** * 投影或者坐标:EPSG:4326 */ private String projection; /** * 透明色,默认:"-1,-1,-1" */ private String trans_color; /** * 输出波段,默认:"1,2,3",或为"3,2,1" */ private String tile_rgb; /** * 图层类型。0:普通,1:DEM图层,2:自定义 */ private Integer type; /** * 拉伸方式 0:不拉伸, 1 线性拉伸, 2 直方图均衡, 3 标准差拉伸, 4 伽马拉伸 */ private Integer enhance_type; /** * 直方图统计方式,0:普通,1:精细 */ private Integer stats_type; /** * 图层起始比例尺:1000000000 */ private Double start_scale; /** * 图层结束比例尺:1 */ private Double end_scale; /** * 发布信息,默认为"{}" */ private String pub_config; /** * 图层和影像相关的配置,默认"{}",配置内容包括但不限于:处理过程、边界控制方法 */ private Config config; /** * 拉伸因子,配合 enhance_factor使用 */ private Double enhance_factor; private Integer image_type = -1; private Integer sat_id = -1; private Integer sensor_id = -1; //private Integer pub_status = 0; private String type_i = ""; private String type_ii = ""; private String type_iii = ""; private String type_iv = ""; /** * 边界计算方式 0外包,1, 内接, 2 精准 */ private Integer boundary_cal_mode; public Layer() { this.projection = "ESRI:104903"; this.trans_color = "-1,-1,-1"; this.tile_rgb = "1,2,3"; this.end_scale = 1.0; this.start_scale = 1048576000.0; this.stats_type = 1; this.enhance_type = 0; this.enhance_factor = null; this.boundary_cal_mode = 0; } public String getName() { return name; } public void setName(String name) { this.name = name; } public List getNodata() { return nodata; } public void setNodata(List nodata) { this.nodata = nodata; } public String getProjection() { return projection; } public void setProjection(String projection) { this.projection = projection; } public String getTrans_color() { return trans_color; } public void setTrans_color(String trans_color) { this.trans_color = trans_color; } public String getTile_rgb() { return tile_rgb; } public void setTile_rgb(String tile_rgb) { this.tile_rgb = tile_rgb; } public Integer getType() { return type; } public void setType(Integer type) { this.type = type; } public Integer getEnhance_type() { return enhance_type; } public void setEnhance_type(Integer enhance_type) { this.enhance_type = enhance_type; } public Integer getStats_type() { return stats_type; } public void setStats_type(Integer stats_type) { this.stats_type = stats_type; } public Double getStart_scale() { return start_scale; } public void setStart_scale(Double start_scale) { this.start_scale = start_scale; } public Double getEnd_scale() { return end_scale; } public void setEnd_scale(Double end_scale) { this.end_scale = end_scale; } public String getPub_config() { return pub_config; } public void setPub_config(String pub_config) { this.pub_config = pub_config; } public Config getConfig() { return config; } public void setConfig(Config config) { this.config = config; } public Double getEnhance_factor() { return enhance_factor; } public void setEnhance_factor(Double enhance_factor) { this.enhance_factor = enhance_factor; } public Integer getBoundary_cal_mode() { return boundary_cal_mode; } public void setBoundary_cal_mode(Integer boundary_cal_mode) { this.boundary_cal_mode = boundary_cal_mode; } public Integer getImage_type() { return image_type; } public void setImage_type(Integer image_type) { this.image_type = image_type; } public Integer getSat_id() { return sat_id; } public void setSat_id(Integer sat_id) { this.sat_id = sat_id; } public Integer getSensor_id() { return sensor_id; } public void setSensor_id(Integer sensor_id) { this.sensor_id = sensor_id; } public String getType_i() { return type_i; } public void setType_i(String type_i) { this.type_i = type_i; } public String getType_ii() { return type_ii; } public void setType_ii(String type_ii) { this.type_ii = type_ii; } public String getType_iii() { return type_iii; } public void setType_iii(String type_iii) { this.type_iii = type_iii; } public String getType_iv() { return type_iv; } public void setType_iv(String type_iv) { this.type_iv = type_iv; } } /** * 影像目录列表 */ public class ImagePathList { /** * 数据源:当前只能为Local */ private String datasource; /** * 目录 */ private String path; /** * 0:不递归枷锁,1:递归检索 */ private Integer recursion; /** * 影像时间 */ private String image_time; /** * 过滤器组列表:["a.tif|b.tif"] */ private List filter; /** * 属性过滤 */ private Object attr_filter; public ImagePathList() { this.datasource = "Local"; this.recursion = 0; this.filter = new ArrayList<>(); } public String getDatasource() { return datasource; } public void setDatasource(String datasource) { this.datasource = datasource; } public String getPath() { return path; } public void setPath(String path) { this.path = path; } public Integer getRecursion() { return recursion; } public void setRecursion(Integer recursion) { this.recursion = recursion; } public String getImage_time() { return image_time; } public void setImage_time(String image_time) { this.image_time = image_time; } public List getFilter() { return filter; } public void setFilter(List filter) { this.filter = filter; } public Object getAttr_filter() { return attr_filter; } public void setAttr_filter(Object attr_filter) { this.attr_filter = attr_filter; } } /** * 金字塔配置 */ public class ImageOvr { /** * 0:集中生成和存储金字塔,1:与数据在同一目录 */ private Integer same_path; /** * 0:有金字塔忽略,1:强制删除金字塔重新创建 */ private Integer force_del; /** * 采样算法,0:最近邻,1:双线性插值,2:三次卷积,3:三次样条插值 */ private Integer sample_type; public ImageOvr() { this.same_path = 1; this.force_del = 0; this.sample_type = 0; } public Integer getSame_path() { return same_path; } public void setSame_path(Integer same_path) { this.same_path = same_path; } public Integer getForce_del() { return force_del; } public void setForce_del(Integer force_del) { this.force_del = force_del; } public Integer getSample_type() { return sample_type; } public void setSample_type(Integer sample_type) { this.sample_type = sample_type; } } /** * 颜色表配置 */ public class Config { // private Process process private Integer optm; private List online_process; public Config(Integer colorTableId, Integer type, List levels) { Process process = new Process(colorTableId, type, levels); this.online_process = new ArrayList<>(); this.online_process.add(process); this.optm = 1; } public Integer getOptm() { return optm; } public void setOptm(Integer optm) { this.optm = optm; } public List getOnline_process() { return online_process; } public void setOnline_process(List online_process) { this.online_process = online_process; } } /** * 处理层级 */ public class Process { private String uuid; private String name; private Integer color_table_id; private Map config; public Process() { this.uuid = StringHelper.getGuid(); this.name = "color_table"; this.color_table_id = 0; this.config = new HashMap<>(); this.config.put("default", new Default()); } /** * 处理过程 * * @param type 0-默认色板,1-渐变色板 * @param levels 层级 */ public Process(Integer colorTableId, Integer type, List levels) { this(); this.color_table_id = colorTableId; this.config.put("type", type); this.config.put("levels", levels); if (type > 0) { this.config.put("gradation", "visibility"); } } /** * 设置颜色表 */ public void SetColorTable(Integer type, List levels) { config.put("type", type); config.put("levels", levels); } public String getUuid() { return uuid; } public void setUuid(String uuid) { this.uuid = uuid; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getColor_table_id() { return color_table_id; } public void setColor_table_id(Integer color_table_id) { this.color_table_id = color_table_id; } public Map getConfig() { return config; } public void setConfig(Map config) { this.config = config; } } /** * 颜色表默认配置 */ public class Default { private Short r; private Short g; private Short b; public Default() { this.r = -1; this.b = -1; this.g = -1; } public Short getR() { return r; } public void setR(Short r) { this.r = r; } public Short getG() { return g; } public void setG(Short g) { this.g = g; } public Short getB() { return b; } public void setB(Short b) { this.b = b; } } }