[postgis-devel] OffsetCurve tests
Sandro Santilli
strk at kbt.io
Wed Jan 5 06:53:55 PST 2022
Hi Paul, I was reading this commit of yours:
> commit 9b0c432beea50f2b5071a50f6a4e11647c092229
> Author: Paul Ramsey <pramsey at cleverelephant.ca>
> Date: Tue Jan 4 14:20:01 2022 -0800
>
> Revise regression tests so that both pre- and post-GEOS 3.11
> updates to OffsetCurve will pass.
[...]
> +-- SELECT 't14', ST_AsEWKT(ST_Normalize(ST_OffsetCurve(
> +-- 'LINESTRING(0 0,0 20, 10 20, 10 10, 0 10)', -2,
> +-- ''
> +-- )));
> +-- SELECT 't15', ST_AsEWKT(ST_Normalize(ST_OffsetCurve(
> +-- 'GEOMETRYCOLLECTION(LINESTRING(0 0,0 20, 10 20, 10 10, 0 10),MULTILINESTRING((2 0,2 20, 12 20, 12 10, 2 10),(3 0,3 20, 13 20, 13 10, 3 10)))', -2,
> +-- ''
> +-- )));
With GEOS 3.11.0dev (unknown hash) from t14 I get the result
which was expected:
MULTILINESTRING((2 12,8 12,8 18,2 18,2 12),(2 8,2 0))
The new GEOS gives:
LINESTRING(2 0,2 8)
Shouldn't the new GEOS result be considered bogus instead ?
In the ASCII drawing below, you see the input (with arrow
signs showing the direction) and the previous result of the
offset:
.--->----.
| .----, |
^ | | v
| '----' |
|---<----'
|
^ |
| |
| |
The new result is basically ONLY returning the vertical open
line on the bottom and completely missing the inner rectangle
on top.
--strk;
More information about the postgis-devel
mailing list