1

There are 1000 layers created from a pyramid of images. Each layer is a piece of the map. When you connect all layers to a group, the map takes a long time to draw. The request bounding box corresponds to a single layer. I think that for some reason, the GeoServer spends a lot of CPU time checking whether the frame fits within the layers. enter image description here 1. Map image size 9 000 000 * 3 000 000 pixels split into images of size 100 000 * 100 000 pixels enter image description here

2.I make pyramids of images

"gdal_retile -v -r bilinear -levels 1 -ps 2048 2048 -co \"TILED=YES\" -co \"COMPRESS=JPEG\" -co \"JPEG_QUALITY=60\" -targetDir "+fileName+" >"+fileName+".tif"

enter image description here 3. The resulting image pyramid enter image description here 4. I create layers from pyramids and combine them into a group of layers. enter image description here 5. Style with scale. enter image description here enter image description here

Here is the processing log for a layer whose bounding box is not included in the request from the client.

2020-02-10 09:15:54,649 TRACE [org.geotools.util.factory] - ENTRY  (MathTransformFactory, MATH_TRANSFORM_FACTORY)
2020-02-10 09:15:54,649 TRACE [org.geotools.util.factory] - RETURN (MathTransformFactory, MATH_TRANSFORM_FACTORY): found implementation Optional.
2020-02-10 09:15:54,649 DEBUG [org.geotools.referencing.operation.transform] - Optimizing the warp into an affine transformation: AffineTransform[[0.999999999866324, 0.0, 20.497194581319892], [0.0, 0.996929646957348, 20.332706248828384]]
2020-02-10 09:15:54,650 DEBUG [org.geotools.renderer.lite.gridcoverage2d] - Applying Raster Symbolizer 
2020-02-10 09:15:54,650 TRACE [org.geotools.util.factory] - ENTRY  (GridCoverageFactory)
2020-02-10 09:15:54,650 TRACE [org.geotools.util.factory] - RETURN (GridCoverageFactory): found implementation Optional.
2020-02-10 09:15:54,650 TRACE [org.geotools.util.factory] - ENTRY  (GridCoverageFactory)
2020-02-10 09:15:54,650 TRACE [org.geotools.util.factory] - RETURN (GridCoverageFactory): found implementation Optional.
2020-02-10 09:15:54,650 TRACE [org.geotools.util.factory] - ENTRY  (GridCoverageFactory)
2020-02-10 09:15:54,650 TRACE [org.geotools.util.factory] - RETURN (GridCoverageFactory): found implementation Optional.
2020-02-10 09:15:54,650 TRACE [org.geotools.util.factory] - ENTRY  (GridCoverageFactory)
2020-02-10 09:15:54,650 TRACE [org.geotools.util.factory] - RETURN (GridCoverageFactory): found implementation Optional.
2020-02-10 09:15:54,650 TRACE [org.geotools.util.factory] - ENTRY  (GridCoverageFactory)
2020-02-10 09:15:54,650 TRACE [org.geotools.util.factory] - RETURN (GridCoverageFactory): found implementation Optional.
2020-02-10 09:15:54,650 TRACE [org.geotools.util.factory] - ENTRY  (GridCoverageFactory)
2020-02-10 09:15:54,650 TRACE [org.geotools.util.factory] - RETURN (GridCoverageFactory): found implementation Optional.
2020-02-10 09:15:54,650 TRACE [org.geotools.util.factory] - ENTRY  (GridCoverageFactory)
2020-02-10 09:15:54,650 TRACE [org.geotools.util.factory] - RETURN (GridCoverageFactory): found implementation Optional.
2020-02-10 09:15:54,650 TRACE [org.geotools.util.factory] - ENTRY  (GridCoverageFactory)
2020-02-10 09:15:54,650 TRACE [org.geotools.util.factory] - RETURN (GridCoverageFactory): found implementation Optional.
2020-02-10 09:15:54,642 DEBUG [org.geotools.renderer.lite] - Rendering reader org.geoserver.catalog.CoverageDimensionCustomizerReader@1217f41b
2020-02-10 09:15:54,651 TRACE [org.geotools.util.factory] - ENTRY  (GridCoverageFactory)
2020-02-10 09:15:54,651 TRACE [org.geotools.util.factory] - RETURN (GridCoverageFactory): found implementation Optional.
2020-02-10 09:15:54,651 DEBUG [org.geotools.renderer.lite.gridcoverage2d] - Rendering using interpolation javax.media.jai.InterpolationNearest@2d516d6c
2020-02-10 09:15:54,651 DEBUG [org.geotools.renderer.lite.gridcoverage2d] - Drawing reader org.geoserver.catalog.CoverageDimensionCustomizerReader@1217f41b
2020-02-10 09:15:54,651 DEBUG [org.geotools.renderer.lite.gridcoverage2d] - Rendering using interpolation javax.media.jai.InterpolationNearest@34f9d31a
2020-02-10 09:15:54,651 DEBUG [org.geotools.renderer.lite.gridcoverage2d] - Rendering using interpolation javax.media.jai.InterpolationNearest@34f9d31a
2020-02-10 09:15:54,652 DEBUG [org.geotools.coverage.grid.io] - coverageName:P-38_1-1,imageChoice:0,subSamplingFactorX:1,subSamplingFactorY:1
2020-02-10 09:15:54,652 DEBUG [org.geotools.gce.imagemosaic] - Reading mosaic from file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/P-38/P-38_1-1/0/0.shp
2020-02-10 09:15:54,652 DEBUG [org.geotools.gce.imagemosaic] - Highest res 1.1943285669558819 1.1943285662952334
2020-02-10 09:15:54,652 DEBUG [org.geotools.gce.imagemosaic] - Prepping to manage SortBy Clause
2020-02-10 09:15:54,653 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/P-38/P-38_1-1/0/0.shp by ShapefileDataStore-0
2020-02-10 09:15:54,654 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/P-38/P-38_1-1/0/0.qix by ShapefileDataStore-0
2020-02-10 09:15:54,654 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/P-38/P-38_1-1/0/0.shp by ShapefileDataStore-0
2020-02-10 09:15:54,654 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/P-38/P-38_1-1/0/0.qix by ShapefileDataStore-0
2020-02-10 09:15:54,654 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/P-38/P-38_1-1/0/0.qix by ShapefileDataStore-0
2020-02-10 09:15:54,654 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/P-38/P-38_1-1/0/0.qix by ShapefileDataStore-0
2020-02-10 09:15:54,654 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/P-38/P-38_1-1/0/0.qix by ShapefileDataStore-0
2020-02-10 09:15:54,654 TRACE [org.geotools.data.shapefile.files] - IndexFile has been opened. Number open: 1
2020-02-10 09:15:54,654 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/P-38/P-38_1-1/0/0.shx by org.geotools.data.shapefile.shp.IndexFile
2020-02-10 09:15:54,654 TRACE [org.geotools.data.shapefile.shp] - Reading from file...
2020-02-10 09:15:54,654 TRACE [org.geotools.data.shapefile.index.quadtree.fs] - QuadTree opened
2020-02-10 09:15:54,654 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/P-38/P-38_1-1/0/0.qix by ShapefileDataStore-0
2020-02-10 09:15:54,654 DEBUG [org.geotools.data.shapefile] - Empty results for 0, skipping read
2020-02-10 09:15:54,654 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/P-38/P-38_1-1/0/0.shx by org.geotools.data.shapefile.shp.IndexFile
2020-02-10 09:15:54,655 TRACE [org.geotools.data.shapefile.files] - IndexFile has been closed. Number open: 0

