True if the longitude of p is within the range of the longitude of the ends of e.
Definition at line 783 of file lwgeodetic.c.
784{
787 double slon = fabs((e->
start).lon) + fabs((e->
end).lon);
788 double dlon = fabs(fabs((e->
start).lon) - fabs((e->
end).lon));
789 double slat = (e->
start).lat + (e->
end).lat;
790
792 LWDEBUGF(4,
"e.end == GPOINT(%.6g %.6g) ", (e->
end).lat, (e->
end).lon);
794
795
796 g = *e;
797 q = *p;
798
799
801 {
802 LWDEBUG(4,
"vertical plane, we need to do this calculation in latitude");
803
806
809 {
811 }
812 else
813 {
815 }
816 }
817
818
820 {
821 LWDEBUG(4,
"over the pole...");
822
825
826
829
830
833
835
836
839
840 LWDEBUG(4,
"north or south?...");
841
842
843 if ( slat > 0.0 )
844 {
845 LWDEBUG(4,
"over the north pole...");
848 else
850 }
851 else
852
853 {
854 LWDEBUG(4,
"over the south pole...");
857 else
859 }
860 }
861
862
864 {
865 LWDEBUG(4,
"crosses dateline, flip longitudes...");
868 else
872 else
874
877 else
879 }
880
883 {
884 LWDEBUG(4,
"true, this edge contains point");
886 }
887
888 LWDEBUG(4,
"false, this edge does not contain point");
890}
#define LW_TRUE
Return types for functions with status returns.
#define SIGNUM(n)
Macro that returns: -1 if n < 0, 1 if n > 0, 0 if n == 0.
#define LWDEBUG(level, msg)
#define LWDEBUGF(level, msg,...)
Two-point great circle segment from a to b.
Point in spherical coordinates on the world.
References GEOGRAPHIC_EDGE::end, FP_EQUALS, FP_MAX, FP_MIN, GEOGRAPHIC_POINT::lat, GEOGRAPHIC_POINT::lon, LW_FALSE, LW_TRUE, LWDEBUG, LWDEBUGF, SIGNUM, and GEOGRAPHIC_EDGE::start.