Commit 9eabe722 authored by Raúl Marín's avatar Raúl Marín

Style changes from the previous commits

Also addresses some warnings in debug logs

Note: SPI_processed was 32b until PG9.5 (still supported)


git-svn-id: http://svn.osgeo.org/postgis/trunk@17409 b70326c6-7e19-0410-871a-916f4a2858ee
parent 0efa638c
Pipeline #58145085 (#3509) passed with stage
in 23 minutes and 40 seconds
......@@ -198,10 +198,7 @@ typedef struct LWT_BE_CALLBACKS_T {
* (@see lastErrorMessage)
*
*/
LWT_ISO_NODE* (*getNodeById) (
const LWT_BE_TOPOLOGY* topo,
const LWT_ELEMID* ids, uint64_t* numelems, int fields
);
LWT_ISO_NODE *(*getNodeById)(const LWT_BE_TOPOLOGY *topo, const LWT_ELEMID *ids, uint64_t *numelems, int fields);
/**
* Get nodes within distance by point
......@@ -223,11 +220,12 @@ typedef struct LWT_BE_CALLBACKS_T {
* - error ("numelems" is set to -1)
*
*/
LWT_ISO_NODE* (*getNodeWithinDistance2D) (
const LWT_BE_TOPOLOGY* topo,
const LWPOINT* pt, double dist, uint64_t* numelems,
int fields, int limit
);
LWT_ISO_NODE *(*getNodeWithinDistance2D)(const LWT_BE_TOPOLOGY *topo,
const LWPOINT *pt,
double dist,
uint64_t *numelems,
int fields,
int limit);
/**
* Insert nodes
......@@ -242,11 +240,7 @@ typedef struct LWT_BE_CALLBACKS_T {
*
* @return 1 on success, 0 on error (@see lastErrorMessage)
*/
int (*insertNodes) (
const LWT_BE_TOPOLOGY* topo,
LWT_ISO_NODE* nodes,
uint64_t numelems
);
int (*insertNodes)(const LWT_BE_TOPOLOGY *topo, LWT_ISO_NODE *nodes, uint64_t numelems);
/**
* Get edge by id
......@@ -264,10 +258,7 @@ typedef struct LWT_BE_CALLBACKS_T {
* - none found ("numelems" is set to 0)
* - error ("numelems" is set to -1)
*/
LWT_ISO_EDGE* (*getEdgeById) (
const LWT_BE_TOPOLOGY* topo,
const LWT_ELEMID* ids, uint64_t* numelems, int fields
);
LWT_ISO_EDGE *(*getEdgeById)(const LWT_BE_TOPOLOGY *topo, const LWT_ELEMID *ids, uint64_t *numelems, int fields);
/**
* Get edges within distance by point
......@@ -289,11 +280,12 @@ typedef struct LWT_BE_CALLBACKS_T {
* - error ("numelems" is set to -1)
*
*/
LWT_ISO_EDGE* (*getEdgeWithinDistance2D) (
const LWT_BE_TOPOLOGY* topo,
const LWPOINT* pt, double dist, uint64_t* numelems,
int fields, int limit
);
LWT_ISO_EDGE *(*getEdgeWithinDistance2D)(const LWT_BE_TOPOLOGY *topo,
const LWPOINT *pt,
double dist,
uint64_t *numelems,
int fields,
int limit);
/**
* Get next available edge identifier
......@@ -322,11 +314,7 @@ typedef struct LWT_BE_CALLBACKS_T {
*
* @return number of inserted edges, or -1 (@see lastErrorMessage)
*/
int (*insertEdges) (
const LWT_BE_TOPOLOGY* topo,
LWT_ISO_EDGE* edges,
uint64_t numelems
);
int (*insertEdges)(const LWT_BE_TOPOLOGY *topo, LWT_ISO_EDGE *edges, uint64_t numelems);
/**
* Update edges selected by fields match/mismatch
......@@ -369,10 +357,7 @@ typedef struct LWT_BE_CALLBACKS_T {
* - none found ("numelems" is set to 0)
* - error ("numelems" is set to -1)
*/
LWT_ISO_FACE* (*getFaceById) (
const LWT_BE_TOPOLOGY* topo,
const LWT_ELEMID* ids, uint64_t* numelems, int fields
);
LWT_ISO_FACE *(*getFaceById)(const LWT_BE_TOPOLOGY *topo, const LWT_ELEMID *ids, uint64_t *numelems, int fields);
/**
* Get face containing point
......@@ -447,11 +432,8 @@ typedef struct LWT_BE_CALLBACKS_T {
* - error ("numelems" is set to -1)
*
*/
LWT_ISO_NODE* (*getNodeWithinBox2D) (
const LWT_BE_TOPOLOGY* topo,
const GBOX* box,
uint64_t* numelems, int fields, int limit
);
LWT_ISO_NODE *(
*getNodeWithinBox2D)(const LWT_BE_TOPOLOGY *topo, const GBOX *box, uint64_t *numelems, int fields, int limit);
/**
* Get edges whose bounding box overlaps a given 2D bounding box
......@@ -472,11 +454,8 @@ typedef struct LWT_BE_CALLBACKS_T {
* - error ("numelems" is set to -1)
*
*/
LWT_ISO_EDGE* (*getEdgeWithinBox2D) (
const LWT_BE_TOPOLOGY* topo,
const GBOX* box,
uint64_t* numelems, int fields, int limit
);
LWT_ISO_EDGE *(
*getEdgeWithinBox2D)(const LWT_BE_TOPOLOGY *topo, const GBOX *box, uint64_t *numelems, int fields, int limit);
/**
* Get edges that start or end on any of the given node identifiers
......@@ -496,10 +475,7 @@ typedef struct LWT_BE_CALLBACKS_T {
* - error ("numelems" is set to -1)
* (@see lastErrorMessage)
*/
LWT_ISO_EDGE* (*getEdgeByNode) (
const LWT_BE_TOPOLOGY* topo,
const LWT_ELEMID* ids, uint64_t* numelems, int fields
);
LWT_ISO_EDGE *(*getEdgeByNode)(const LWT_BE_TOPOLOGY *topo, const LWT_ELEMID *ids, uint64_t *numelems, int fields);
/**
* Update nodes selected by fields match/mismatch
......@@ -559,11 +535,7 @@ typedef struct LWT_BE_CALLBACKS_T {
*
* @return number of inserted faces, or -1 (@see lastErrorMessage)
*/
int (*insertFaces) (
const LWT_BE_TOPOLOGY* topo,
LWT_ISO_FACE* faces,
uint64_t numelems
);
int (*insertFaces)(const LWT_BE_TOPOLOGY *topo, LWT_ISO_FACE *faces, uint64_t numelems);
/**
* Update faces by id
......@@ -609,10 +581,7 @@ typedef struct LWT_BE_CALLBACKS_T {
* walked in their direction, negative ones in opposite) or
* NULL on error (@see lastErrorMessage)
*/
LWT_ELEMID* (*getRingEdges) (
const LWT_BE_TOPOLOGY* topo,
LWT_ELEMID edge, uint64_t *numedges, uint64_t limit
);
LWT_ELEMID *(*getRingEdges)(const LWT_BE_TOPOLOGY *topo, LWT_ELEMID edge, uint64_t *numedges, int limit);
/**
* Update edges by id
......@@ -628,11 +597,7 @@ typedef struct LWT_BE_CALLBACKS_T {
* @return number of edges being updated or -1 on error
* (@see lastErrorMessage)
*/
int (*updateEdgesById) (
const LWT_BE_TOPOLOGY* topo,
const LWT_ISO_EDGE* edges, uint64_t numedges,
int upd_fields
);
int (*updateEdgesById)(const LWT_BE_TOPOLOGY *topo, const LWT_ISO_EDGE *edges, uint64_t numedges, int upd_fields);
/**
* \brief
......@@ -654,11 +619,11 @@ typedef struct LWT_BE_CALLBACKS_T {
* - no edge found ("numelems" is set to 0)
* - error ("numelems" is set to -1)
*/
LWT_ISO_EDGE* (*getEdgeByFace) (
const LWT_BE_TOPOLOGY* topo,
const LWT_ELEMID* ids, uint64_t* numelems, int fields,
const GBOX *box
);
LWT_ISO_EDGE *(*getEdgeByFace)(const LWT_BE_TOPOLOGY *topo,
const LWT_ELEMID *ids,
uint64_t *numelems,
int fields,
const GBOX *box);
/**
* Get isolated nodes contained in any of the given faces
......@@ -679,11 +644,11 @@ typedef struct LWT_BE_CALLBACKS_T {
* - no nod found ("numelems" is set to 0)
* - error ("numelems" is set to -1, @see lastErrorMessage)
*/
LWT_ISO_NODE* (*getNodeByFace) (
const LWT_BE_TOPOLOGY* topo,
const LWT_ELEMID* faces, uint64_t* numelems, int fields,
const GBOX *box
);
LWT_ISO_NODE *(*getNodeByFace)(const LWT_BE_TOPOLOGY *topo,
const LWT_ELEMID *faces,
uint64_t *numelems,
int fields,
const GBOX *box);
/**
* Update nodes by id
......@@ -698,11 +663,7 @@ typedef struct LWT_BE_CALLBACKS_T {
* @return number of nodes being updated or -1 on error
* (@see lastErrorMessage)
*/
int (*updateNodesById) (
const LWT_BE_TOPOLOGY* topo,
const LWT_ISO_NODE* nodes, uint64_t numnodes,
int upd_fields
);
int (*updateNodesById)(const LWT_BE_TOPOLOGY *topo, const LWT_ISO_NODE *nodes, uint64_t numnodes, int upd_fields);
/**
* Delete faces by id
......@@ -714,11 +675,7 @@ typedef struct LWT_BE_CALLBACKS_T {
* @return number of faces being deleted or -1 on error
* (@see lastErrorMessage)
*/
int (*deleteFacesById) (
const LWT_BE_TOPOLOGY* topo,
const LWT_ELEMID* ids,
uint64_t numelems
);
int (*deleteFacesById)(const LWT_BE_TOPOLOGY *topo, const LWT_ELEMID *ids, uint64_t numelems);
/**
* Get topology SRID
......@@ -753,11 +710,7 @@ typedef struct LWT_BE_CALLBACKS_T {
* @return number of nodes being deleted or -1 on error
* (@see lastErrorMessage)
*/
int (*deleteNodesById) (
const LWT_BE_TOPOLOGY* topo,
const LWT_ELEMID* ids,
uint64_t numelems
);
int (*deleteNodesById)(const LWT_BE_TOPOLOGY *topo, const LWT_ELEMID *ids, uint64_t numelems);
/**
* Check TopoGeometry objects before an edge removal event
......@@ -863,11 +816,11 @@ typedef struct LWT_BE_CALLBACKS_T {
* - error ("numelems" is set to -1)
*
*/
LWT_ISO_FACE* (*getFaceWithinBox2D) (
const LWT_BE_TOPOLOGY* topo,
const GBOX* box,
uint64_t* numelems, int fields, uint64_t limit
);
LWT_ISO_FACE *(*getFaceWithinBox2D)(const LWT_BE_TOPOLOGY *topo,
const GBOX *box,
uint64_t *numelems,
int fields,
int limit);
} LWT_BE_CALLBACKS;
......
......@@ -49,23 +49,29 @@ LWT_BE_TOPOLOGY * lwt_be_loadTopologyByName(LWT_BE_IFACE *be, const char *name);
int lwt_be_freeTopology(LWT_TOPOLOGY *topo);
LWT_ISO_NODE* lwt_be_getNodeWithinDistance2D(LWT_TOPOLOGY* topo, LWPOINT* pt, double dist, uint64_t* numelems, int fields, uint64_t limit);
LWT_ISO_NODE *lwt_be_getNodeWithinDistance2D(LWT_TOPOLOGY *topo,
LWPOINT *pt,
double dist,
uint64_t *numelems,
int fields,
uint64_t limit);
LWT_ISO_NODE* lwt_be_getNodeById(LWT_TOPOLOGY* topo, const LWT_ELEMID* ids, uint64_t* numelems, int fields);
LWT_ISO_NODE *lwt_be_getNodeById(LWT_TOPOLOGY *topo, const LWT_ELEMID *ids, uint64_t *numelems, int fields);
int lwt_be_ExistsCoincidentNode(LWT_TOPOLOGY* topo, LWPOINT* pt);
int lwt_be_insertNodes(LWT_TOPOLOGY* topo, LWT_ISO_NODE* node, uint64_t numelems);
int lwt_be_insertNodes(LWT_TOPOLOGY *topo, LWT_ISO_NODE *node, uint64_t numelems);
int lwt_be_ExistsEdgeIntersectingPoint(LWT_TOPOLOGY* topo, LWPOINT* pt);
LWT_ELEMID lwt_be_getNextEdgeId(LWT_TOPOLOGY* topo);
LWT_ISO_EDGE* lwt_be_getEdgeById(LWT_TOPOLOGY* topo, const LWT_ELEMID* ids,
uint64_t* numelems, int fields);
LWT_ISO_EDGE* lwt_be_getEdgeWithinDistance2D(LWT_TOPOLOGY* topo, LWPOINT* pt,
double dist, uint64_t* numelems, int fields,
uint64_t limit);
int
lwt_be_insertEdges(LWT_TOPOLOGY* topo, LWT_ISO_EDGE* edge, uint64_t numelems);
LWT_ISO_EDGE *lwt_be_getEdgeById(LWT_TOPOLOGY *topo, const LWT_ELEMID *ids, uint64_t *numelems, int fields);
LWT_ISO_EDGE *lwt_be_getEdgeWithinDistance2D(LWT_TOPOLOGY *topo,
LWPOINT *pt,
double dist,
uint64_t *numelems,
int fields,
uint64_t limit);
int lwt_be_insertEdges(LWT_TOPOLOGY *topo, LWT_ISO_EDGE *edge, uint64_t numelems);
int
lwt_be_updateEdges(LWT_TOPOLOGY* topo, const LWT_ISO_EDGE* sel_edge, int sel_fields, const LWT_ISO_EDGE* upd_edge, int upd_fields, const LWT_ISO_EDGE* exc_edge, int exc_fields);
int
......
This diff is collapsed.
......@@ -417,8 +417,8 @@ Datum RASTER_getGDALDrivers(PG_FUNCTION_ARGS)
POSTGIS_RT_DEBUGF(4, "Result %d, Index %d", call_cntr, drv_set2[call_cntr].idx);
POSTGIS_RT_DEBUGF(4, "Result %d, Short Name %s", call_cntr, drv_set2[call_cntr].short_name);
POSTGIS_RT_DEBUGF(4, "Result %d, Full Name %s", call_cntr, drv_set2[call_cntr].long_name);
POSTGIS_RT_DEBUGF(4, "Result %d, Can Read %s", call_cntr, drv_set2[call_cntr].can_read);
POSTGIS_RT_DEBUGF(4, "Result %d, Can Write %s", call_cntr, drv_set2[call_cntr].can_write);
POSTGIS_RT_DEBUGF(4, "Result %d, Can Read %u", call_cntr, drv_set2[call_cntr].can_read);
POSTGIS_RT_DEBUGF(4, "Result %d, Can Write %u", call_cntr, drv_set2[call_cntr].can_write);
POSTGIS_RT_DEBUGF(5, "Result %d, Create Options %s", call_cntr, drv_set2[call_cntr].create_options);
/* build a tuple */
......
......@@ -926,8 +926,8 @@ Datum RASTER_asRaster(PG_FUNCTION_ARGS)
}
}
#if POSTGIS_DEBUG_LEVEL > 0
for (i = 0; i < pixtypes_len; i++)
POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: pixtypes[%d] = %d", i, (int) pixtypes[i]);
for (uint32_t u = 0; u < pixtypes_len; u++)
POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: pixtypes[%u] = %u", i, pixtypes[i]);
#endif
/* value */
......@@ -989,8 +989,8 @@ Datum RASTER_asRaster(PG_FUNCTION_ARGS)
}
}
#if POSTGIS_DEBUG_LEVEL > 0
for (i = 0; i < values_len; i++)
POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: values[%d] = %f", i, values[i]);
for (uint32_t u = 0; u < values_len; u++)
POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: values[%u] = %f", i, values[i]);
#endif
/* nodataval */
......@@ -1061,9 +1061,10 @@ Datum RASTER_asRaster(PG_FUNCTION_ARGS)
}
}
#if POSTGIS_DEBUG_LEVEL > 0
for (i = 0; i < nodatavals_len; i++) {
POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: hasnodatas[%d] = %d", i, hasnodatas[i]);
POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: nodatavals[%d] = %f", i, nodatavals[i]);
for (uint32_t u = 0; u < nodatavals_len; u++)
{
POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: hasnodatas[%u] = %d", u, hasnodatas[u]);
POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: nodatavals[%u] = %f", u, nodatavals[u]);
}
#endif
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment