Not necessarily, when you load in the data, you can create a field that is
a tuple of numbers.




On Tue, Mar 5, 2013 at 5:11 PM, Mark Huberty <notifications@github.com>wrote:

> In src/haversine.pyx:
>
> > +
> > +    cdef float dlon = rlon2 - rlon1
> > +    cdef float dlat = rlat2 - rlat1
> > +
> > +    cdef float a = math.sin(dlat/2)**2 + math.cos(rlat1) * math.cos(rlat2) * math.sin(dlon/2)**2
> > +
> > +    cdef float c = 2 * math.asin(math.sqrt(a))
> > +    # cdef float c = 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a))
> > +    cdef float km = 6371 * c
> > +    return km
> > +
> > +cpdef split_string(char *valstr, char *delim):
> > +    lat, lng = valstr.split(delim)
> > +    return float(lat), float(lng)
> > +
> > +cpdef float compareLatLong(char *latlong1, char *latlong2, delim='**'):
>
> It would be more optimal to have a means of passing two different fields
> (lat and long) into a single comparator, but the implementation of the
> custom comparator appears to require a 1:1 comparator:field specification.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/open-city/dedupe/pull/92/files#r3253219>
> .
>



-- 
773.888.2718
2231 N. Monticello Ave
Chicago, IL 60647