[postgis-tickets] [PostGIS] #4550: st_asmvtgeom sometimes returns null for valid geometries (postgis 2.5.3)

PostGIS trac at osgeo.org
Thu Oct 17 12:43:00 PDT 2019


#4550: st_asmvtgeom sometimes returns null for valid geometries (postgis 2.5.3)
--------------------------+---------------------------
 Reporter:  anneb         |      Owner:  pramsey
     Type:  defect        |     Status:  new
 Priority:  medium        |  Milestone:  PostGIS 2.5.4
Component:  postgis       |    Version:  2.5.x
 Keywords:  st_asmvtgeom  |
--------------------------+---------------------------
 in PostGIS 2.5.3, function st_asMVTGeom sometimes returns NULL for valid
 (but complicated) polygon geometries. The problem depends on the zoom-
 level. Apparently, the problem occurs with some levels of simplification.
 On other zoom-levels, the same source geometry is output correctly to as
 mvt.

 example of the problem (in tile z=7, x=66, y=42):

 with data as
 (select st_geomfromewkt('SRID=3857;MULTIPOLYGON(((725189.152109922
 6815047.4380655,725313.493934068 6814594.30359714,725255.113930394
 6815000.20381502,725326.659505309 6814567.13706215,725376.325951706
 6814473.11001708,725323.05983762 6814562.79542736,725337.107185082
 6814482.96470687,725455.242593412 6814194.32538979,725373.040398379
 6814174.06448492,725453.765899427 6813976.80692352,724958.276702709
 6813976.80692352,724958.276702709 6815047.4380655,725189.152109922
 6815047.4380655)),((725251.633972098 6815032.51269983,725453.685664168
 6815047.4380655,725553.665184441 6814604.72817644,725375.473761016
 6814574.45666661,725279.127438692 6814977.08584902,725332.798208279
 6814566.38845648,725251.633972098 6815032.51269983)))') as geom)

 select st_isvalid(geom),
     geom as inputgeom,
         st_asmvtgeom(geom,
           ST_MakeBox2D(ST_Point(626172.1357121639, 6574807.4249777235),
 ST_Point(939258.2035682457, 6887893.492833804))) as nullgeom,
         st_asmvtgeom(st_simplifypreservetopology(geom, 50),
                 ST_MakeBox2D(ST_Point(626172.1357121639,
 6574807.4249777235), ST_Point(939258.2035682457, 6887893.492833804))) as
 simplifiedgeom
 from data;

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