Permalink
Browse files

Renamed index classes to PointIndex and FootprintIndex

  • Loading branch information...
1 parent 19eac8b commit 460fc60e30f42f51e2c338826da6c9529e06745e @migurski committed Sep 29, 2011
Showing with 8 additions and 10 deletions.
  1. +0 −1 Dymo/__init__.py
  2. +4 −5 Dymo/index.py
  3. +2 −2 dymo-label.py
  4. +2 −2 dymo-prepare-places.py
View
@@ -8,7 +8,6 @@
from ModestMaps.Core import Point, Coordinate
from .places import Place
-from .index import Index
__version__ = 'N.N.N'
View
@@ -5,7 +5,7 @@
from ModestMaps.OpenStreetMap import Provider
from ModestMaps.Core import Coordinate
-class Index:
+class PointIndex:
""" Primitive quadtree for checking collisions based on a known radius.
"""
def __init__(self, zoom, radius):
@@ -62,12 +62,11 @@ def blocks(self, location):
return False
-class Index2:
- """ Primitive quadtree for checking collisions based on a known radius.
+class FootprintIndex:
+ """ Primitive quadtree for checking collisions based on footprints.
"""
def __init__(self, zoom):
- """ Zoom is the base zoom level we're annealing to, radius is
- the pixel radius around each place to check for collisions.
+ """ Zoom is the base zoom level we're annealing to.
"""
self.zpixel = zoom + 8
self.zgroup = zoom
View
@@ -4,9 +4,9 @@
import json
from Dymo.anneal import Annealer
+from Dymo.index import FootprintIndex
from Dymo.places import Places, NothingToDo
from Dymo import load_places, point_lonlat
-from Dymo.index import Index2
optparser = OptionParser(usage="""%prog [options] <label output file> <point output file> <input file 1> [<input file 2>, ...]
@@ -90,7 +90,7 @@ def state_move(places):
label_data = {'type': 'FeatureCollection', 'features': []}
point_data = {'type': 'FeatureCollection', 'features': []}
- placed = Index2(options.zoom)
+ placed = FootprintIndex(options.zoom)
for place in places:
blocker = placed.blocks(place)
View
@@ -6,7 +6,7 @@
from ModestMaps.Geo import Location
-from Dymo import Index
+from Dymo.index import PointIndex
optparser = OptionParser(usage="""%prog [options] <input file> <output file>
@@ -97,7 +97,7 @@ def prepare_file(name, mode):
output.writerow(fields)
if options.radius > 0:
- others = Index(options.zoom, options.radius)
+ others = PointIndex(options.zoom, options.radius)
for place in input:
if 'point size' not in place:

0 comments on commit 460fc60

Please sign in to comment.