Opened 10 years ago

Closed 10 years ago

#2859 closed defect (fixed)

ST_Polygonize error

Reported by: remic Owned by: pramsey
Priority: medium Milestone: PostGIS GEOS
Component: postgis Version: 2.1.x
Keywords: Cc:

Description

Problem with polygonize function : can't work with correctly noded linestring: test case : SELECT ST_Polygonize(

ST_Node(

ST_GeomFromText('MULTILINESTRING((0 0,5 0),(5 0,10 0,10 10,5 10),(5 10,0 10,0 0) ,(5 0,5 10) )') )

)

Error : ERROR: function 0x73bf6530 returned NULL

Myabe it is at geos level?

Attachments (1)

bug_polygonize.jpg (36.1 KB ) - added by remic 10 years ago.
simple linestrings to be polygonized, not working

Download all attachments as: .zip

Change History (7)

by remic, 10 years ago

Attachment: bug_polygonize.jpg added

simple linestrings to be polygonized, not working

comment:1 by strk, 10 years ago

Works for me as of POSTGIS="2.2.0dev r12828" GEOS="3.5.0dev-CAPI-1.9.0 r3992"

strk=# select st_astext(ST_Polygonize(
    ST_Node(
        ST_GeomFromText('MULTILINESTRING((0 0,5 0),(5 0,10 0,10 10,5 10),(5 10,0 10,0 0) ,(5 0,5 10) )') )
    )
);
                                         st_astext                                         
-------------------------------------------------------------------------------------------
 GEOMETRYCOLLECTION(POLYGON((5 10,10 10,10 0,5 0,5 10)),POLYGON((5 10,5 0,0 0,0 10,5 10)))
(1 row)

comment:2 by remic, 10 years ago

Could you please confirm that the function also work with

SELECT ST_Polygonize(

ST_Node(

ST_GeomFromText('MULTILINESTRING((0 0,10 0,10 10,0 10,0 0),(1 1,9 1,9 9,1 9,1 1) ,(5 -1,5 11))') )

)

Thanks a lot ! Cheers, Rémi-C

comment:3 by strk, 10 years ago

It does:

01070000000400000001030000000100000009000000000000000000144000000000000024400000000000002440000000000000244000000000000024400000000000000000000000000000144000000000000000000000000000001440000000000000F03F0000000000002240000000000000F03F000000000000224000000000000022400000000000001440000000000000224000000000000014400000000000002440010300000001000000090000000000000000001440000000000000F03F0000000000001440000000000000000000000000000000000000000000000000000000000000000000000000000024400000000000001440000000000000244000000000000014400000000000002240000000000000F03F0000000000002240000000000000F03F000000000000F03F0000000000001440000000000000F03F0103000000010000000500000000000000000014400000000000002240000000000000224000000000000022400000000000002240000000000000F03F0000000000001440000000000000F03F0000000000001440000000000000224001030000000100000005000000000000000000144000000000000022400000000000001440000000000000F03F000000000000F03F000000000000F03F000000000000F03F000000000000224000000000000014400000000000002240

comment:4 by remic, 10 years ago

OK, it seems that this problem has been fixed in the last geos/postgis. I will update and report back. The bug is almost closed.

Cheers, Rémi-C

comment:5 by robe, 10 years ago

Milestone: PostGIS GEOS

comment:6 by remic, 10 years ago

Resolution: fixed
Status: newclosed

Ok, I change it to solved, an update to latest dev version of postgis and libgeos made it work. Thanks for the help. Cheers, Rémi-C

Note: See TracTickets for help on using tickets.