PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ SFCGAL_type_to_lwgeom_type()

static int SFCGAL_type_to_lwgeom_type ( sfcgal_geometry_type_t  type)
static

Definition at line 49 of file liblwgeom/lwgeom_sfcgal.c.

References CIRCSTRINGTYPE, COLLECTIONTYPE, COMPOUNDTYPE, CURVEPOLYTYPE, LINETYPE, lwerror(), MULTICURVETYPE, MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, MULTISURFACETYPE, POINTTYPE, POLYGONTYPE, POLYHEDRALSURFACETYPE, TINTYPE, and TRIANGLETYPE.

Referenced by SFCGAL2LWGEOM().

50 {
51  switch (type)
52  {
53  case SFCGAL_TYPE_POINT:
54  return POINTTYPE;
55 
56  case SFCGAL_TYPE_LINESTRING:
57  return LINETYPE;
58 
59  case SFCGAL_TYPE_POLYGON:
60  return POLYGONTYPE;
61 
62  case SFCGAL_TYPE_MULTIPOINT:
63  return MULTIPOINTTYPE;
64 
65  case SFCGAL_TYPE_MULTILINESTRING:
66  return MULTILINETYPE;
67 
68  case SFCGAL_TYPE_MULTIPOLYGON:
69  return MULTIPOLYGONTYPE;
70 
71  case SFCGAL_TYPE_MULTISOLID:
72  return COLLECTIONTYPE; /* Nota: PolyhedralSurface closed inside
73  aim is to use true solid type as soon
74  as available in OGC SFS */
75 
76  case SFCGAL_TYPE_GEOMETRYCOLLECTION:
77  return COLLECTIONTYPE;
78 
79 #if 0
80  case SFCGAL_TYPE_CIRCULARSTRING:
81  return CIRCSTRINGTYPE;
82 
83  case SFCGAL_TYPE_COMPOUNDCURVE:
84  return COMPOUNDTYPE;
85 
86  case SFCGAL_TYPE_CURVEPOLYGON:
87  return CURVEPOLYTYPE;
88 
89  case SFCGAL_TYPE_MULTICURVE:
90  return MULTICURVETYPE;
91 
92  case SFCGAL_TYPE_MULTISURFACE:
93  return MULTISURFACETYPE;
94 #endif
95 
96  case SFCGAL_TYPE_POLYHEDRALSURFACE:
97  return POLYHEDRALSURFACETYPE;
98 
99  case SFCGAL_TYPE_TRIANGULATEDSURFACE:
100  return TINTYPE;
101 
102  case SFCGAL_TYPE_TRIANGLE:
103  return TRIANGLETYPE;
104 
105  default:
106  lwerror("SFCGAL_type_to_lwgeom_type: Unknown Type");
107  return 0;
108  }
109 }
#define LINETYPE
Definition: liblwgeom.h:86
#define MULTICURVETYPE
Definition: liblwgeom.h:95
#define POLYGONTYPE
Definition: liblwgeom.h:87
#define CURVEPOLYTYPE
Definition: liblwgeom.h:94
#define COMPOUNDTYPE
Definition: liblwgeom.h:93
#define MULTIPOINTTYPE
Definition: liblwgeom.h:88
#define TRIANGLETYPE
Definition: liblwgeom.h:98
#define POLYHEDRALSURFACETYPE
Definition: liblwgeom.h:97
#define TINTYPE
Definition: liblwgeom.h:99
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:90
#define MULTISURFACETYPE
Definition: liblwgeom.h:96
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:85
type
Definition: ovdump.py:41
#define CIRCSTRINGTYPE
Definition: liblwgeom.h:92
#define MULTILINETYPE
Definition: liblwgeom.h:89
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
#define COLLECTIONTYPE
Definition: liblwgeom.h:91
Here is the call graph for this function:
Here is the caller graph for this function: