summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Beschow <bbeschow@cs.tu-berlin.de>2016-08-14 12:45:42 (GMT)
committerBernhard Beschow <bbeschow@cs.tu-berlin.de>2016-08-14 12:51:37 (GMT)
commitb1edb9c3efccedf75820979e508ea6d609fd61d5 (patch)
tree7874c71ac270c6b6c18b06cf6b5c97192f8ca330
parent5d68df254ea95bbc09d2eea62bb2f1391870b7cb (diff)
group OpenStreetMap categories together
-rw-r--r--src/lib/marble/geodata/data/GeoDataFeature.cpp35
-rw-r--r--src/lib/marble/geodata/data/GeoDataFeature.h24
2 files changed, 33 insertions, 26 deletions
diff --git a/src/lib/marble/geodata/data/GeoDataFeature.cpp b/src/lib/marble/geodata/data/GeoDataFeature.cpp
index 196bd63..18566b4 100644
--- a/src/lib/marble/geodata/data/GeoDataFeature.cpp
+++ b/src/lib/marble/geodata/data/GeoDataFeature.cpp
@@ -443,6 +443,15 @@ void GeoDataFeature::setPopularity( qint64 popularity )
QString GeoDataFeature::categoryName() const
{
switch (d->m_visualCategory) {
+ case Valley: return QObject::tr("Valley");
+ case OtherTerrain: return QObject::tr("Terrain");
+ case Crater: return QObject::tr("Crater");
+ case Mare: return QObject::tr("Sea");
+ case MannedLandingSite: return QObject::tr("Manned Landing Site");
+ case RoboticRover: return QObject::tr("Robotic Rover");
+ case UnmannedSoftLandingSite: return QObject::tr("Unmanned Soft Landing Site");
+ case UnmannedHardLandingSite: return QObject::tr("Unmanned Hard Landing Site");
+ case Mons: return QObject::tr("Mountain");
case SmallCity: return QObject::tr("City");
case SmallCountyCapital: return QObject::tr("County Capital");
case SmallStateCapital: return QObject::tr("State Capital");
@@ -460,12 +469,6 @@ QString GeoDataFeature::categoryName() const
case LargeStateCapital: return QObject::tr("State Capital");
case LargeNationCapital: return QObject::tr("Nation Capital");
case Nation: return QObject::tr("Nation");
- case PlaceCity: return QObject::tr("City");
- case PlaceSuburb: return QObject::tr("Suburb");
- case PlaceHamlet: return QObject::tr("Hamlet");
- case PlaceLocality: return QObject::tr("Locality");
- case PlaceTown: return QObject::tr("Town");
- case PlaceVillage: return QObject::tr("Village");
case Mountain: return QObject::tr("Mountain");
case Volcano: return QObject::tr("Volcano");
case Continent: return QObject::tr("Continent");
@@ -480,6 +483,15 @@ QString GeoDataFeature::categoryName() const
case Coordinate: return QObject::tr("Coordinate");
case Folder: return QObject::tr("Folder");
case Bookmark: return QObject::tr("Bookmark");
+ case Satellite: return QObject::tr("Satellite");
+
+ // OpenStreetMap categories
+ case PlaceCity: return QObject::tr("City");
+ case PlaceSuburb: return QObject::tr("Suburb");
+ case PlaceHamlet: return QObject::tr("Hamlet");
+ case PlaceLocality: return QObject::tr("Locality");
+ case PlaceTown: return QObject::tr("Town");
+ case PlaceVillage: return QObject::tr("Village");
case NaturalWater: return QObject::tr("Water");
case NaturalReef: return QObject::tr("Reef");
case NaturalWood: return QObject::tr("Wood");
@@ -703,7 +715,6 @@ QString GeoDataFeature::categoryName() const
case RailwayMonorail: return QObject::tr("Monorail");
case RailwayFunicular: return QObject::tr("Funicular Railway");
case PowerTower: return QObject::tr("Power Tower");
- case Satellite: return QObject::tr("Satellite");
case AdminLevel1: return QObject::tr("Admin Boundary (Level 1)");
case AdminLevel2: return QObject::tr("Admin Boundary (Level 2)");
case AdminLevel3: return QObject::tr("Admin Boundary (Level 3)");
@@ -720,15 +731,7 @@ QString GeoDataFeature::categoryName() const
case UrbanArea: return QObject::tr("Urban Area");
case InternationalDateLine: return QObject::tr("International Date Line");
case Bathymetry: return QObject::tr("Bathymetry");
- case Valley: return QObject::tr("Valley");
- case OtherTerrain: return QObject::tr("Terrain");
- case Crater: return QObject::tr("Crater");
- case Mare: return QObject::tr("Sea");
- case MannedLandingSite: return QObject::tr("Manned Landing Site");
- case RoboticRover: return QObject::tr("Robotic Rover");
- case UnmannedSoftLandingSite: return QObject::tr("Unmanned Soft Landing Site");
- case UnmannedHardLandingSite: return QObject::tr("Unmanned Hard Landing Site");
- case Mons: return QObject::tr("Mountain");
+
case Default:
case Unknown:
case None:
diff --git a/src/lib/marble/geodata/data/GeoDataFeature.h b/src/lib/marble/geodata/data/GeoDataFeature.h
index 02dd26b..60f8d2c 100644
--- a/src/lib/marble/geodata/data/GeoDataFeature.h
+++ b/src/lib/marble/geodata/data/GeoDataFeature.h
@@ -69,7 +69,7 @@ class GEODATA_EXPORT GeoDataFeature : public GeoDataObject
/**
* @brief A categorization of a placemark as defined by ...FIXME.
* There is an additional osm tag mapping to GeoDataVisualCategory
- * in OsmPresetLibrary.cpp
+ * in OsmPlacemarkData
*/
enum GeoDataVisualCategory {
None,
@@ -96,13 +96,6 @@ class GEODATA_EXPORT GeoDataFeature : public GeoDataObject
LargeNationCapital,
Nation,
- PlaceCity,
- PlaceSuburb,
- PlaceHamlet,
- PlaceLocality,
- PlaceTown,
- PlaceVillage,
-
// Terrain
Mountain,
Volcano,
@@ -139,6 +132,19 @@ class GEODATA_EXPORT GeoDataFeature : public GeoDataObject
Folder,
Bookmark,
+ Satellite,
+
+ /*
+ * Start of OpenStreetMap categories
+ */
+
+ PlaceCity,
+ PlaceSuburb,
+ PlaceHamlet,
+ PlaceLocality,
+ PlaceTown,
+ PlaceVillage,
+
NaturalWater,
NaturalReef,
NaturalWood,
@@ -400,8 +406,6 @@ class GEODATA_EXPORT GeoDataFeature : public GeoDataObject
// OpenStreetMap category Power
PowerTower,
- Satellite,
-
//Admin level tags for depicting boundary
AdminLevel1,
AdminLevel2,