2020-02-10 09:15:54,655 DEBUG [org.geotools.gce.imagemosaic] - The computed CropBoundingBox ReferencedEnvelope[4037074.7931518476 : 4037428.3144076196, 5987125.488178609 : 5987478.010595097] Doesn't intersect the coverage BoundingBox ReferencedEnvelope[4675418.334641 : 4809001.596197882, 8362696.389266644 : 8531326.028199] resulting in an empty request

2020-02-10 09:15:54,635 WARN [org.geotools.renderer.lite.gridcoverage2d] - Could not reduce the grid geometry inside the valid area bounds: ReferencedEnvelope[-2.147483647E9 : 2.147483647E9, -85.0 : 85.0]
Grid geometry isGridGeometry2D[GridEnvelope2D[0..296, 0..296], PARAM_MT["Affine", 
  PARAMETER["num_row", 3], 
  PARAMETER["num_col", 3], 
  PARAMETER["elt_0_0", 1.1943285669558819], 
  PARAMETER["elt_0_2", 4037685.6955643925], 
  PARAMETER["elt_1_1", -1.1943285636575143], 
  PARAMETER["elt_1_2", 5987478.438331877]]]
2020-02-10 09:15:54,658 TRACE [org.geotools.util.factory] - ENTRY  (CoordinateOperationFactory, COORDINATE_OPERATION_FACTORY)
2020-02-10 09:15:54,658 TRACE [org.geotools.util.factory] - RETURN (CoordinateOperationFactory, COORDINATE_OPERATION_FACTORY): found implementation Optional.
2020-02-10 09:15:54,658 DEBUG [org.geotools.referencing.operation.transform] - Optimizing the warp into an affine transformation: AffineTransform[[1.0, 0.0, 0.0], [0.0, 1.0, 2.346001565E-6]]
2020-02-10 09:15:54,658 DEBUG [org.geotools.gce.imagemosaic] - RequestedBBox empty or null
2020-02-10 09:15:54,659 DEBUG [org.geotools.gce.imagemosaic] - Request is empty: RasterLayerRequest description: 
SpatialRequestHelper [requestedBBox=ReferencedEnvelope[4037074.7931518476 : 4037428.3144076196, 5987125.488178609 : 5987478.010595097], requestedRasterArea=java.awt.Rectangle[x=0,y=0,width=296,height=295], requestCRS=PROJCS["WGS 84 / World Mercator", 
  GEOGCS["WGS 84", 
    DATUM["World Geodetic System 1984", 
      SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], 
      AUTHORITY["EPSG","6326"]], 
    PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], 
    UNIT["degree", 0.017453292519943295], 
    AXIS["Geodetic longitude", EAST], 
    AXIS["Geodetic latitude", NORTH], 
    AUTHORITY["EPSG","4326"]], 
  PROJECTION["Mercator_1SP"], 
  PARAMETER["latitude_of_origin", 0.0], 
  PARAMETER["central_meridian", 0.0], 
  PARAMETER["scale_factor", 1.0], 
  PARAMETER["false_easting", 0.0], 
  PARAMETER["false_northing", 0.0], 
  UNIT["m", 1.0], 
  AXIS["Easting", EAST], 
  AXIS["Northing", NORTH], 
  AUTHORITY["EPSG","3395"]], requestedGridToWorld=PARAM_MT["Affine", 
  PARAMETER["num_row", 3], 
  PARAMETER["num_col", 3], 
  PARAMETER["elt_0_0", 1.1943285667971857], 
  PARAMETER["elt_0_2", 4037075.390316131], 
  PARAMETER["elt_1_1", -1.1949912423335693], 
  PARAMETER["elt_1_2", 5987477.413099476]], coverageProperties=org.geotools.gce.imagemosaic.SpatialRequestHelper$CoverageProperties@24205500, accurateResolution=false, empty=true, needsReprojection=false, ]
    ReadType=DIRECT_READ
