docs: public List<Feature> getFeaturesByLocation(Coordinate layerCoordinate, double layerScale, int pixelTolerance)
  			throws LayerException {
  		if (!isEnableFeatureInfoSupport()) {
  			return Collections.emptyList();
  		}
  
  		List<Feature> features = new ArrayList<Feature>();
  
  		Resolution bestResolution = getResolutionForScale(layerScale);
  		RasterGrid grid = getRasterGrid(new Envelope(layerCoordinate), bestResolution.getTileWidth(),
  				bestResolution.getTileHeight());
  		int x = (int) (((layerCoordinate.x - grid.getLowerLeft().x) * bestResolution.getTileWidthPx()) / grid
  				.getTileWidth());
  		int y = (int) (bestResolution.getTileHeightPx() - (((layerCoordinate.y - grid.getLowerLeft().y) * bestResolution
  				.getTileHeightPx()) / grid.getTileHeight()));
  
  		Bbox layerBox = new Bbox(grid.getLowerLeft().x, grid.getLowerLeft().y, grid.getTileWidth(),
  				grid.getTileHeight());
  
  		InputStream stream = null;
  		try {
  			String url = formatGetFeatureInfoUrl(bestResolution.getTileWidthPx(), bestResolution.getTileHeightPx(),
  					layerBox, x, y, featureInfoFormat == WmsFeatureInfoFormat.HTML);
  			log.debug("getFeaturesByLocation: {} {} {} {}", new Object[] { layerCoordinate, layerScale, pixelTolerance,
  					url });
  			stream = httpService.getStream(url, this);
  
  			switch (featureInfoFormat) {
  				case GML2:
  					features = getGmlFeatures(stream, Version.GML2);
  					break;
  				case GML3:
  					features = getGmlFeatures(stream, Version.GML3);
  					break;
  				case HTML:
  					features = getHtmlFeatures(url);
  					break;
  				case TEXT:
  					features = getTextFeatures(stream);
  					break;
  				case JSON:
  					features = getTextFeatures(stream);
  					break;
  			}
  
  		} catch (LayerException le) {
  			throw le; // NOSONAR
  		} catch (Exception e) { // NOSONAR
  			throw new LayerException(e, ExceptionCode.UNEXPECTED_PROBLEM);
  		} finally {
  			if (null != stream) {
  				try {
  					stream.close();
  				} catch (IOException ioe) {
  					// ignore, closing anyway
  				}
  			}
  		}
  
  		return features;
  	}