588{
590 char locinfo[128] = "";
592
594 {
595 lwerror(
"Cannot add empty point as isolated node");
596 return -1;
597 }
598
599
600 if ( ! skipISOChecks )
601 {
603 {
604 lwerror(
"SQL/MM Spatial exception - coincident node%s", locsuffix);
605 return -1;
606 }
608 {
609 lwerror(
"SQL/MM Spatial exception - edge crosses node.%s", locsuffix);
610 return -1;
611 }
612 }
613
614 if ( checkFace && ( face == -1 || ! skipISOChecks ) )
615 {
617 if ( foundInFace == -1 ) {
619 return -1;
620 }
621 if ( foundInFace == -1 ) foundInFace = 0;
622 }
623
624 if ( face == -1 ) {
625 face = foundInFace;
626 }
627 else if ( ! skipISOChecks && foundInFace != face ) {
628#if 0
629 lwerror(
"SQL/MM Spatial exception - within face %d (not %d)",
630 foundInFace, face);
631#else
632 lwerror(
"SQL/MM Spatial exception - not within face");
633#endif
634 return -1;
635 }
636
642 {
644 return -1;
645 }
646
648}
int lwpoint_is_empty(const LWPOINT *point)
LWT_INT64 LWT_ELEMID
Identifier of topology element.
#define PGTOPO_BE_ERROR()
void void lwerror(const char *fmt,...) __attribute__((format(printf
Write a notice out to the error handler.
LWT_ELEMID lwt_be_ExistsCoincidentNode(LWT_TOPOLOGY *topo, const LWPOINT *pt)
LWT_ELEMID lwt_be_ExistsEdgeIntersectingPoint(LWT_TOPOLOGY *topo, const LWPOINT *pt)
LWT_ELEMID lwt_GetFaceContainingPoint(LWT_TOPOLOGY *topo, const LWPOINT *pt)
Find the face-id of the face properly containing a given point.
int lwt_be_insertNodes(LWT_TOPOLOGY *topo, LWT_ISO_NODE *node, uint64_t numelems)
static bool _lwt_describe_point(const LWPOINT *pt, char *buf, size_t bufsize)
LWT_ELEMID containing_face