2020-02-10 09:15:54,660 DEBUG [org.geotools.gce.imagemosaic] - The response is empty. ==> returning a null GridCoverage
2020-02-10 09:15:54,660 DEBUG [org.geotools.renderer.lite] - Raster rendered
2020-02-10 09:15:54,660 DEBUG [org.geotools.renderer.lite] - Rendering reader org.geoserver.catalog.CoverageDimensionCustomizerReader@33a588e
2020-02-10 09:15:54,660 TRACE [org.geotools.util.factory] - ENTRY  (GridCoverageFactory)
2020-02-10 09:15:54,660 DEBUG [org.geotools.renderer.lite] - Raster rendered
2020-02-10 09:15:54,660 TRACE [org.geotools.util.factory] - RETURN (GridCoverageFactory): found implementation Optional.
2020-02-10 09:15:54,660 DEBUG [org.geotools.coverage.processing] - Resampled coverage "L-37_1-1" from coordinate system "WGS 84 / World Mercator" (for an image of size 297×297) to coordinate system "WGS84 / Google Mercator" (image size 297×297). JAI operation is "Warp" with "Nearest" interpolation on geophysics pixels values. Background value is (0, 0, 0).
2020-02-10 09:15:54,660 DEBUG [org.geotools.renderer.lite.gridcoverage2d] - Rendering using interpolation javax.media.jai.InterpolationNearest@2d516d6c
2020-02-10 09:15:54,660 DEBUG [org.geotools.renderer.label] - TOTAL LINE LABELS : 0
2020-02-10 09:15:54,660 DEBUG [org.geotools.renderer.label] - PAINTED LINE LABELS : 0
2020-02-10 09:15:54,660 DEBUG [org.geotools.renderer.label] - REMAINING LINE LABELS : 0
2020-02-10 09:15:54,660 DEBUG [org.geotools.renderer.lite] - Style cache hit ratio: NaN , hits 0, requests 0
2020-02-10 09:15:54,660 INFO [org.geoserver.wms] - 

if 1000 layers, then 10 seconds.

I think the data from the storage is being requested in full. And after applying styles, some objects can be excluded, because they are not included in any of the rules. The overhead of preparing and transporting data is obvious, but why is not clear.

How do I avoid wasting time on operations before “does not cross the boundingbox coverage area”?

#######################LOG
URL запроса:http://192.168.0.163:8080/geoserver/gwc/service/wms?STYLES=&VERSION=1.3.0&SRS=EPSG%3A3857&TRANSPARENT=TRUE&LAYERS=cite%3AALLGroup&EXCEPTIONS=INIMAGE&SERVICE=WMS&REQUEST=GetMap&FORMAT=image%2Fpng&CRS=EPSG%3A900913&BBOX=6788831.1004422,7694762.759552,6789136.8485553,7695068.5076651&WIDTH=256&HEIGHT=256

Runs with all layers after the server is restarted or there are no requests to the server for a long time. Takes 5 minutes.

   2020-02-18 15:40:53,423 INFO [org.geoserver.wms] - 
Request: getServiceInfo
2020-02-18 15:40:53,423 DEBUG [org.geotools.data.util] - CRSConverterFactory can be applied from Strings to CRS  only.
2020-02-18 15:40:53,424 DEBUG [org.geotools.data.util] - InterpolationConverterFactory can be applied from Strings to Interpolation  only.
2020-02-18 15:40:53,424 DEBUG [org.geotools.data.util] - CRSConverterFactory can be applied from Strings to CRS  only.
2020-02-18 15:40:53,424 DEBUG [org.geotools.data.util] - InterpolationConverterFactory can be applied from Strings to Interpolation  only.
2020-02-18 15:40:53,481 DEBUG [org.geotools.gce.imagepyramid] - Checking file: /usr/share/geoserver/bin/../data_dir/data/yamap/z18/N-39/
exists: true
isFile: false
canRead: true
canWrite: true
canExecute: true
isHidden: false
lastModified: 1578926450893

2020-02-18 15:40:53,495 INFO [org.geoserver.wms] - 
Request: getServiceInfo
2020-02-18 15:40:53,495 DEBUG [org.geotools.data.util] - CRSConverterFactory can be applied from Strings to CRS  only.
2020-02-18 15:40:53,495 DEBUG [org.geotools.data.util] - InterpolationConverterFactory can be applied from Strings to Interpolation  only.
2020-02-18 15:40:53,495 DEBUG [org.geotools.data.util] - CRSConverterFactory can be applied from Strings to CRS  only.
2020-02-18 15:40:53,495 DEBUG [org.geotools.data.util] - InterpolationConverterFactory can be applied from Strings to Interpolation  only.
2020-02-18 15:40:53,504 DEBUG [org.geotools.gce.imagepyramid] - Checking file: /usr/share/geoserver/bin/../data_dir/data/yamap/z18/N-39/N-39_1-1/
exists: true
isFile: true
canRead: true
canWrite: true
canExecute: false
isHidden: false
lastModified: 1578926450893

