public void saveOrUpdate(String layerId, CoordinateReferenceSystem crs, List<InternalFeature> oldFeatures,
List<InternalFeature> newFeatures) throws GeomajasException {
log.debug("saveOrUpdate start on layer {}", layerId);
long ts = System.currentTimeMillis();
VectorLayer layer = getVectorLayer(layerId);
CrsTransform mapToLayer = geoService.getCrsTransform(crs, layer.getCrs());
CrsTransform layerToMap = geoService.getCrsTransform(layer.getCrs(), crs);
PipelineContext context = pipelineService.createContext();
context.put(PipelineCode.LAYER_ID_KEY, layerId);
context.put(PipelineCode.LAYER_KEY, layer);
context.put(PipelineCode.CRS_TRANSFORM_KEY, mapToLayer);
context.put(PipelineCode.CRS_BACK_TRANSFORM_KEY, layerToMap);