[postgis-tickets] [PostGIS] #4314: ST_AsMVTGeom: IllegalArgumentException
PostGIS
trac at osgeo.org
Wed Jan 30 07:50:46 PST 2019
#4314: ST_AsMVTGeom: IllegalArgumentException
------------------------+---------------------------
Reporter: Algunenano | Owner: Algunenano
Type: defect | Status: assigned
Priority: high | Milestone: PostGIS 2.4.7
Component: postgis | Version: 2.4.x
Keywords: |
------------------------+---------------------------
{{{
# SELECT ST_AsMVTGeom(
'SRID=3857;MULTIPOLYGON(((-8230700.44460474
4970098.60762691,-8230694.76395068 4970080.40480045,-8230692.98226063
4970074.69572152,-8230702.2389602 4970071.78449542,-8230709.99536139
4970096.63875167,-8230700.73864062 4970099.5499925,-8230700.44460474
4970098.60762691)))'::geometry,
'SRID=3857;POLYGON((-8257645.03970416
5009377.08569731,-8257645.03970416 4970241.3272153,-8218509.28122215
4970241.3272153,-8218509.28122215 5009377.08569731,-8257645.03970416
5009377.08569731))'::geometry,
2048,
8,
true
) as the_geom_webmercator;
ERROR: lwgeom_clip_by_rect: GEOS Error: IllegalArgumentException: Invalid
number of points in LinearRing found 3 - must be 0 or >= 4
}}}
I think this was introduced in #4289 so it looks like one of the functions
that modify the geometry (`lwgeom_remove_repeated_points_in_place`,
`lwgeom_simplify_in_place`, `lwgeom_affine` and `lwgeom_grid_in_place`)
might be producing an invalid ring (or I'm not checking it's output
correctly). Note that in the case where the polygon disappeared because
of it, MVTGeom should return NULL, not an exception.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4314>
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