528{
530
532 {
533 lwerror(
"Cannot add empty point as isolated node");
534 return -1;
535 }
536
537
538 if ( ! skipISOChecks )
539 {
541 {
542 lwerror(
"SQL/MM Spatial exception - coincident node");
543 return -1;
544 }
546 {
547 lwerror(
"SQL/MM Spatial exception - edge crosses node.");
548 return -1;
549 }
550 }
551
552 if ( checkFace && ( face == -1 || ! skipISOChecks ) )
553 {
555 if ( foundInFace == -1 ) {
557 return -1;
558 }
559 if ( foundInFace == -1 ) foundInFace = 0;
560 }
561
562 if ( face == -1 ) {
563 face = foundInFace;
564 }
565 else if ( ! skipISOChecks && foundInFace != face ) {
566#if 0
567 lwerror(
"SQL/MM Spatial exception - within face %d (not %d)",
568 foundInFace, face);
569#else
570 lwerror(
"SQL/MM Spatial exception - not within face");
571#endif
572 return -1;
573 }
574
580 {
582 return -1;
583 }
584
586}
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)
LWT_ELEMID containing_face