Skip to content

Commit

Permalink
Rename lwcircle_calculate_gbox_cartesian_2d to lw_arc_calculate_gbox_…
Browse files Browse the repository at this point in the history
…cartesian_2d

git-svn-id: http://svn.osgeo.org/postgis/trunk@10358 b70326c6-7e19-0410-871a-916f4a2858ee
  • Loading branch information
pramsey committed Oct 1, 2012
1 parent b723ca9 commit cdbf3dd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions liblwgeom/g_box.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,14 +321,14 @@ size_t gbox_serialized_size(uint8_t flags)
** Compute cartesian bounding GBOX boxes from LWGEOM.
*/

int lwcircle_calculate_gbox_cartesian_2d(const POINT2D *A1, const POINT2D *A2, const POINT2D *A3, GBOX *gbox)
int lw_arc_calculate_gbox_cartesian_2d(const POINT2D *A1, const POINT2D *A2, const POINT2D *A3, GBOX *gbox)
{
POINT2D xmin, ymin, xmax, ymax;
POINT2D C;
int A2_side;
double radius_A;

LWDEBUG(2, "lwcircle_calculate_gbox_cartesian_2d called.");
LWDEBUG(2, "lw_arc_calculate_gbox_cartesian_2d called.");

radius_A = lw_arc_center(A1, A2, A3, &C);

Expand Down Expand Up @@ -390,13 +390,13 @@ int lwcircle_calculate_gbox_cartesian_2d(const POINT2D *A1, const POINT2D *A2, c
}


static int lwcircle_calculate_gbox_cartesian(const POINT4D *p1, const POINT4D *p2, const POINT4D *p3, GBOX *gbox)
static int lw_arc_calculate_gbox_cartesian(const POINT4D *p1, const POINT4D *p2, const POINT4D *p3, GBOX *gbox)
{
int rv;

LWDEBUG(2, "lwcircle_calculate_gbox_cartesian called.");
LWDEBUG(2, "lw_arc_calculate_gbox_cartesian called.");

rv = lwcircle_calculate_gbox_cartesian_2d((POINT2D*)p1, (POINT2D*)p2, (POINT2D*)p3, gbox);
rv = lw_arc_calculate_gbox_cartesian_2d((POINT2D*)p1, (POINT2D*)p2, (POINT2D*)p3, gbox);
gbox->zmin = FP_MIN(p1->z, p3->z);
gbox->mmin = FP_MIN(p1->m, p3->m);
gbox->zmax = FP_MAX(p1->z, p3->z);
Expand Down Expand Up @@ -470,7 +470,7 @@ static int lwcircstring_calculate_gbox_cartesian(LWCIRCSTRING *curve, GBOX *gbox
getPoint4d_p(curve->points, i-1, &p2);
getPoint4d_p(curve->points, i, &p3);

if (lwcircle_calculate_gbox_cartesian(&p1, &p2, &p3, &tmp) == LW_FAILURE)
if (lw_arc_calculate_gbox_cartesian(&p1, &p2, &p3, &tmp) == LW_FAILURE)
continue;

gbox_merge(&tmp, gbox);
Expand Down
2 changes: 1 addition & 1 deletion liblwgeom/liblwgeom_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ int lwtin_is_closed(const LWTIN *tin);
* Returns -1 for left and 1 for right and 0 for co-linearity
*/
int lw_segment_side(const POINT2D *p1, const POINT2D *p2, const POINT2D *q);
int lwcircle_calculate_gbox_cartesian_2d(const POINT2D *A1, const POINT2D *A2, const POINT2D *A3, GBOX *gbox);
int lw_arc_calculate_gbox_cartesian_2d(const POINT2D *A1, const POINT2D *A2, const POINT2D *A3, GBOX *gbox);
double lw_arc_center(const POINT2D *p1, const POINT2D *p2, const POINT2D *p3, POINT2D *result);
int lw_pt_in_seg(const POINT2D *P, const POINT2D *A1, const POINT2D *A2);
int lw_pt_in_arc(const POINT2D *P, const POINT2D *A1, const POINT2D *A2, const POINT2D *A3);
Expand Down
2 changes: 1 addition & 1 deletion liblwgeom/ptarray.c
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ ptarray_arc_contains_point(const POINTARRAY *pa, const POINT2D *pt)
continue;
}

lwcircle_calculate_gbox_cartesian_2d(seg1, seg2, seg3, &gbox);
lw_arc_calculate_gbox_cartesian_2d(seg1, seg2, seg3, &gbox);

/* Only test segments in our vertical range */
if ( pt->y > gbox.ymax || pt->y < gbox.ymin )
Expand Down

0 comments on commit cdbf3dd

Please sign in to comment.