2020-02-18 15:40:53,516 TRACE [org.geotools.util.factory] - ENTRY  (CRSFactory, CRS_FACTORY)
2020-02-18 15:40:53,516 TRACE [org.geotools.util.factory] - RETURN (CRSFactory, CRS_FACTORY): found implementation Optional.
2020-02-18 15:40:53,516 DEBUG [org.geotools.gce.imagepyramid] - Parsing pyramid properties file at:file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/N-39/N-39_1-1/N-39_1-1.properties
2020-02-18 15:40:53,524 DEBUG [org.geotools.gce.imagepyramid] - Parsed pyramid properties file at:file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/N-39/N-39_1-1/N-39_1-1.properties
2020-02-18 15:40:53,525 DEBUG [org.geotools.gce.imagepyramid] - Checking file: /usr/share/geoserver/bin/../data_dir/data/yamap/z18/N-39/
exists: true
isFile: false
canRead: true
canWrite: true
canExecute: true
isHidden: false
lastModified: 1578926645445

It is executed with all layers after a request from the client to the server to get an image that falls within the bounding box. Based on these records, we are checking whether the request matches the layer frame. The check ends with the message Doesn't intersect the coverage BoundingBox Please note how long it takes to check! If 1000 layers, the delay is significant. Additional grouping of layers does not add speed, because the server still checks each layer.

2020-02-18 16:31:37,133 DEBUG [org.geotools.gce.imagemosaic] - The response is empty. ==> returning a null GridCoverage
2020-02-18 16:31:37,133 DEBUG [org.geotools.renderer.lite] - Raster rendered
2020-02-18 16:31:37,133 DEBUG [org.geotools.renderer.lite] - Rendering reader org.geoserver.catalog.CoverageDimensionCustomizerReader@67a7de03
2020-02-18 16:31:37,133 TRACE [org.geotools.util.factory] - ENTRY  (GridCoverageFactory)
2020-02-18 16:31:37,133 TRACE [org.geotools.util.factory] - RETURN (GridCoverageFactory): found implementation Optional.
2020-02-18 16:31:37,133 DEBUG [org.geotools.renderer.lite.gridcoverage2d] - Rendering using interpolation javax.media.jai.InterpolationNearest@34b8d8f4
2020-02-18 16:31:37,133 DEBUG [org.geotools.renderer.lite.gridcoverage2d] - Drawing reader org.geoserver.catalog.CoverageDimensionCustomizerReader@67a7de03
2020-02-18 16:31:37,133 DEBUG [org.geotools.renderer.lite.gridcoverage2d] - Rendering using interpolation javax.media.jai.InterpolationNearest@7585d2cf
2020-02-18 16:31:37,133 DEBUG [org.geotools.renderer.lite.gridcoverage2d] - Rendering using interpolation javax.media.jai.InterpolationNearest@7585d2cf
2020-02-18 16:31:37,134 DEBUG [org.geotools.coverage.grid.io] - coverageName:L-37_4-5,imageChoice:0,subSamplingFactorX:1,subSamplingFactorY:1
2020-02-18 16:31:37,134 DEBUG [org.geotools.gce.imagemosaic] - Reading mosaic from file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/L-37/L-37_4-5/0/0.shp
2020-02-18 16:31:37,134 DEBUG [org.geotools.gce.imagemosaic] - Highest res 1.1943285669558819 1.1943285695147767
2020-02-18 16:31:37,134 DEBUG [org.geotools.gce.imagemosaic] - Prepping to manage SortBy Clause
2020-02-18 16:31:37,134 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/L-37/L-37_4-5/0/0.shp by ShapefileDataStore-0
2020-02-18 16:31:37,134 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/L-37/L-37_4-5/0/0.qix by ShapefileDataStore-0
2020-02-18 16:31:37,134 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/L-37/L-37_4-5/0/0.shp by ShapefileDataStore-0
2020-02-18 16:31:37,134 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/L-37/L-37_4-5/0/0.qix by ShapefileDataStore-0
2020-02-18 16:31:37,134 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/L-37/L-37_4-5/0/0.qix by ShapefileDataStore-0
2020-02-18 16:31:37,134 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/L-37/L-37_4-5/0/0.qix by ShapefileDataStore-0
2020-02-18 16:31:37,134 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/L-37/L-37_4-5/0/0.qix by ShapefileDataStore-0
2020-02-18 16:31:37,134 TRACE [org.geotools.data.shapefile.files] - IndexFile has been opened. Number open: 1
2020-02-18 16:31:37,134 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/L-37/L-37_4-5/0/0.shx by org.geotools.data.shapefile.shp.IndexFile
2020-02-18 16:31:37,134 TRACE [org.geotools.data.shapefile.shp] - Reading from file...
2020-02-18 16:31:37,134 TRACE [org.geotools.data.shapefile.index.quadtree.fs] - QuadTree opened
2020-02-18 16:31:37,134 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/L-37/L-37_4-5/0/0.qix by ShapefileDataStore-0
2020-02-18 16:31:37,134 DEBUG [org.geotools.data.shapefile] - Empty results for 0, skipping read
2020-02-18 16:31:37,134 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/L-37/L-37_4-5/0/0.shx by org.geotools.data.shapefile.shp.IndexFile
2020-02-18 16:31:37,134 TRACE [org.geotools.data.shapefile.files] - IndexFile has been closed. Number open: 0
2020-02-18 16:31:37,134 DEBUG [org.geotools.gce.imagemosaic] - The computed CropBoundingBox ReferencedEnvelope[6787584.821371756 : 6788855.586966822, 7653206.763699672 : 7654474.99237795] Doesn't intersect the coverage BoundingBox ReferencedEnvelope[4408251.811527 : 4541835.073083881, 5435748.203100609 : 5563615.40841] resulting in an empty request
2020-02-18 16:31:37,134 DEBUG [org.geotools.gce.imagemosaic] - RequestedBBox empty or null
2020-02-18 16:31:37,134 DEBUG [org.geotools.gce.imagemosaic] - Request is empty: RasterLayerRequest description: 
SpatialRequestHelper [requestedBBox=ReferencedEnvelope[6787584.821371756 : 6788855.586966822, 7653206.763699672 : 7654474.99237795], requestedRasterArea=java.awt.Rectangle[x=0,y=0,width=1064,height=1062], requestCRS=PROJCS["WGS 84 / World Mercator", 
  GEOGCS["WGS 84", 
    DATUM["World Geodetic System 1984", 
      SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], 
      AUTHORITY["EPSG","6326"]], 
    PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], 
    UNIT["degree", 0.017453292519943295], 
    AXIS["Geodetic longitude", EAST], 
    AXIS["Geodetic latitude", NORTH], 
    AUTHORITY["EPSG","4326"]], 
  PROJECTION["Mercator_1SP"], 
  PARAMETER["latitude_of_origin", 0.0], 
  PARAMETER["central_meridian", 0.0], 
  PARAMETER["scale_factor", 1.0], 
  PARAMETER["false_easting", 0.0], 
  PARAMETER["false_northing", 0.0], 
  UNIT["m", 1.0], 
  AXIS["Easting", EAST], 
  AXIS["Northing", NORTH], 
  AUTHORITY["EPSG","3395"]], requestedGridToWorld=PARAM_MT["Affine", 
  PARAMETER["num_row", 3], 
  PARAMETER["num_col", 3], 
  PARAMETER["elt_0_0", 1.1943285667919108], 
  PARAMETER["elt_0_2", 6787585.418536039], 
  PARAMETER["elt_1_1", -1.1941889625966848], 
  PARAMETER["elt_1_2", 7654474.395283469]], coverageProperties=org.geotools.gce.imagemosaic.SpatialRequestHelper$CoverageProperties@56045d3b, accurateResolution=false, empty=true, needsReprojection=false, ]
    ReadType=JAI_IMAGEREAD
2020-02-18 16:31:37,134 DEBUG [org.geotools.gce.imagemosaic] - The response is empty. ==> returning a null GridCoverage
2020-02-18 16:31:37,134 DEBUG [org.geotools.renderer.lite] - Raster rendered
2020-02-18 16:31:37,134 DEBUG [org.geotools.renderer.lite] - Rendering reader org.geoserver.catalog.CoverageDimensionCustomizerReader@5b5561f3
2020-02-18 16:31:37,134 TRACE [org.geotools.util.factory] - ENTRY  (GridCoverageFactory)
2020-02-18 16:31:37,134 TRACE [org.geotools.util.factory] - RETURN (GridCoverageFactory): found implementation Optional.
2020-02-18 16:31:37,134 DEBUG [org.geotools.renderer.lite.gridcoverage2d] - Rendering using interpolation javax.media.jai.InterpolationNearest@34b8d8f4
2020-02-18 16:31:37,134 DEBUG [org.geotools.renderer.lite.gridcoverage2d] - Drawing reader org.geoserver.catalog.CoverageDimensionCustomizerReader@5b5561f3
2020-02-18 16:31:37,134 DEBUG [org.geotools.renderer.lite.gridcoverage2d] - Rendering using interpolation javax.media.jai.InterpolationNearest@7585d2cf
2020-02-18 16:31:37,134 DEBUG [org.geotools.renderer.lite.gridcoverage2d] - Rendering using interpolation javax.media.jai.InterpolationNearest@7585d2cf
2020-02-18 16:31:37,135 DEBUG [org.geotools.coverage.grid.io] - coverageName:L-37_5-1,imageChoice:0,subSamplingFactorX:1,subSamplingFactorY:1
2020-02-18 16:31:37,135 DEBUG [org.geotools.gce.imagemosaic] - Reading mosaic from file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/L-37/L-37_5-1/0/0.shp
2020-02-18 16:31:37,135 DEBUG [org.geotools.gce.imagemosaic] - Highest res 1.1943285669558736 1.1943285636575143
2020-02-18 16:31:37,135 DEBUG [org.geotools.gce.imagemosaic] - Prepping to manage SortBy Clause
2020-02-18 16:31:37,135 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/L-37/L-37_5-1/0/0.shp by ShapefileDataStore-0
2020-02-18 16:31:37,135 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/L-37/L-37_5-1/0/0.qix by ShapefileDataStore-0
2020-02-18 16:31:37,135 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/L-37/L-37_5-1/0/0.shp by ShapefileDataStore-0
2020-02-18 16:31:37,135 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/L-37/L-37_5-1/0/0.qix by ShapefileDataStore-0
2020-02-18 16:31:37,135 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/L-37/L-37_5-1/0/0.qix by ShapefileDataStore-0
2020-02-18 16:31:37,135 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/L-37/L-37_5-1/0/0.qix by ShapefileDataStore-0
2020-02-18 16:31:37,135 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/L-37/L-37_5-1/0/0.qix by ShapefileDataStore-0
2020-02-18 16:31:37,135 TRACE [org.geotools.data.shapefile.files] - IndexFile has been opened. Number open: 1
2020-02-18 16:31:37,135 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/L-37/L-37_5-1/0/0.shx by org.geotools.data.shapefile.shp.IndexFile
2020-02-18 16:31:37,135 TRACE [org.geotools.data.shapefile.shp] - Reading from file...
2020-02-18 16:31:37,135 TRACE [org.geotools.data.shapefile.index.quadtree.fs] - QuadTree opened
2020-02-18 16:31:37,135 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/L-37/L-37_5-1/0/0.qix by ShapefileDataStore-0
2020-02-18 16:31:37,135 DEBUG [org.geotools.data.shapefile] - Empty results for 0, skipping read
2020-02-18 16:31:37,135 DEBUG [org.geotools.data.shapefile.files] - Read lock: file:/usr/share/geoserver/bin/../data_dir/data/yamap/z18/L-37/L-37_5-1/0/0.shx by org.geotools.data.shapefile.shp.IndexFile
2020-02-18 16:31:37,135 TRACE [org.geotools.data.shapefile.files] - IndexFile has been closed. Number open: 0
2020-02-18 16:31:37,135 DEBUG [org.geotools.gce.imagemosaic] - The computed CropBoundingBox ReferencedEnvelope[6787584.821371756 : 6788855.586966822, 7653206.763699672 : 7654474.99237795] Doesn't intersect the coverage BoundingBox ReferencedEnvelope[4541835.073084 : 4675418.33464088, 5947217.0252867 : 6075084.229969] resulting in an empty request
2020-02-18 16:31:37,135 DEBUG [org.geotools.gce.imagemosaic] - RequestedBBox empty or null
2020-02-18 16:31:37,135 DEBUG [org.geotools.gce.imagemosaic] - Request is empty: RasterLayerRequest description: 
SpatialRequestHelper [requestedBBox=ReferencedEnvelope[6787584.821371756 : 6788855.586966822, 7653206.763699672 : 7654474.99237795], requestedRasterArea=java.awt.Rectangle[x=0,y=0,width=1064,height=1062], requestCRS=PROJCS["WGS 84 / World Mercator", 
  GEOGCS["WGS 84", 
    DATUM["World Geodetic System 1984", 
      SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], 
      AUTHORITY["EPSG","6326"]], 
    PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], 
    UNIT["degree", 0.017453292519943295], 
    AXIS["Geodetic longitude", EAST], 
    AXIS["Geodetic latitude", NORTH], 
    AUTHORITY["EPSG","4326"]], 
  PROJECTION["Mercator_1SP"], 
  PARAMETER["latitude_of_origin", 0.0], 
  PARAMETER["central_meridian", 0.0], 
  PARAMETER["scale_factor", 1.0], 
  PARAMETER["false_easting", 0.0], 
  PARAMETER["false_northing", 0.0], 
  UNIT["m", 1.0], 
  AXIS["Easting", EAST], 
  AXIS["Northing", NORTH], 
  AUTHORITY["EPSG","3395"]], requestedGridToWorld=PARAM_MT["Affine", 
  PARAMETER["num_row", 3], 
  PARAMETER["num_col", 3], 
  PARAMETER["elt_0_0", 1.1943285667919108], 
  PARAMETER["elt_0_2", 6787585.418536039], 
  PARAMETER["elt_1_1", -1.1941889625966848], 
  PARAMETER["elt_1_2", 7654474.395283469]], coverageProperties=org.geotools.gce.imagemosaic.SpatialRequestHelper$CoverageProperties@4f510a90, accurateResolution=false, empty=true, needsReprojection=false, ]
    ReadType=JAI_IMAGEREAD
  • Welcome to GIS SE! We're a little different from other sites; this isn't a discussion forum but a Q&A site. Your questions should as much as possible describe not just what you want to do, but precisely what you have tried and where you are stuck trying that. Please check out our short tour for more about how the site works. – Ian Turton Feb 5 at 13:04
  • We need to know exactly what request you are making, how your data is stored, and what the log file shows. – Ian Turton Feb 5 at 13:05
  • If you have data in database and tables have spatial indexes the requests outside the data should give an empty result very fast. Also if you have set the bbox of the layer correctly in the layer configuration of GeoServer then GeoServer should not even query the data. But we need more details about your environment. – user30184 Feb 5 at 13:44
  • turn logging level up and try again – Ian Turton Feb 6 at 14:36
  • @Ian Turton after the message "Doesn't intersect the coverage BoundingBox", there are a lot of operations on these layers in the log – 4gexotron Feb 7 at 12:06
