context.put(PipelineCode.LAYER_ID_KEY, layerId);
context.put(PipelineCode.LAYER_KEY, layer);
context.put(PipelineCode.TILE_METADATA_KEY, tileMetadata);
Crs crs = geoService.getCrs2(tileMetadata.getCrs());
context.put(PipelineCode.CRS_KEY, crs);
CrsTransform layerToMap = geoService.getCrsTransform(layer.getCrs(), crs);
context.put(PipelineCode.CRS_TRANSFORM_KEY, layerToMap);
Envelope layerExtent = dtoConverterService.toInternal(layer.getLayerInfo().getMaxExtent());
Envelope tileExtent = geoService.transform(layerExtent, layerToMap);
context.put(PipelineCode.TILE_MAX_EXTENT_KEY, tileExtent);
InternalTile tile = new InternalTileImpl(tileMetadata.getCode(), tileExtent, tileMetadata.getScale());