]> gitweb.michael.orlitzky.com - dead/census-tools.git/blobdiff - src/SummaryFile1.py
Removed unused code from the GPS and SummaryFile1 modules.
[dead/census-tools.git] / src / SummaryFile1.py
index d646b07e70df62fd9bc0c7d478626840fe91ab7d..7105ff42bfcc8375bdf616c3de1fe81d42c52b46 100644 (file)
@@ -410,32 +410,3 @@ class GeoRecordParser:
           
         
         return record
-    
-
-
-def FindClosestBlock(blocks, target_coords):
-    """
-    Find the closest block (from within blocks) to the GPS
-    coordinates given by target_coords.
-    """
-
-    # Empty by default. Hopefully we're passed some blocks.
-    closest_block = None
-    min_distance = 999999999.0 # Don't look at me like that.
-
-    for block in blocks:
-        this_distance = GPS.CalculateDistance(target_coords, block.coordinates)
-        if (this_distance < min_distance):
-            closest_block = block
-            min_distance = this_distance
-
-    return closest_block
-
-
-
-def FindAveragePopulationDensity(coords, geo_file_path):
-    grp = GeoRecordParser()
-    blocks = grp.parse_blocks(geo_file_path)
-    closest_block = FindClosestBlock(blocks, coords)
-    
-    return closest_block.population_density()