[postgis-tickets] [PostGIS] #3781: st_contains cannot handle curvepolygon / compoundcurve consisting of only straight lines

PostGIS trac at osgeo.org
Fri Jul 7 07:27:14 PDT 2017


#3781: st_contains cannot handle curvepolygon / compoundcurve consisting of only
straight lines
---------------------+---------------------------
 Reporter:  rtukker  |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  low      |  Milestone:  PostGIS 2.3.3
Component:  postgis  |    Version:  2.3.x
 Keywords:           |
---------------------+---------------------------
 The following query:
 {{{
 SELECT st_contains(ST_GeomFromText('POLYGON ((0 0,0 10,10 0,0 0))'),
 ST_GeomFromText('CURVEPOLYGON (COMPOUNDCURVE ((1 1,1 9),(1 9,9 1),(9 1,1
 1)))'))
 }}}
 results in:
 {{{
 Unknown geometry type: 10 - CurvePolygon
 }}}

 Compare that with the following two queries that _do_ succeed (the first
 one by adding a circularstring, the second one by using a polygon instead
 of a curvepolygon):
 {{{
 SELECT st_contains(ST_GeomFromText('POLYGON ((0 0,0 10,10 0,0 0))'),
 ST_GeomFromText('CURVEPOLYGON( COMPOUNDCURVE((1 1,1 9), (1 9,9 1),
 CIRCULARSTRING(9 1,5 2,1 1)))'))
 }}}
 {{{
 SELECT st_contains(ST_GeomFromText('POLYGON ((0 0,0 10,10 0,0 0))'),
 ST_GeomFromText('POLYGON ((1 1,1 9,9 1,1 1))'))
 }}}

 I think this is a bug, because afaik there is no obligation to have arcs
 in a compoundcurve.

 PostGIS_full_version() = POSTGIS="2.3.2 r15302" GEOS="3.4.2-CAPI-1.8.2
 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.1, released
 2013/08/26" LIBXML="2.9.1" LIBJSON="0.11.99" RASTER

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3781>
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