PostGIS  2.1.10dev-r@@SVN_REVISION@@
static int SFCGAL_type_to_lwgeom_type ( sfcgal_geometry_type_t  type)
static

Definition at line 40 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().

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

Here is the call graph for this function:

Here is the caller graph for this function: