public Envelope getBounds(String layerId, CoordinateReferenceSystem crs, Filter queryFilter)
throws GeomajasException {
log.debug("getBounds start on layer {}", layerId);
long ts = System.currentTimeMillis();
VectorLayer layer = getVectorLayer(layerId);
GetBoundsContainer container = new GetBoundsContainer();
PipelineContext context = pipelineService.createContext();
context.put(PipelineCode.LAYER_ID_KEY, layerId);
context.put(PipelineCode.LAYER_KEY, layer);
context.put(PipelineCode.CRS_KEY, crs);
context.put(PipelineCode.CRS_TRANSFORM_KEY, geoService.getCrsTransform(layer.getCrs(), crs));
context.put(PipelineCode.FILTER_KEY, queryFilter);
pipelineService.execute(PipelineCode.PIPELINE_GET_BOUNDS, layerId, context, container);
log.debug("getBounds done on layer {}, time {}s", layerId, (System.currentTimeMillis() - ts) / 1000.0);
return container.getEnvelope();
}