New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ST_AsMVTGeom: Clip using tile coordinates also for buffer 0 #272

Closed
wants to merge 1 commit into
base: svn-trunk
from

Conversation

Projects
None yet
2 participants
@Algunenano
Member

Algunenano commented Jul 16, 2018

Does several things:

  • Avoid undefined behaviour when extent == 0, which meant that the check could be removed by the compiler.
  • Clips using tile coordinates also for buffer == 0.
  • Adds some more extra tests for clipping.
  • Adds a test with an invalid polygon so issues as the one being discussed in #268 are reflected somewhere in the tests.

@Komzpa Komzpa self-requested a review Jul 16, 2018

@Komzpa

Komzpa approved these changes Jul 16, 2018

@@ -726,8 +728,7 @@ LWGEOM *mvt_geom(LWGEOM *lwgeom, const GBOX *gbox, uint32_t extent, uint32_t buf
{
// We need to add an extra half pixel to include the points that
// fall into the bbox only after the coordinate transformation
double buffer_map_xunits = !buffer ?
0.0 : nextafterf(resx * (buffer + 0.5), 0.0);
double buffer_map_xunits = nextafterf(res, 0.0) + resx * buffer;
GBOX bgbox;
const GBOX *lwgeom_gbox = lwgeom_get_bbox(lwgeom);;

This comment has been minimized.

@Komzpa

Komzpa Jul 16, 2018

Member

;;

@Komzpa

Komzpa Jul 16, 2018

Member

;;

@strk strk closed this in 0e18c42 Jul 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment