package cn.edu.whu.boot.allocation.controllers.dtos;

import org.geojson.Feature;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class CustomFeatureCollection {

    private final String type = "FeatureCollection";

    private final Map<String, Object> crs = new HashMap<String, Object>() {{
        put("type", "EPSG");
        put("properties", new HashMap<String, Object>() {{
            put("code", "4326");
        }});
    }};

    public CustomFeatureCollection() {
    }

    public CustomFeatureCollection(List<Feature> features) {
        this.features = features;
    }

    private List<Feature> features;

    public String getType() {
        return type;
    }

    public Map<String, Object> getCrs() {
        return crs;
    }

    public List<Feature> getFeatures() {
        return features;
    }

    public void setFeatures(List<Feature> features) {
        this.features = features;
    }
}