1
13693261870
2024-09-14 3e0b038b5c61aa26a5be2fffada678e9dad58aa2
src/main/java/com/se/simu/domain/SeLayer.java
@@ -15,15 +15,15 @@
    private String name;
    private Integer dataType;
    private List<SeField> fields;
    private JSONArray data;
    private String queryType;
    private String shpName;
    private SeDb db;
    private JSONArray data;
    public SeLayer() {
        this.data = new JSONArray();
@@ -33,30 +33,16 @@
        this();
        this.id = id;
        this.name = name;
        this.data = new JSONArray();
    }
    public SeLayer(String id, String name, String shpName, Integer dataType, List<SeField> fields) {
    public SeLayer(String id, String name, String queryType, List<SeField> fields, String shpName, SeDb db) {
        this();
        this.id = id;
        this.name = name;
        this.shpName = shpName;
        this.dataType = dataType;
        this.queryType = queryType;
        this.fields = fields;
        this.queryType = getQueryType(dataType);
    }
    public String getQueryType(Integer dataType) {
        switch (dataType) {
            case 2:
            case 4:
                return "point";
            case 1:
            case 3:
                return "polyline";
            default:
                return "polygon";
        }
        this.shpName = shpName;
        this.db = db;
    }
    public void addData(JSONArray arr) {
@@ -77,14 +63,6 @@
    public void setName(String name) {
        this.name = name;
    }
    public Integer getDataType() {
        return dataType;
    }
    public void setDataType(Integer dataType) {
        this.dataType = dataType;
    }
    public List<SeField> getFields() {
@@ -118,4 +96,12 @@
    public void setShpName(String shpName) {
        this.shpName = shpName;
    }
    public SeDb getDb() {
        return db;
    }
    public void setDb(SeDb db) {
        this.db = db;
    }
}