lwpoint_grid(LWPOINT *point, gridspec *grid)
{
POINT2D p;
- getPoint2d_p(point->point, 0, &p);
double x, y;
+ getPoint2d_p(point->point, 0, &p);
x = rint((p.x - grid->ipx)/grid->xsize) *
grid->xsize + grid->ipx;
y = rint((p.y - grid->ipy)/grid->ysize) *
for (i=0; i<line1->points->npoints; i++)
{
POINT2D p;
+ double dist;
+
getPoint2d_p(line1->points, i, &p);
- double dist = distance2d_pt_ptarray(&p, line2->points);
+ dist = distance2d_pt_ptarray(&p, line2->points);
if (dist > maxdist) maxdist = dist;
}
PG_LWGEOM *result;
LWGEOM *lwout;
int SRID;
+ BOX2DFLOAT4 bbox;
#ifdef PROFILE
profstart(PROF_QRUN);
PG_RETURN_NULL(); //never get here
}
- BOX2DFLOAT4 bbox;
-
/* Copy input bbox if any */
if ( getbox2d_p(SERIALIZED_FORM(geom1), &bbox) )
{
case GEOS_POINT:
return POINTTYPE;
case GEOS_LINESTRING:
+#if GEOS_LAST_INTERFACE > 1
case GEOS_LINEARRING:
+#endif
return LINETYPE;
case GEOS_POLYGON:
return POLYGONTYPE;
POINTARRAY *extring;
LWLINE *line;
PG_LWGEOM *result;
- BOX2DFLOAT4 bbox, *bbox2;
+ BOX2DFLOAT4 bbox, *bbox2=NULL;
if ( TYPE_GETTYPE(geom->type) != POLYGONTYPE )
{