migurski / Dymo

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

allow floats in columns other than lat/long (not force ints) #3

Closed nvkelso closed 13 years ago

nvkelso commented 13 years ago

When I have floats in any column besides the latitude and longitude columns, I get the following error trace. Changing the input value to an int (rounding to nearest whole number) prevents this error. But it'd be nice to keep floats in my input file, please. Likely an issue now we're guessing if a column is a String or Number for carrying the attributes over to the GeoJSON output.

python dymo/dymo-label.py -z 4 --steps 2000 --max-temp 120 --min-temp 0.0067 geojson/z4-labels.json geojson/z4-points.json dymo-labels-z4.txt.gz Traceback (most recent call last): File "dymo/dymo-label.py", line 69, in for place in load_places(input_files, options.zoom): File "/home/redacted/basemap/labels/dymo/Dymo/init.py", line 97, in load_places if key not in ('latitude', 'longitude')])

ValueError: invalid literal for int() with base 10: '6320.63'