PostGIS  2.2.7dev-r@@SVN_REVISION@@
int lwgeom_has_arc ( const LWGEOM geom)

Definition at line 41 of file lwstroke.c.

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

Referenced by LWGEOM2GEOS(), and LWGEOM_has_arc().

42 {
43  LWCOLLECTION *col;
44  int i;
45 
46  LWDEBUG(2, "lwgeom_has_arc called.");
47 
48  switch (geom->type)
49  {
50  case POINTTYPE:
51  case LINETYPE:
52  case POLYGONTYPE:
53  case TRIANGLETYPE:
54  case MULTIPOINTTYPE:
55  case MULTILINETYPE:
56  case MULTIPOLYGONTYPE:
58  case TINTYPE:
59  return LW_FALSE;
60  case CIRCSTRINGTYPE:
61  return LW_TRUE;
62  /* It's a collection that MAY contain an arc */
63  default:
64  col = (LWCOLLECTION *)geom;
65  for (i=0; i<col->ngeoms; i++)
66  {
67  if (lwgeom_has_arc(col->geoms[i]) == LW_TRUE)
68  return LW_TRUE;
69  }
70  return LW_FALSE;
71  }
72 }
#define LINETYPE
Definition: liblwgeom.h:71
#define POLYGONTYPE
Definition: liblwgeom.h:72
#define MULTIPOINTTYPE
Definition: liblwgeom.h:73
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:50
#define TRIANGLETYPE
Definition: liblwgeom.h:83
#define POLYHEDRALSURFACETYPE
Definition: liblwgeom.h:82
#define LW_FALSE
Definition: liblwgeom.h:62
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:61
LWGEOM ** geoms
Definition: liblwgeom.h:493
#define TINTYPE
Definition: liblwgeom.h:84
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:75
int lwgeom_has_arc(const LWGEOM *geom)
Definition: lwstroke.c:41
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:70
uint8_t type
Definition: liblwgeom.h:380
#define CIRCSTRINGTYPE
Definition: liblwgeom.h:77
#define MULTILINETYPE
Definition: liblwgeom.h:74

Here is the caller graph for this function: