Return the geometry of a face.
2959{
2960 uint64_t numfaceedges;
2965 uint64_t i, edgeid;
2966 int fields;
2967
2968 if (faceid == 0)
2969 {
2970 lwerror(
"SQL/MM Spatial exception - universal face has no geometry");
2971 return NULL;
2972 }
2973
2974
2975 numfaceedges = 1;
2980 ;
2982 if (numfaceedges == UINT64_MAX)
2983 {
2985 return NULL;
2986 }
2987 LWDEBUGF(1,
"lwt_GetFaceGeometry: lwt_be_getEdgeByFace returned %llu edges", numfaceedges);
2988
2989 if ( numfaceedges == 0 )
2990 {
2991 i = 1;
2993 if (i == UINT64_MAX)
2994 {
2996 return NULL;
2997 }
2998 if ( i == 0 ) {
2999 lwerror(
"SQL/MM Spatial exception - non-existent face.");
3000 return NULL;
3001 }
3003 if ( i > 1 ) {
3004 lwerror(
"Corrupted topology: multiple face records have face_id=%"
3006 return NULL;
3007 }
3008
3009
3010 lwnotice(
"Corrupted topology: face %"
3014 }
3016
3019
3020 if ( ! outg )
3021 {
3022
3023
3024
3025
3026
3027 lwnotice(
"Corrupted topology: face %"
3030 faceid, edgeid);
3033 }
3034
3035 return outg;
3036}
LWPOLY * lwpoly_construct_empty(int32_t srid, char hasz, char hasm)
LWGEOM * lwpoly_as_lwgeom(const LWPOLY *obj)
#define LWT_COL_EDGE_FACE_RIGHT
#define LWT_COL_FACE_FACE_ID
Face fields.
#define LWT_COL_EDGE_FACE_LEFT
#define LWT_COL_EDGE_EDGE_ID
Edge fields.
#define LWT_COL_EDGE_GEOM
#define PGTOPO_BE_ERROR()
#define LWDEBUGF(level, msg,...)
void lwnotice(const char *fmt,...) __attribute__((format(printf
Write a notice out to the notice handler.
void void lwerror(const char *fmt,...) __attribute__((format(printf
Write a notice out to the error handler.
static LWT_ISO_FACE * lwt_be_getFaceById(LWT_TOPOLOGY *topo, const LWT_ELEMID *ids, uint64_t *numelems, int fields)
static LWT_ISO_EDGE * lwt_be_getEdgeByFace(LWT_TOPOLOGY *topo, const LWT_ELEMID *ids, uint64_t *numelems, int fields, const GBOX *box)
void _lwt_release_edges(LWT_ISO_EDGE *edges, int num_edges)
static LWGEOM * _lwt_FaceByEdges(LWT_TOPOLOGY *topo, LWT_ISO_EDGE *edges, int numfaceedges)