From a7165575c9468dd1f9391673dfdd94663b7de9ea Mon Sep 17 00:00:00 2001 From: mdroe Date: Tue, 25 Feb 2014 18:33:00 +0000 Subject: Fix numerical problem with great circle distance git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/branches/sphere@29969 fe389314-cf27-0410-b35b-8c050e845b92 Former-commit-id: 71015fdfc54adfd0bd91ec1b225a61dd78e7feb2 --- lib/graph.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/graph.py b/lib/graph.py index a32c3be..16c31c8 100644 --- a/lib/graph.py +++ b/lib/graph.py @@ -50,7 +50,7 @@ from . import great_circle_arc from . import vector # Set to True to enable some sanity checks -DEBUG = False +DEBUG = True class Graph: @@ -65,7 +65,7 @@ class Graph: """ class Node: - """ + """ A `~Graph.Node` represents a single point, connected by an arbitrary number of `~Graph.Edge` objects to other `~Graph.Node` objects. """ @@ -267,6 +267,7 @@ class Graph: node : `~Graph.Node` instance The new node """ + point = vector.normalize_vector(*point) new_node = self.Node(point, source_polygons) # Don't add nodes that already exist. Update the existing -- cgit