main()
{
char *pghost,
- *pgport,
- *pgoptions,
- *pgtty;
+ *pgport,
+ *pgoptions,
+ *pgtty;
char *dbName;
int nFields;
int row,
- field;
+ field;
PGconn *conn;
PGresult *res;
int junk;
assert(FLAGS_GET_M(ptarray->flags));
if ( FLAGS_GET_Z(ptarray->flags))
- { /* Four coordinates */
+ {
+ /* Four coordinates */
*(ptarray->ordinates + i * FLAGS_NDIMS(ptarray->flags) + 3) = m;
}
else
- { /* Three coordinates */
+ {
+ /* Three coordinates */
*(ptarray->ordinates + i * FLAGS_NDIMS(ptarray->flags) + 2) = m;
}
}
assert(FLAGS_GET_M(ptarray->flags));
if ( FLAGS_GET_Z(ptarray->flags))
- { /* Four coordinates */
+ {
+ /* Four coordinates */
return *(ptarray->ordinates + i * FLAGS_NDIMS(ptarray->flags) + 3);
}
else
- { /* Three coordinates */
+ {
+ /* Three coordinates */
return *(ptarray->ordinates + i * FLAGS_NDIMS(ptarray->flags) + 2);
}
}
{
col = lwline_clip_to_ordinate_range(mline->geoms[i], ordinate, from, to);
if ( col )
- { /* Something was left after the clip. */
+ {
+ /* Something was left after the clip. */
if ( lwgeom_out->ngeoms + col->ngeoms > geoms_size )
{
geoms_size += 16;
return x+y;
if (x==y) return y; /* x=y, return y */
if (ix==0)
- { /* x == 0 */
+ {
+ /* x == 0 */
SET_FLOAT_WORD(x,(hy&0x80000000)|1);/* return +-minsubnormal */
y = x*x;
if (y==x) return y;
else return x; /* raise underflow flag */
}
if (hx>=0)
- { /* x > 0 */
+ {
+ /* x > 0 */
if (hx>hy)
- { /* x > y, x -= ulp */
+ {
+ /* x > y, x -= ulp */
hx -= 1;
}
else
- { /* x < y, x += ulp */
+ {
+ /* x < y, x += ulp */
hx += 1;
}
}
else
- { /* x < 0 */
+ {
+ /* x < 0 */
if (hy>=0||hx>hy)
- { /* x < y, x -= ulp */
+ {
+ /* x < y, x -= ulp */
hx -= 1;
}
else
- { /* x > y, x += ulp */
+ {
+ /* x > y, x += ulp */
hx += 1;
}
}
hy = hx&0x7f800000;
if (hy>=0x7f800000) return x+x; /* overflow */
if (hy<0x00800000)
- { /* underflow */
+ {
+ /* underflow */
y = x*x;
if (y!=x)
- { /* raise underflow flag */
+ {
+ /* raise underflow flag */
SET_FLOAT_WORD(y,hx);
return y;
}
int input_high;
int input_low;
static char outchr[]=
- {"0123456789ABCDEF"
- };
+ {
+ "0123456789ABCDEF"
+ };
input_high = (str>>4);
input_low = (str & 0x0F);
}
static char outchr[]=
- {"0123456789ABCDEF"
- };
+{
+ "0123456789ABCDEF"
+};
/* Write HEX bytes flipping */
void
POINT4D *center;
double radius = 0.0,
- sweep = 0.0,
- angle = 0.0,
- increment = 0.0;
+ sweep = 0.0,
+ angle = 0.0,
+ increment = 0.0;
double a1, a2, a3, i;
LWDEBUG(2, "lwcircle_segmentize called. ");
lat2 = atan2((sin(u1) * cos(sigma) + cos(u1) * sin(sigma) *
cos(azimuth)), (omf * sqrt(POW2(sin_alpha) +
- POW2(sin(u1) * sin(sigma) - cos(u1) * cos(sigma) *
- cos(azimuth)))));
+ POW2(sin(u1) * sin(sigma) - cos(u1) * cos(sigma) *
+ cos(azimuth)))));
lambda = atan2((sin(sigma) * sin(azimuth)), (cos(u1) * cos(sigma) -
sin(u1) * sin(sigma) * cos(azimuth)));
C = (spheroid->f / 16.0) * cos_alphasq * (4.0 + spheroid->f * (4.0 - 3.0 * cos_alphasq));
if ( typmod_type > 0 &&
/* GEOMETRYCOLLECTION column can hold any kind of collection */
((typmod_type == COLLECTIONTYPE && ! (lwgeom_type == COLLECTIONTYPE ||
- lwgeom_type == MULTIPOLYGONTYPE ||
- lwgeom_type == MULTIPOINTTYPE ||
- lwgeom_type == MULTILINETYPE )) ||
+ lwgeom_type == MULTIPOLYGONTYPE ||
+ lwgeom_type == MULTIPOINTTYPE ||
+ lwgeom_type == MULTILINETYPE )) ||
/* Other types must be strictly equal. */
(typmod_type != lwgeom_type)) )
{
int *sizep = (int *) PG_GETARG_POINTER(1);
int numranges,
- i;
+ i;
BOX2DFLOAT4 *cur,
- *pageunion;
+ *pageunion;
POSTGIS_DEBUG(2, "GIST: LWGEOM_gist_union called\n");
if (i + 1 == lss) last = 1;
/* Check if segments are not disjoints */
if (i > 0 && memcmp( getPoint_internal(pa, npoints),
- getPoint_internal(ppa[i], 0),
- *hasz?sizeof(POINT3D):sizeof(POINT2D)))
+ getPoint_internal(ppa[i], 0),
+ *hasz?sizeof(POINT3D):sizeof(POINT2D)))
lwerror("invalid GML representation");
/* Aggregate stuff */
* substitution group
*/
if ( !strcmp((char *) xa->name, "pointMember")
- || !strcmp((char *) xa->name, "lineStringMember")
- || !strcmp((char *) xa->name, "polygonMember")
- || !strcmp((char *) xa->name, "geometryMember"))
+ || !strcmp((char *) xa->name, "lineStringMember")
+ || !strcmp((char *) xa->name, "polygonMember")
+ || !strcmp((char *) xa->name, "geometryMember"))
{
if (xa->children == NULL) break;
if (!is_kml_namespace(xa, false)) continue;
if ( !strcmp((char *) xa->name, "Point")
- || !strcmp((char *) xa->name, "LineString")
- || !strcmp((char *) xa->name, "Polygon")
- || !strcmp((char *) xa->name, "MultiGeometry"))
+ || !strcmp((char *) xa->name, "LineString")
+ || !strcmp((char *) xa->name, "Polygon")
+ || !strcmp((char *) xa->name, "MultiGeometry"))
{
if (xa->children == NULL) break;
if ( is_worth_caching_pglwgeom_bbox(lwgeom) )
{
lwgeom = (PG_LWGEOM *)DatumGetPointer(DirectFunctionCall1(
- LWGEOM_addBBOX, PointerGetDatum(lwgeom)));
+ LWGEOM_addBBOX, PointerGetDatum(lwgeom)));
}
PG_RETURN_POINTER(lwgeom);
POSTGIS_DEBUG(2, "LWGEOM_from_bytea start");
result = (PG_LWGEOM *)DatumGetPointer(DirectFunctionCall1(
- LWGEOMFromWKB, PG_GETARG_DATUM(0)));
+ LWGEOMFromWKB, PG_GETARG_DATUM(0)));
PG_RETURN_POINTER(result);
}
}
if ( dims == 2 )
- { /* nothing can be higher */
+ {
+ /* nothing can be higher */
lwinspected_release(inspected);
return 2;
}