Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong polygonize on simplepolys #13

Open
paulopires16 opened this issue Jun 3, 2018 · 1 comment
Open

wrong polygonize on simplepolys #13

paulopires16 opened this issue Jun 3, 2018 · 1 comment

Comments

@paulopires16
Copy link

paulopires16 commented Jun 3, 2018

Hello,

"simplifyLayerPreserveTopology": The polygonize on simplepolys table is wrong... lost one rig?

Please see this example:

DROP TABLE IF EXISTS areas;
CREATE TABLE areas (
id integer,
geom GEOMETRY
);

INSERT INTO areas (id, geom) VALUES
(1, ST_GeometryFromText('POLYGON (( 152475.78309656942 348633.83643648896 100.0 , 152819.11124438787 348634.30014856393 100.0 , 152813.0950157867 348346.43594807677 100.0 , 151948.4678701025 348359.31090193643 100.0 , 151945.74402745243 348463.90645969921 100.0 , 152474.91289439827 348458.49244305107 100.0 , 152475.78309656942 348633.83643648896 100.0 ), ( 152527.33647845959 348558.83199005033 100.0 , 152529.2307245445 348407.29230325681 100.0 , 152709.18410261182 348403.50381108694 100.0 , 152709.18410261182 348558.83199005033 100.0 , 152527.33647845959 348558.83199005033 100.0 ), ( 152006.95163549151 348435.14978348627 100.0 , 152006.95163549151 348385.89938685647 100.0 , 152092.19270658147 348384.00514083228 100.0 , 152091.24558356937 348434.20266047411 100.0 , 152006.95163549151 348435.14978348627 100.0 ))')),
(2, ST_GeometryFromText('POLYGON (( 152527.33647845959 348558.83199005033 100.0 , 152709.18410261182 348558.83199005033 100.0 , 152709.18410261182 348403.50381108694 100.0 , 152529.22480595027 348407.76579079556 100.0 , 152527.33647845959 348558.83199005033 100.0 ))'))
;

DROP TABLE IF EXISTS poly2line;
create table poly2line as
SELECT ST_Boundary((ST_Dump(geom)).geom) AS geom
FROM areas;

DROP TABLE IF EXISTS polygonize;
CREATE TABLE polygonize AS
select (st_dump(ST_Polygonize(geom))).geom as geom
from poly2line;

@paulopires16
Copy link
Author

found... just remove this line --create unlogged table gunion as select st_union(g) as g from rings; –

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant