Skip to content

Definition of the tcbuffer type#652

Merged
mschoema merged 8 commits intoMobilityDB:masterfrom
estebanzimanyi:buffer
Feb 7, 2025
Merged

Definition of the tcbuffer type#652
mschoema merged 8 commits intoMobilityDB:masterfrom
estebanzimanyi:buffer

Conversation

@estebanzimanyi
Copy link
Copy Markdown
Member

No description provided.

getPoint4d_p(ring->points, 0, &p1);
getPoint4d_p(ring->points, 1, &p2);
double radius = (p2.x - p1.x) / 2;
LWGEOM *center = (LWGEOM *) lwpoint_make2d(srid, p1.x + radius, p1.y + radius);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is still incorrect. p1.x + radius, p1.y + radius is not always the center of the circle. For example, if the circle is defined using the following 3 points: (1 0, 0 0, 1 0). I think the center should be computed by linear interpolation between point 1 and 2.

@mschoema mschoema merged commit 9141fa1 into MobilityDB:master Feb 7, 2025
@mschoema mschoema deleted the buffer branch February 7, 2025 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants