VectorLayer layer = getVectorLayer(layerId);
CrsTransform transformation = null;
if ((featureIncludes & FEATURE_INCLUDE_GEOMETRY) != 0 && crs != null && !crs.equals(layer.getCrs())) {
transformation = geoService.getCrsTransform(layer.getCrs(), crs);
}
GetFeaturesContainer container = new GetFeaturesContainer();
PipelineContext context = pipelineService.createContext();
context.put(PipelineCode.LAYER_ID_KEY, layerId);
context.put(PipelineCode.LAYER_KEY, layer);
context.put(PipelineCode.CRS_TRANSFORM_KEY, transformation);
context.put(PipelineCode.CRS_KEY, crs);
context.put(PipelineCode.FILTER_KEY, queryFilter);
context.put(PipelineCode.STYLE_KEY, style);
context.put(PipelineCode.FEATURE_INCLUDES_KEY, featureIncludes);
context.put(PipelineCode.OFFSET_KEY, offset);
context.put(PipelineCode.MAX_RESULT_SIZE_KEY, maxResultSize);
pipelineService.execute(PipelineCode.PIPELINE_GET_FEATURES, layerId, context, container);
log.debug("getFeatures done on layer {}, time {}s", layerId, (System.currentTimeMillis() - ts) / 1000.0);
return container.getFeatures();
}