PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ lwgeom_has_arc()

int lwgeom_has_arc ( const LWGEOM geom)

Definition at line 55 of file lwstroke.c.

56 {
57  LWCOLLECTION *col;
58  uint32_t i;
59 
60  LWDEBUG(2, "lwgeom_has_arc called.");
61 
62  switch (geom->type)
63  {
64  case POINTTYPE:
65  case LINETYPE:
66  case POLYGONTYPE:
67  case TRIANGLETYPE:
68  case MULTIPOINTTYPE:
69  case MULTILINETYPE:
70  case MULTIPOLYGONTYPE:
72  case TINTYPE:
73  return LW_FALSE;
74  case CIRCSTRINGTYPE:
75  case CURVEPOLYTYPE:
76  case COMPOUNDTYPE:
77  return LW_TRUE;
78  /* It's a collection that MAY contain an arc */
79  default:
80  col = (LWCOLLECTION *)geom;
81  for (i=0; i<col->ngeoms; i++)
82  {
83  if (lwgeom_has_arc(col->geoms[i]) == LW_TRUE)
84  return LW_TRUE;
85  }
86  return LW_FALSE;
87  }
88 }
#define LW_FALSE
Definition: liblwgeom.h:77
#define COMPOUNDTYPE
Definition: liblwgeom.h:93
#define CURVEPOLYTYPE
Definition: liblwgeom.h:94
#define MULTILINETYPE
Definition: liblwgeom.h:89
#define LINETYPE
Definition: liblwgeom.h:86
#define MULTIPOINTTYPE
Definition: liblwgeom.h:88
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:85
#define TINTYPE
Definition: liblwgeom.h:99
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:90
#define POLYGONTYPE
Definition: liblwgeom.h:87
#define POLYHEDRALSURFACETYPE
Definition: liblwgeom.h:97
#define CIRCSTRINGTYPE
Definition: liblwgeom.h:92
#define TRIANGLETYPE
Definition: liblwgeom.h:98
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:76
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:83
int lwgeom_has_arc(const LWGEOM *geom)
Definition: lwstroke.c:55
uint32_t ngeoms
Definition: liblwgeom.h:510
LWGEOM ** geoms
Definition: liblwgeom.h:512
uint8_t type
Definition: liblwgeom.h:399
unsigned int uint32_t
Definition: uthash.h:78

References CIRCSTRINGTYPE, COMPOUNDTYPE, CURVEPOLYTYPE, LWCOLLECTION::geoms, LINETYPE, LW_FALSE, LW_TRUE, LWDEBUG, lwgeom_has_arc(), MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, LWCOLLECTION::ngeoms, POINTTYPE, POLYGONTYPE, POLYHEDRALSURFACETYPE, TINTYPE, TRIANGLETYPE, and LWGEOM::type.

Referenced by LWGEOM2GEOS(), lwgeom_has_arc(), and LWGEOM_has_arc().

Here is the call graph for this function:
Here is the caller graph for this function: