Advanced Reprojection Handling may generate huge width*heigh requests at native resolution

Description

A fake imagePyramid sample data is attached.
It contains

  • a level 0 made of 2 corner granules R0001C0001 and R0134C0116

  • a level 1 made of 1 granule
    Data is in EPSG:3003

A reprojecting request is sent in EPSG:900913 covering a wide bbox to be put into a 256x256 tile.

http://localhost:8080/geoserver/wms?SERVICE=WMS&FORMAT=image%2Fpng8&TRANSPARENT=TRUE&TILED=true&LAYERS=sample:sample&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG%3A900913&BBOX=-15028131.255,-5009377.085,-10018754.17,0&WIDTH=256&HEIGHT=256

When Advanced Projection Handling and Continuous Map Wrapping are turned off, the result is immediately produced.

When they are turned on, the requests turns into a GridCoverage read operation which use a similar GridGeometry, asking for a huge WIDTH * HEIGHT image, using native resolution:

GridGeometry2D[GridEnvelope2D[-10..679999653, -10..675520900], PARAM_MT["Affine",
PARAMETER["num_row", 3],
PARAMETER["num_col", 3],
PARAMETER["elt_0_0", 0.20000000010750243],
PARAMETER["elt_0_2", -113329181.65691483],
PARAMETER["elt_1_1", -0.1999999999694039],
PARAMETER["elt_1_2", 17880331.806959655]]]

This will take forever when dealing with a real pyramid made of thousand of files at level 0 (and may throw OOM error when not using deferred execution)

Environment

None

Assignee

Andrea Aime

Reporter

Daniele Romagnoli

Triage

None

Fix versions

Affects versions

Priority

Medium
Configure