migurski / Dymo

Map label placer with simulated annealing.
148 stars 17 forks source link

lat, long variants on latitude, longitude #18

Open nvkelso opened 12 years ago

nvkelso commented 12 years ago

prepare places bit:

    try:
        loc = Location(float(place['latitude']), float(place['longitude']))
    except KeyError:
        try:
            loc = Location(float(place['lat']), float(place['long']))
        except KeyError:
            loc = Location(float(place['lat']), float(place['lon']))

__init bit

        try:
            lat = float(row['latitude'])
            lon = float(row['longitude'])
        except KeyError:
            try:
                lat = float(row['lat'])
                lon = float(row['long'])
            except KeyError:
                lat = float(row['lat'])
                lon = float(row['lon'])
nvkelso commented 12 years ago

Hmm, the new casing behavior and Mike's refactor of this logic broke this fix.