[postgis-tickets] [PostGIS] #3719: Error: Invalid number of points in LinearRing

PostGIS trac at osgeo.org
Fri Feb 24 07:54:35 PST 2017


#3719: Error: Invalid number of points in LinearRing
------------------------+---------------------------
 Reporter:  tiiipponen  |      Owner:  pramsey
     Type:  defect      |     Status:  new
 Priority:  medium      |  Milestone:  PostGIS 2.3.3
Component:  postgis     |    Version:  2.3.x
 Keywords:              |
------------------------+---------------------------
 Why this sql query returns error:
 select ST_Intersects(ST_GeomFromText('CURVEPOLYGON(
   (25495445.625 6671632.625, 25495445.625 6671711.375, 25495555.375
 6671711.375, 25495555.375 6671632.625, 25495445.625 6671632.625),
   COMPOUNDCURVE(
     CIRCULARSTRING(25495368.0441 6671726.9312,25495368.3959388
 6671726.93601515,25495368.7478 6671726.9333),
     (25495368.7478 6671726.9333,25495368.0441
 6671726.9312)))'),ST_MakeEnvelope(25495443.625, 6671631.625, 25495556.375,
 6671712.375))

 ERROR: First argument geometry could not be converted to GEOS:
 IllegalArgumentException: Invalid number of points in LinearRing found 3 -
 must be 0 or >= 4
 SQL state: XX000
 Context: SQL function "st_intersects" statement 1


 If I put hole geometry to boundary geometry it doesn't give error:

 select ST_Intersects(ST_GeomFromText('CURVEPOLYGON(
   COMPOUNDCURVE(
     CIRCULARSTRING(25495368.0441 6671726.9312,25495368.3959388
 6671726.93601515,25495368.7478 6671726.9333),
     (25495368.7478 6671726.9333,25495368.0441
 6671726.9312)))'),ST_MakeEnvelope(25495443.625, 6671631.625, 25495556.375,
 6671712.375))

 st_intersects
 boolean

 f

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