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

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

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

Here is the call graph for this function:

Here is the caller graph for this function: