code: public FeatureCollection createCollection(JSONObject jsonObject, FeaturesSupported layer) {
  		FeatureCollection dto = new FeatureCollection(layer);
  		String type = JsonService.getStringValue(jsonObject, "type");
  		if ("FeatureCollection".equals(type)) {
  			JSONArray features = JsonService.getChildArray(jsonObject, "features");
  			for (int i = 0; i < features.size(); i++) {
  				dto.getFeatures().add(createFeature((JSONObject) features.get(i), layer));
  			}
  		} else if ("Feature".equals(type)) {
  			dto.getFeatures().add(createFeature(jsonObject, layer));
  		}
  		return dto;
  	}
docs: Create a feature collection for this layer.
  
  @param jsonObject
  @param layer the layer (optional)
  @return the feature