[postgis-tickets] [PostGIS] #3719: Error: Invalid number of points in LinearRing
PostGIS
trac at osgeo.org
Tue Oct 23 18:30:57 PDT 2018
#3719: Error: Invalid number of points in LinearRing
-------------------------+---------------------------
Reporter: tiiipponen | Owner: dbaston
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 3.0.0
Component: postgis | Version: 2.3.x
Resolution: | Keywords:
-------------------------+---------------------------
Description changed by dbaston:
Old description:
> 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
New description:
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#comment:27>
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