1

If I understand correctly you have created 1000 pyramids based on tiles of a large (9 000 000 * 3 000 000) raster, and then grouped those layers using a Layer Group.

This is probably where your problem comes from, layer groups aren't designed to be used this way.

Instead you should create a single image pyramid of the large raster, then the bounding box index of the pyramid will be used at the appropriate level in each case.

You should be able to either build the pyramid from the big raster or from a VRT of the tiles.

gdal_retile -v -r bilinear -levels 8 -ps 2048 2048 -co TILED=YES -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR -targetDir pyramid big_raster.tif 

See the instructions in the manual or here for more details - once built you can add it directly to GeoServer as a single layer (you will need to add the pyramid plugin if you haven't already)

| improve this answer | |
  • I added a diagram to the beginning of the post. In order for a single large pyramid to read quickly, do I need to increase the size of the pellet? - ps 2048 2048 -> ? – 4gexotron Feb 18 at 15:22
  • May be you should delete this question and start again with a clear statement of your input data and how you plan to use it in GeoServer. I understood you to have one layer with a large extent. If that is not the case then I have no idea what your diagram means – Ian Turton Feb 18 at 15:31
  • If to do from tiff 9 000 000 * 3000 000 one pyramid, what is the size of the tile? if 2048*2048 then the number of files in the folder is 6 437 301. – 4gexotron Feb 18 at 19:26
  • only at the bottom level where you will never need most of them – Ian Turton Feb 19 at 8:21
  • @lanTurton Thank you very much! You helped solve my problems. I did as you said. I created one layer using Image Mosaic because I don't need overview layers. Just specify the path to the directory that stores parts of the map in different folders. Image Mosaic found all the images in my folders and created a repository. Granule size made 10 000*10 000 pixels. – 4gexotron Mar 2 at 7:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.