@Override
    public void render(List<Feature> features) throws IOException {
        Map<Type, BufferedImage> imageMap = new TreeMap<>();
        
        Type[] types = Type.values();
        for (Type type : types) {
            imageMap.put(type, this.allocateBinaryImage());
        }

        for (Feature building : features) {
            if ("yes".equals(building.getProperty("building"))) {
                String name = (String) building.getProperty("name");
                BufferedImage image = imageMap.get(getType(name));
                GeoJsonObject geometry = building.getGeometry();
                if (geometry instanceof MultiPolygon) {
                    this.draw((MultiPolygon) geometry, image);
                } else if (geometry instanceof Polygon) {
                    this.draw((Polygon) geometry, image);
                } else if (geometry instanceof LineString) {
                    this.draw((LineString) geometry, image);
                }
            }
        }

        for (Map.Entry<Type, BufferedImage> entry : imageMap.entrySet()) {
            this.write(entry.getValue(), entry.getKey().mapByte);
        }
    }