migurski / Dymo

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

add flag for sorting on arbitrary ordered list of attribute fields #5

Open nvkelso opened 12 years ago

nvkelso commented 12 years ago

{field1 ASC/DESC, field2 ASC/DESC, field3 ASC/DESC}

Where default behavior is to look for {population DESC} only

Extra function allows sorting, examples: first on zoom, then population or (in general) first on zoom, then city rank (functional type), then population (mid zooms) first on zoom, mega city, then world city, then population (zooms 1, 2, 3, in Natural Earth)

nvkelso commented 12 years ago

The order is important as labels are drawn 1st come first serve in the downstream render. The more important features should be first in the file, so they are insured label placement. If there is room, other labels of less importance fill in around.

nvkelso commented 12 years ago

Partly addressed in: https://github.com/migurski/Dymo/commit/1126bf8c5dd63a27da26efcae9ae4ab4a6cb26bf