#4837 closed defect (fixed)
GEOS 3.10dev failure on make valid
Reported by: | robe | Owned by: | robe |
---|---|---|---|
Priority: | blocker | Milestone: | PostGIS 3.2.0 |
Component: | postgis | Version: | master |
Keywords: | Cc: |
Description
Just noticed this failing on Winnie. She's running with GEOS 3.10dev. PostGIS 3.1 branch which runs against GEOS 3.9 branch is fine, so assume this is just a change in 3.10 dev
Test: test_geos_makevalid ...FAILED 1. cu_geos.c:157 - ASSERT_STRING_EQUAL * Expected: POLYGON((92127.546 463452.075,92117.173 463439.755,92133.675 463425.942,92122.136 463412.826,92092.377 463437.77,92114.014 463463.469,92115.512 463462.207,92115.51207431706 463462.2069374289,92127.546 463452.075)) * Obtained: POLYGON((92115.512 463462.207,92115.51207431706 463462.2069374289,92127.546 463452.075,92117.173 463439.755,92133.675 463425.942,92122.136 463412.826,92092.377 463437.77,92114.014 463463.469,92115.512 463462.207))
Change History (8)
comment:1 by , 4 years ago
Owner: | changed from | to
---|
comment:2 by , 4 years ago
Okay the subdivide case is not a trivial fix with normalize:
I tried changing the query to this in hopes that GEOS 3.9 and GEOS 3.10 would agree:
SELECT 'subdivide', ST_AsText(geomn) FROM ST_Subdivide( 'POLYGON((0 0,0 10,10 10,10 6,100 5.1, 100 10, 110 10, 110 0, 100 0,100 4.9,10 5,10 0,0 0))'::geometry, 5, 2) AS geom, ST_Normalize(geom) AS geomn ORDER BY geomn;
— 3.9.0 answer (haven't upgraded to 3.9.1 yet on my prod)
subdivide POLYGON((0 0,0 10,10 10,10 0,0 0)) subdivide POLYGON((100 4,100 10,110 10,110 4,100 4)) subdivide POLYGON((10 6,100 6,100 4,10 6)) subdivide POLYGON((100 0,100 4,110 4,110 0,100 0))
— 3.10 (I forget what vintage — going to upgrade in a bit to see if it helps)
subdivide POLYGON((0 0,0 10,10 10,10 0,0 0)) subdivide POLYGON((100 0,100 10,110 10,110 0,100 0)) subdivide POLYGON((10 6,100 6,100 4,10 6))
comment:3 by , 4 years ago
grrh my commit did not come thru [5e310cf6ad646702e5574eb3aa2391021dcdd8c5/git]
comment:4 by , 4 years ago
Sadly change the 5 to 6 like so though number of polygons agrees, output is different.
For this test both have 3 polygons but second polygon is different
SELECT 'subdivide', ST_AsText(geomn) FROM ST_Subdivide( 'POLYGON((0 0,0 10,10 10,10 6,100 5.1, 100 10, 110 10, 110 0, 100 0,100 4.9,10 5,10 0,0 0))'::geometry, 6, 2) AS geom, ST_Normalize(geom) AS geomn ORDER BY geomn;
— 3.9.0 answer is
subdivide POLYGON((0 0,0 10,10 10,10 0,0 0)) subdivide POLYGON((100 0,100 4,100 10,110 10,110 0,100 0)) subdivide POLYGON((10 6,100 6,100 4,10 6))
— 3.10dev answer is
subdivide POLYGON((0 0,0 10,10 10,10 0,0 0)) subdivide POLYGON((100 0,100 10,110 10,110 0,100 0)) subdivide POLYGON((10 6,100 6,100 4,10 6))
-subdivide|POLYGON((100 0,100 4,100 10,110 10,110 0,100 0)) +subdivide|POLYGON((100 0,100 10,110 10,110 0,100 0))
comment:6 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:7 by , 4 years ago
Summary: | GEOS 3.10dev failure on make valid - winnie → GEOS 3.10dev failure on make valid |
---|
fixing locally — lwgeom_normalize does the trick.
Also this one:
According to @dbaston probably caused by - https://github.com/libgeos/geos/commit/701e4900c432127c0b2f5a0b2462a51d92fbef8b