Issue 18244

Complex polygon queries cause Stackoverflow

18244
Reporter: mdoering
Type: Bug
Summary: Complex polygon queries cause Stackoverflow
Description: As reported by Dag Endresen occurrence filters with large polygon geometries are causing a Stackoverflow exception in the API WithinPredicate constructor when it tries to validate the expression via SearchTypeValidator.validate.
Priority: Critical
Status: Closed
Created: 2016-02-18 17:31:30.768
Updated: 2019-07-30 18:39:00.000
Resolved: 2019-07-30 18:39:00.000
Attachment 21703.comment~


Author: mdoering@gbif.org
Comment: see ignored API test: https://github.com/gbif/gbif-api/commit/a922ba6dbc35dc98e6d3c22eab52b1ce01478a50#diff-2f6380b93073be5d6577106ee125b4f7R30
Created: 2016-02-18 17:33:25.093
Updated: 2016-02-18 17:33:25.093


Author: dagendresen
Created: 2016-03-01 12:37:16.72
Updated: 2016-03-01 12:37:16.72
        
For further details on the download request, see also:
http://lists.gbif.org/pipermail/api-users/2016-February/000288.html
http://lists.gbif.org/pipermail/api-users/2016-February/000289.html
    


Author: dagendresen
Created: 2016-03-01 12:41:09.867
Updated: 2016-03-01 12:41:09.867
        
The source CAFF boundary source file is available at:
http://geo.abds.is/geonetwork/srv/eng/catalog.search#/metadata/2ad7a7cb-2ad7-4517-a26e-7878ef134239

And converted to WKT format (and unprojected WGS84, EPSG:4326) using ogr2ogr:
ogr2ogr -f CSV -s_srs EPSG:3408 -t_srs EPSG:4326 caff_wkt_4326.csv CAFF_Boundary_Polygon.shp -lco GEOMETRY=AS_WKT
    


Author: mblissett
Created: 2019-07-30 18:39:00.000
Updated: 2019-07-30 18:39:00.000
        
Fixed in https://github.com/gbif/gbif-api/commit/2b32843a72c3aa383b7bc1950d7a8de24843e75c.