True if the longitude of p is within the range of the longitude of the ends of e.
Definition at line 835 of file lwgeodetic.c.
836{
839 double slon = fabs((e->
start).lon) + fabs((e->
end).lon);
840 double dlon = fabs(fabs((e->
start).lon) - fabs((e->
end).lon));
841 double slat = (e->
start).lat + (e->
end).lat;
842
844 LWDEBUGF(4,
"e.end == GPOINT(%.6g %.6g) ", (e->
end).lat, (e->
end).lon);
846
847
848 g = *e;
849 q = *p;
850
851
853 {
854 LWDEBUG(4,
"vertical plane, we need to do this calculation in latitude");
855
858
861 {
863 }
864 else
865 {
867 }
868 }
869
870
872 {
873 LWDEBUG(4,
"over the pole...");
874
877
878
881
882
885
887
888
891
892 LWDEBUG(4,
"north or south?...");
893
894
895 if ( slat > 0.0 )
896 {
897 LWDEBUG(4,
"over the north pole...");
900 else
902 }
903 else
904
905 {
906 LWDEBUG(4,
"over the south pole...");
909 else
911 }
912 }
913
914
916 {
917 LWDEBUG(4,
"crosses dateline, flip longitudes...");
920 else
924 else
926
929 else
931 }
932
935 {
936 LWDEBUG(4,
"true, this edge contains point");
938 }
939
940 LWDEBUG(4,
"false, this edge does not contain point");
942}
#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.