anchor.diff:              end
       end.
   
  +
  +% Gives a nice base 10 representation of a float
  +format_float(Val) ->
  +    % Get the whole number part
  +    WholePart = trunc(Val),
  +
  +    % Get the sub part with milliseconds
  +    SubPart = trunc(Val * 1000) rem 1000,
  +
  +    % Convert to iolist
  +    [integer_to_list(WholePart), ".", integer_to_list(SubPart)].
  +
  
positive.code:     DistL = binary_to_list(Dist),
  
      % Partition into the digits and units
      {DistDig, Unit} = lists:partition(fun(Char) ->
          Char >= "0" orelse Char =< "9" orelse Char == "-" orelse Char == "."
      end, DistL),
  
      % Convert the distance to a float
  
negative.code: association_line(ID, Geo) ->
      #geometry{mbr=[{Lat, _}, {Lng, _}]} = Geo,
      IDs = integer_to_list(ID),
      LatS = format_float(Lat),
      LngS = format_float(Lng),
      [<<"GID=">>, IDs, ?SPACE, <<"lat=">>, LatS, ?SPACE, <<"lng=">>, LngS].
  
  
  