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

Definition at line 42 of file lwsegmentize.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().

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

Here is the caller graph for this function: