[postgis-tickets] [PostGIS] #4690: Line Clipping MVT failure?
PostGIS
trac at osgeo.org
Sat May 16 04:45:06 PDT 2020
#4690: Line Clipping MVT failure?
----------------------+---------------------------
Reporter: pramsey | Owner: Algunenano
Type: defect | Status: assigned
Priority: medium | Milestone: PostGIS 3.0.2
Component: postgis | Version: 3.0.x
Resolution: | Keywords:
----------------------+---------------------------
Comment (by Algunenano):
Updated to GEOS master/HEAD and the issue is still there.
I've tried extracting the geometry in the lwgeom_clip_by_rect and calling
that directly but I couldn't reproduce it with that.
The issue comes from GEOS2LWGEOM. GEOSClipByRect is returning a
multilinestring, and one of them has 3 coordinates (with z) and the other
one has 2, so Postgis doesn't know what do to with it.
{{{
(gdb) s
lwcollection_construct (type=5 '\005', srid=3857, bbox=0x0, ngeoms=2,
geoms=0x55633880f360) at lwcollection.c:53
(gdb) p lwgeom_to_wkt(geoms[0], 0, 20, 0)
$15 = 0x55633880f4a0 "LINESTRING(2542 4287,2540 4299,2537 4305,2530
4311,2519 4314,2511 4318,2504 4325,2499 4331,2497 4337,2497 4352)"
(gdb) p lwgeom_to_wkt(geoms[1], 0, 20, 0)
$16 = 0x55633880f650 "LINESTRING(2142.21276595745 4352,2138 4334,2136
4330,2131 4324,2121 4315,2103 4290,2097 4284,2090 4279,2085 4273,2076
4266,2073 4262,2072 4260,2072 4253,2072 4242,2074 4228,2075 4208,2071
4202,2064 4197,2061 4193,2061 4186,2063 4179,2064 4169,2060 4154,2056
4145,2052 4140,2047 4139,2039 4140,2023 4146,2021 4146,2013 4140,2011
4139,2009 4140,2005 4143,2003 4143,2001 4142,1990 4130,1986 4124,1984
4118)"
(gdb) p geoms[0]->flags
$17 = 1
(gdb) p geoms[1]->flags
$18 = 0
}}}
Note that geoms[0] is marked with 3D, but lwgeom_to_wkt doesn't show it
(maybe I'm doing something wrong?).
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4690#comment:4>
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