Opened 9 years ago

Closed 9 years ago

#3164 closed defect (fixed)

ST_ClipByBox2D a little less brittle

Reported by: pramsey Owned by: pramsey
Priority: medium Milestone: PostGIS 2.2.0
Component: postgis Version: master
Keywords: Cc:

Description

Sometimes the function fails like

{
errors: [
"Postgis Plugin: ERROR: Error performing rectangular clipping: 
IllegalArgumentException: Invalid number of points in LinearRing found 3 - must be 0 or >= 4 in 
executeQuery Full sql was: 
'SELECT ST_AsTWKB(ST_Simplify(ST_ClipByBox2D(ST_SnapToGrid("the_geom_webmercator", 0.477731),ST_MakeEnvelope(-539339.6715802038,5057073.791347261,-527109.7470545759,5069303.715872888,3857)), 0.955463),-1) AS geom,"agregado" FROM (select * from table_47_valladolid_recfe) as cdbq WHERE "the_geom_webmercator" && ST_MakeEnvelope(-539339.6715802038,5057073.791347261,-527109.7470545759,5069303.715872888,3857)' "
]

And the problem is not actually feeding the function a geometry with bad rings, it's the GEOS function itself creating them, which isn't great, but since we're bunging up the data anyways, rather than dying we should just keep on cruising.

Change History (1)

comment:1 by pramsey, 9 years ago

Resolution: fixed
Status: newclosed

Done at r13669

Note: See TracTickets for help on using tickets.