[postgis-tickets] [PostGIS] #2818: ST_Extrude can't extrude all polygons
PostGIS
trac at osgeo.org
Sat Jul 5 20:02:05 PDT 2014
#2818: ST_Extrude can't extrude all polygons
--------------------+-------------------------------------------------------
Reporter: robe | Owner: colivier
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.2.0
Component: sfcgal | Version: trunk
Keywords: |
--------------------+-------------------------------------------------------
I'm not sure if this is perhaps something that has to be noted in the docs
about setting directions of holes or perhaps ST_Extrude just doesn't work
with polygons that have holes or I have to force it in a particular
direction.
I tried to extrude this polygon with holes which ST_IsValid says is valid
{{{
SELECT ST_Extrude('POLYGON(
(-0.25 -1.25,-0.25 1.25,2.5 1.25,2.5 -1.25,-0.25 -1.25),
(2.25 0,1.25 1,1.25 -1,2.25 0),(1 -1,1 1,0 0,1 -1))'::geometry, 0,0,1)
}}}
and got the message:
{{{
NOTICE: During extrude(A, 0, 0, 1) :
NOTICE: with A: POLYGON((-1/4 -5/4,-1/4 5/4,5/2 5/4,5/2 -5/4,-1/4
-5/4),(9/4 0/1,5/4 1/1,5/4 -1/1,9/4 0/1),(1/1 -1/1,1/1 1/1,0/1 0/1,1/1
-1/1))
ERROR: Polygon is invalid : interior ring 0 is oriented in the same
direction as exterior ring : POLYGON((-1/4 -5/4 0/1,5/2 -5/4 0/1,5/2 5/4
0/1,-1/4 5/4 0/1,-1/4 -5/4 0/1),(9/4 0/1 0/1,5/4 1/1 0/1,5/4 -1/1 0/1,9/4
0/1 0/1),(1/1 -1/1 0/1,1/1 1/1 0/1,0/1 0/1 0/1,
********** Error **********
ERROR: Polygon is invalid : interior ring 0 is oriented in the same
direction as exterior ring : POLYGON((-1/4 -5/4 0/1,5/2 -5/4 0/1,5/2 5/4
0/1,-1/4 5/4 0/1,-1/4 -5/4 0/1),(9/4 0/1 0/1,5/4 1/1 0/1,5/4 -1/1 0/1,9/4
0/1 0/1),(1/1 -1/1 0/1,1/1 1/1 0/1,0/1 0/1 0/1,
}}}
I also tried applying the sfcgal ST_ForceLHR call to see if that would
ameliorate the directional issue, but it did not.
http://postgis.net/docs/manual-dev/ST_ForceLHR.html
Then I tried the long available ST_ForceRHR and that also did not change
the result. http://postgis.net/docs/manual-dev/ST_ForceRHR.html
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2818>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list