Commit graph

5 commits

Author SHA1 Message Date
Dirk Hohndel
e82f8ea565 Geo taxonomy: correctly store / update the categories
Don't throw away data unless new data has been received. And don't store
multiple copies of the same category. And most importantly, never write
past the end of the array.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-13 15:21:30 -07:00
Dirk Hohndel
3478943f2f Fix memory handling for taxonomy data
The way we freed things and cleared out the variables potentially left
dangling data behind and could end up calling free on garbage data,
leading to random crashes.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-13 07:09:55 -07:00
Dirk Hohndel
bda482a30a Geo taxonomy: add higher level notion of city
This renames the local name for the location as town and adds the concept
of a city as the level 3 admin category. In some regions (e.g. at times in
Italy) the local hamlet name is shown as toponymName but the name of the
actual city is given as adminName3.

With this change "city" will always reflect our best guess: adminName3 if
it exists, otherwise the toponymName. Whereas "town" is always the
toponymName.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-10 09:51:50 -07:00
Dirk Hohndel
bc8c54f1ee Rename enum values for taxonomy
This avoids confusion and namespace collisions.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-02 10:22:31 -07:00
Dirk Hohndel
36657c019b Geo taxonomy: create some data structures and helper functions
This is designed to store taxonomy information for dive sites, including
information where the data came from.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-01 12:25:47 -07:00