try {
String url = formatGetFeatureInfoUrl(bestResolution.getTileWidthPx(), bestResolution.getTileHeightPx(),
layerBox, x, y);
log.debug("getFeaturesByLocation: {} {} {} {}",
new Object[] {layerCoordinate, layerScale, pixelTolerance, url});
GML gml = new GML(Version.GML3);
stream = httpService.getStream(url, getAuthentication());
FeatureCollection<?, SimpleFeature> collection = gml.decodeFeatureCollection(stream);
FeatureIterator<SimpleFeature> it = collection.features();
while (it.hasNext()) {
features.add(toDto(it.next()));
}