| | |
| | | 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; |
| | | |
| | | /** |
| | | * 数简.创建图层类 |
| | |
| | | /** |
| | | * 影像目录列表 |
| | | */ |
| | | private ImagePathList[] image_path_list; |
| | | private List<ImagePathList> image_path_list; |
| | | |
| | | /** |
| | | * 影像列表 |
| | | */ |
| | | private ImageList[] image_list; |
| | | private List<ImageList> image_list; |
| | | |
| | | /** |
| | | * 金字塔配置 |
| | |
| | | create_service = 0; |
| | | layer = new Layer(); |
| | | image_ovr = new ImageOvr(); |
| | | } |
| | | |
| | | public CreateLayerEntity(int pathCount, int imageCount) { |
| | | this(); |
| | | image_list = new ImageList[imageCount]; |
| | | image_path_list = new ImagePathList[pathCount]; |
| | | image_list = new ArrayList<>(); |
| | | image_path_list = new ArrayList<>(); |
| | | } |
| | | |
| | | public Layer getLayer() { |
| | |
| | | this.layer = layer; |
| | | } |
| | | |
| | | public ImagePathList[] getImage_path_list() { |
| | | public List<ImagePathList> getImage_path_list() { |
| | | return image_path_list; |
| | | } |
| | | |
| | | public void setImage_path_list(ImagePathList[] image_path_list) { |
| | | public void setImage_path_list(List<ImagePathList> image_path_list) { |
| | | this.image_path_list = image_path_list; |
| | | } |
| | | |
| | | public ImageList[] getImage_list() { |
| | | public List<ImageList> getImage_list() { |
| | | return image_list; |
| | | } |
| | | |
| | | public void setImage_list(ImageList[] image_list) { |
| | | public void setImage_list(List<ImageList> image_list) { |
| | | this.image_list = image_list; |
| | | } |
| | | |
| | |
| | | /** |
| | | * nodata设置,数组,数组大小和波段数等同 |
| | | */ |
| | | private String[] nodata; |
| | | private List<String> nodata; |
| | | |
| | | /** |
| | | * 投影或者坐标:EPSG:4326 |
| | |
| | | /** |
| | | * 图层和影像相关的配置,默认"{}",配置内容包括但不限于:处理过程、边界控制方法 |
| | | */ |
| | | private Object config; |
| | | private Config config; |
| | | |
| | | /** |
| | | * 拉伸因子,配合 enhance_factor使用 |
| | |
| | | public Layer() { |
| | | end_scale = 1.0; |
| | | start_scale = 1000000000.0; |
| | | stats_type = 0; |
| | | stats_type = 1; |
| | | enhance_type = 0; |
| | | boundary_cal_mode = 0; |
| | | config = new Object(); |
| | | pub_config = new Object(); |
| | | } |
| | | |
| | |
| | | this.name = name; |
| | | } |
| | | |
| | | public String[] getNodata() { |
| | | public List<String> getNodata() { |
| | | return nodata; |
| | | } |
| | | |
| | | public void setNodata(String[] nodata) { |
| | | public void setNodata(List<String> nodata) { |
| | | this.nodata = nodata; |
| | | } |
| | | |
| | |
| | | this.pub_config = pub_config; |
| | | } |
| | | |
| | | public Object getConfig() { |
| | | public Config getConfig() { |
| | | return config; |
| | | } |
| | | |
| | | public void setConfig(Object config) { |
| | | public void setConfig(Config config) { |
| | | this.config = config; |
| | | } |
| | | |
| | |
| | | /** |
| | | * 过滤器组列表:["a.tif|b.tif"] |
| | | */ |
| | | private String[] filter; |
| | | private List<String> filter; |
| | | |
| | | /** |
| | | * 属性过滤 |
| | |
| | | |
| | | public ImagePathList() { |
| | | datasource = "Local"; |
| | | recursion = 1; |
| | | recursion = 0; |
| | | image_time = null; |
| | | } |
| | | |
| | |
| | | this.image_time = image_time; |
| | | } |
| | | |
| | | public String[] getFilter() { |
| | | public List<String> getFilter() { |
| | | return filter; |
| | | } |
| | | |
| | | public void setFilter(String[] filter) { |
| | | public void setFilter(List<String> filter) { |
| | | this.filter = filter; |
| | | } |
| | | |
| | |
| | | this.sample_type = sample_type; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 颜色表配置 |
| | | */ |
| | | public class Config { |
| | | private Process process; |
| | | |
| | | public Config(Integer type, List<GradientColorTableEntity> levels) { |
| | | process = new Process(type, levels); |
| | | } |
| | | |
| | | public Process getProcess() { |
| | | return process; |
| | | } |
| | | |
| | | public void setProcess(Process process) { |
| | | this.process = process; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 处理层级 |
| | | */ |
| | | public class Process { |
| | | private String uuid; |
| | | |
| | | private String name; |
| | | |
| | | private Map<String, Object> config; |
| | | |
| | | public Process() { |
| | | uuid = StringHelper.getGuid(); |
| | | name = "color_table"; |
| | | |
| | | config = new HashMap<>(); |
| | | config.put("default", new Default()); |
| | | } |
| | | |
| | | /** |
| | | * 处理过程 |
| | | * |
| | | * @param type 0-默认色板,1-渐变色板 |
| | | * @param levels 层级 |
| | | */ |
| | | public Process(Integer type, List<?> levels) { |
| | | this(); |
| | | config.put("type", type); |
| | | config.put("levels", levels); |
| | | } |
| | | |
| | | /** |
| | | * 设置颜色表 |
| | | */ |
| | | 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 Map<String, Object> getConfig() { |
| | | return config; |
| | | } |
| | | |
| | | public void setConfig(Map<String, Object> config) { |
| | | this.config = config; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 颜色表默认配置 |
| | | */ |
| | | public class Default { |
| | | private Short r; |
| | | |
| | | private Short g; |
| | | |
| | | private Short b; |
| | | |
| | | public Default() { |
| | | r = -1; |
| | | b = -1; |
| | | 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; |
| | | } |
| | | } |
| | | } |