Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#4120 closed defect (fixed)

ST_AsMVTGeom: Clip using tile coordinates

Reported by: Algunenano Owned by: Algunenano
Priority: medium Milestone: PostGIS 2.5.0
Component: postgis Version: master
Keywords: Cc:

Description

ST_AsMVTGeom is clipping before doing the projection transformation but the buffer is given in tile coordinates, so some points that fall within the full extent are being incorrectly dropped.

Example:

SELECT ST_AsText(ST_AsMVTGeom(
	ST_Point(11.49, 11.49),
	ST_MakeBox2D(ST_Point(0, 0), ST_Point(10, 10)),
	10, 1, true));
 st_astext 
-----------
 
(1 row)

If we disable clipping we can see that the point falls within the bbox (-1 -1, 11 11) :

SELECT ST_AsText(ST_AsMVTGeom(
ST_Point(11.49, 11.49),
ST_MakeBox2D(ST_Point(0, 0), ST_Point(10, 10)),
10, 1, false));
  st_astext   
--------------
 POINT(11 -1)
(1 row)

Change History (2)

comment:1 by Raul Marin, 6 years ago

Resolution: fixed
Status: assignedclosed

In 16640:

ST_AsMVTGeom: Clip using tile coordinates

Closes #4120
Closes https://github.com/postgis/postgis/pull/267

comment:2 by Raul Marin, 6 years ago

In 16648:

ST_AsMVTGeom: Clip using tile coordinates also for buffer 0

Closes https://github.com/postgis/postgis/pull/272
References #4120

Note: See TracTickets for help on using tickets.