Every map object has a Feature Type, which is part of its Feature Info value, which is encoded as a 32-bit integer.
You don't have to work with actual numeric values. In style sheet expressions you can test the name, or (if the feature type is not a route type) the three-letter code. The following expressions mean the same:
'@feature_type = "uni"'
'@feature_type = "university"'
The feature types consist of the 32 route types 0...31, and other types, which are created from three-letter codes aaa ... zzz by encoding each letter in five bits, using the values 1...26 for the letters a...z. Here is a C++ function to create a feature code from three lower-case letters:
inline uint32_t constexpr FeatureTypeCode(int A,int B,int C) { return (char(A - 'a' + 1) << 10) | (char(B - 'a' + 1) << 5) | (char(C - 'a' + 1)); }
Here are the feature types that are currently defined and which may be used in expressions in makemap rules (.makemap files), and in style sheet conditions:
Motorway = 0, MotorwayLink = 1, TrunkRoad = 2, TrunkLink = 3, PrimaryRoad = 4, PrimaryLink = 5, SecondaryRoad = 6, SecondaryLink = 7, TertiaryRoad = 8, UnclassifiedRoad = 9, ResidentialRoad = 10, Track = 11, ServiceRoad = 12, PedestrianRoad = 13, VehicularFerry = 14, PassengerFerry = 15, LivingStreet = 16, Cycleway = 17, Path = 18, Footway = 19, Bridleway = 20, Steps = 21, OtherRoad = 22, UnpavedRoad = 23, Railway = 24, LightRail = 25, Subway = 26, AerialWay = 27, SkiDownhill = 28, SkiNordic = 29, Waterway = 30, UnknownRoute = 31, UnknownNonRoute = 32, AdminArea1 = FeatureTypeCode('a','a','a'), AdminArea2 = FeatureTypeCode('a','a','b'), AdminArea3 = FeatureTypeCode('a','a','c'), AdminArea4 = FeatureTypeCode('a','a','d'), AdminArea5 = FeatureTypeCode('a','a','e'), AdminArea6 = FeatureTypeCode('a','a','f'), AdminArea7 = FeatureTypeCode('a','a','g'), AdminArea8 = FeatureTypeCode('a','a','h'), AdminArea9 = FeatureTypeCode('a','a','i'), AdminArea10 = FeatureTypeCode('a','a','j'), Address = FeatureTypeCode('a','d','d'), Aerodrome = FeatureTypeCode('a','e','r'), Airport = FeatureTypeCode('a','i','r'), AirportGate = FeatureTypeCode('a','g','t'), AirportHoldingPosition = FeatureTypeCode('a','h','p'), Allotments = FeatureTypeCode('a','l','l'), AlpineHut = FeatureTypeCode('a','l','p'), AmbulanceStation = FeatureTypeCode('a','m','b'), Apron = FeatureTypeCode('a','p','r'), AerialWayPylon = FeatureTypeCode('a','p','y'), Artwork = FeatureTypeCode('a','r','t'), AerialWayStation = FeatureTypeCode('a','s','t'), AirTerminal = FeatureTypeCode('a','t','e'), Atm = FeatureTypeCode('a','t','m'), Attraction = FeatureTypeCode('a','t','t'), Bar = FeatureTypeCode('b','a','r'), Basin = FeatureTypeCode('b','a','s'), Bay = FeatureTypeCode('b','a','y'), Beach = FeatureTypeCode('b','e','a'), Beacon = FeatureTypeCode('b','e','c'), BedAndBreakfast = FeatureTypeCode('b','e','d'), Bench = FeatureTypeCode('b','e','n'), Bank = FeatureTypeCode('b','n','k'), Boatyard = FeatureTypeCode('b','o','a'), Borough = FeatureTypeCode('b','o','r'), Boundary = FeatureTypeCode('b','o','u'), BicycleParking = FeatureTypeCode('b','p','k'), BicycleRental = FeatureTypeCode('b','r','e'), BareRock = FeatureTypeCode('b','r','c'), Barracks = FeatureTypeCode('b','r','k'), BrownField = FeatureTypeCode('b','r','o'), BusStop = FeatureTypeCode('b','s','p'), BusStation = FeatureTypeCode('b','s','t'), BufferStop = FeatureTypeCode('b','u','f'), Building = FeatureTypeCode('b','u','i'), Bunker = FeatureTypeCode('b','u','n'), Cabin = FeatureTypeCode('c','a','b'), Cafe = FeatureTypeCode('c','a','f'), CampSite = FeatureTypeCode('c','a','m'), Canal = FeatureTypeCode('c','a','n'), CaveEntrance = FeatureTypeCode('c','a','v'), CableCar = FeatureTypeCode('c','c','r'), CableDistributionCabinet = FeatureTypeCode('c','d','c'), Cemetery = FeatureTypeCode('c','e','m'), ChairLift = FeatureTypeCode('c','h','a'), CheckPoint = FeatureTypeCode('c','h','e'), Chalet = FeatureTypeCode('c','h','l'), CivilBoundary = FeatureTypeCode('c','i','b'), Cinema = FeatureTypeCode('c','i','n'), City = FeatureTypeCode('c','i','t'), Cliff = FeatureTypeCode('c','l','f'), Clinic = FeatureTypeCode('c','l','i'), Commercial = FeatureTypeCode('c','m','r'), Coastline = FeatureTypeCode('c','o','a'), College = FeatureTypeCode('c','o','l'), Common = FeatureTypeCode('c','o','m'), Construction = FeatureTypeCode('c','n','s'), Conservation = FeatureTypeCode('c','n','v'), Continent = FeatureTypeCode('c','o','n'), County = FeatureTypeCode('c','o','u'), CarPark = FeatureTypeCode('c','p','k'), CarRental = FeatureTypeCode('c','r','e'), Crossing = FeatureTypeCode('c','r','o'), Country = FeatureTypeCode('c','r','y'), CarSharing = FeatureTypeCode('c','s','h'), CutLine = FeatureTypeCode('c','u','t'), CarWash = FeatureTypeCode('c','w','a'), CaravanSite = FeatureTypeCode('c','v','n'), CyclingRoute = FeatureTypeCode('c','y','r'), Dam = FeatureTypeCode('d','a','m'), DangerArea = FeatureTypeCode('d','a','n'), Dentist = FeatureTypeCode('d','e','n'), Disused = FeatureTypeCode('d','i','s'), Ditch = FeatureTypeCode('d','i','t'), Dock = FeatureTypeCode('d','o','c'), DogPark = FeatureTypeCode('d','o','g'), Drain = FeatureTypeCode('d','r','a'), DragLift = FeatureTypeCode('d','r','g'), Doctors = FeatureTypeCode('d','r','s'), District = FeatureTypeCode('d','s','t'), ElectricVehicleCharging = FeatureTypeCode('e','v','c'), Farm = FeatureTypeCode('f','a','r'), FarmYard = FeatureTypeCode('f','a','y'), Fell = FeatureTypeCode('f','e','l'), FerryTerminal = FeatureTypeCode('f','e','t'), FastFood = FeatureTypeCode('f','f','d'), FireExtinguisher = FeatureTypeCode('f','i','e'), FireFlapper = FeatureTypeCode('f','i','f'), FireHose = FeatureTypeCode('f','i','h'), FireStation = FeatureTypeCode('f','i','s'), FitnessStation = FeatureTypeCode('f','i','t'), FireHydrant = FeatureTypeCode('f','i','y'), Forestry = FeatureTypeCode('f','o','r'), Fishing = FeatureTypeCode('f','s','h'), Fuel = FeatureTypeCode('f','u','e'), Funicular = FeatureTypeCode('f','u','n'), Garages = FeatureTypeCode('g','a','r'), Gate = FeatureTypeCode('g','a','t'), Garden = FeatureTypeCode('g','d','n'), Generator = FeatureTypeCode('g','e','n'), GreenHouse = FeatureTypeCode('g','h','o'), Glacier = FeatureTypeCode('g','l','a'), GolfCourse = FeatureTypeCode('g','o','l'), Gondola = FeatureTypeCode('g','o','n'), GoodsAerialWay = FeatureTypeCode('g','o','o'), Grass = FeatureTypeCode('g','r','a'), GreenField = FeatureTypeCode('g','r','e'), GritBin = FeatureTypeCode('g','r','b'), GraveYard = FeatureTypeCode('g','r','y'), GuestHouse = FeatureTypeCode('g','u','e'), Halt = FeatureTypeCode('h','a','l'), Hamlet = FeatureTypeCode('h','a','m'), Hangar = FeatureTypeCode('h','a','n'), Heath = FeatureTypeCode('h','e','a'), Helipad = FeatureTypeCode('h','e','l'), RailwayHalt = FeatureTypeCode('h','l','t'), HikingRoute = FeatureTypeCode('h','i','k'), HorseRiding = FeatureTypeCode('h','o','r'), Hospital = FeatureTypeCode('h','o','s'), Hotel = FeatureTypeCode('h','o','t'), HorseRidingRoute = FeatureTypeCode('h','r','r'), Hostel = FeatureTypeCode('h','s','t'), IceRink = FeatureTypeCode('i','c','e'), Industrial = FeatureTypeCode('i','n','d'), Information = FeatureTypeCode('i','n','f'), Island = FeatureTypeCode('i','s','l'), IsolatedDwelling = FeatureTypeCode('i','s','o'), Junction = FeatureTypeCode('j','c','t'), Kindergarten = FeatureTypeCode('k','i','n'), LandFill = FeatureTypeCode('l','a','n'), Land = FeatureTypeCode('l','n','d'), LevelCrossing = FeatureTypeCode('l','e','v'), Library = FeatureTypeCode('l','i','b'), Locality = FeatureTypeCode('l','o','c'), LockGate = FeatureTypeCode('l','o','k'), MaritimeBoundary = FeatureTypeCode('m','a','b'), Mall = FeatureTypeCode('m','a','l'), Marsh = FeatureTypeCode('m','a','r'), Meadow = FeatureTypeCode('m','e','a'), Military = FeatureTypeCode('m','i','l'), Marina = FeatureTypeCode('m','n','a'), Motel = FeatureTypeCode('m','o','t'), MinorPowerLine = FeatureTypeCode('m','p','l'), MiniatureGolf = FeatureTypeCode('m','r','g'), MiniatureRailway = FeatureTypeCode('m','r','y'), Mud = FeatureTypeCode('m','u','d'), Municipality = FeatureTypeCode('m','u','n'), Museum = FeatureTypeCode('m','u','s'), NatureReserve = FeatureTypeCode('n','a','t'), NationalPark = FeatureTypeCode('n','a','p'), NavalBase = FeatureTypeCode('n','a','v'), Neighborhood = FeatureTypeCode('n','e','i'), NursingHome = FeatureTypeCode('n','u','r'), Orchard = FeatureTypeCode('o','r','c'), PrecisionApproachPathIndicator = FeatureTypeCode('p','a','p'), Park = FeatureTypeCode('p','a','r'), PublicBuilding = FeatureTypeCode('p','b','u'), PostBox = FeatureTypeCode('p','b','x'), PostCode = FeatureTypeCode('p','c','o'), PicnicTable = FeatureTypeCode('p','c','t'), Peak = FeatureTypeCode('p','e','a'), Pharmacy = FeatureTypeCode('p','h','a'), Phone = FeatureTypeCode('p','h','o'), PicnicSite = FeatureTypeCode('p','i','c'), Pier = FeatureTypeCode('p','i','e'), Pipeline = FeatureTypeCode('p','i','p'), ParkingEntrance = FeatureTypeCode('p','k','e'), Parking = FeatureTypeCode('p','k','g'), ParkingSpace = FeatureTypeCode('p','k','s'), PlantNursery = FeatureTypeCode('p','l','a'), Platform = FeatureTypeCode('p','l','f'), PlaceOfWorship = FeatureTypeCode('p','l','w'), Playground = FeatureTypeCode('p','l','y'), PostOffice = FeatureTypeCode('p','o','f'), Police = FeatureTypeCode('p','o','l'), Position = FeatureTypeCode('p','o','s'), ProtectedArea = FeatureTypeCode('p','r','a'), PowerSubStation = FeatureTypeCode('p','s','s'), Pub = FeatureTypeCode('p','u','b'), PowerLine = FeatureTypeCode('p','w','l'), PowerStation = FeatureTypeCode('p','w','s'), Quarry = FeatureTypeCode('q','a','r'), Quarter = FeatureTypeCode('q','r','t'), Range = FeatureTypeCode('r','a','n'), Rapids = FeatureTypeCode('r','a','p'), Recycling = FeatureTypeCode('r','c','y'), RecreationGround = FeatureTypeCode('r','e','c'), Reef = FeatureTypeCode('r','e','e'), Region = FeatureTypeCode('r','e','g'), Retail = FeatureTypeCode('r','e','t'), Ridge = FeatureTypeCode('r','i','j'), River = FeatureTypeCode('r','i','v'), Rock = FeatureTypeCode('r','o','c'), RoundHouse = FeatureTypeCode('r','o','u'), ResidentialArea = FeatureTypeCode('r','s','d'), Restaurant = FeatureTypeCode('r','s','t'), Reservoir = FeatureTypeCode('r','s','v'), Runway = FeatureTypeCode('r','u','n'), Route = FeatureTypeCode('r','u','t'), RiverBank = FeatureTypeCode('r','v','b'), SaltPond = FeatureTypeCode('s','a','l'), Sand = FeatureTypeCode('s','a','n'), Sauna = FeatureTypeCode('s','a','u'), School = FeatureTypeCode('s','c','h'), Scree = FeatureTypeCode('s','c','r'), Scrub = FeatureTypeCode('s','c','b'), Sea = FeatureTypeCode('s','e','a'), StateEmergencyServiceStation = FeatureTypeCode('s','e','s'), Shop = FeatureTypeCode('s','h','o'), SkiRoute = FeatureTypeCode('s','k','r'), Slipway = FeatureTypeCode('s','l','i'), SportsCenter = FeatureTypeCode('s','p','o'), SportsPitch = FeatureTypeCode('s','p','p'), Spring = FeatureTypeCode('s','p','r'), SportsTrack = FeatureTypeCode('s','p','t'), State = FeatureTypeCode('s','t','a'), Stadium = FeatureTypeCode('s','t','m'), RailwayStation = FeatureTypeCode('s','t','n'), Station = FeatureTypeCode('s','t','n'), // deliberate duplicate Stone = FeatureTypeCode('s','t','o'), StopPosition = FeatureTypeCode('s','t','p'), Stream = FeatureTypeCode('s','t','r'), Strait = FeatureTypeCode('s','t','t'), Suburb = FeatureTypeCode('s','u','b'), Supermarket = FeatureTypeCode('s','u','p'), SurveyPoint = FeatureTypeCode('s','u','r'), SubwayEntrance = FeatureTypeCode('s','w','e'), SwimmingPool = FeatureTypeCode('s','w','i'), Tank = FeatureTypeCode('t','a','n'), Taxi = FeatureTypeCode('t','a','x'), Theatre = FeatureTypeCode('t','h','e'), ThemePark = FeatureTypeCode('t','h','p'), Toilet = FeatureTypeCode('t','o','i'), Town = FeatureTypeCode('t','o','w'), TurningCircle = FeatureTypeCode('t','c','i'), TurningPoint = FeatureTypeCode('t','p','t'), Tram = FeatureTypeCode('t','r','a'), Tree = FeatureTypeCode('t','r','e'), TrafficSignals = FeatureTypeCode('t','r','f'), TrackPoint = FeatureTypeCode('t','r','p'), TreeRow = FeatureTypeCode('t','r','r'), TramStop = FeatureTypeCode('t','r','s'), TurnTable = FeatureTypeCode('t','u','r'), Tower = FeatureTypeCode('t','w','r'), Taxiway = FeatureTypeCode('t','w','y'), University = FeatureTypeCode('u','n','i'), VisualApproachSlopeIndicator = FeatureTypeCode('v','a','s'), VillageGreen = FeatureTypeCode('v','i','g'), Village = FeatureTypeCode('v','i','l'), Vineyard = FeatureTypeCode('v','i','n'), ViewPoint = FeatureTypeCode('v','i','w'), Volcano = FeatureTypeCode('v','o','l'), Waterfall = FeatureTypeCode('w','a','f'), WaterPark = FeatureTypeCode('w','a','p'), Water = FeatureTypeCode('w','a','t'), Weir = FeatureTypeCode('w','e','r'), Wetland = FeatureTypeCode('w','e','t'), Windsock = FeatureTypeCode('w','i','s'), WalkingRoute = FeatureTypeCode('w','l','k'), Wood = FeatureTypeCode('w','o','o'), Works = FeatureTypeCode('w','o','r'), Waypoint = FeatureTypeCode('w','p','t'), WaterTower = FeatureTypeCode('w','t','t'), WaterWell = FeatureTypeCode('w','t','w'), Zoo = FeatureTypeCode('z','o','o'), // legacy types for backward compatibility LegacyBridleway = FeatureTypeCode('b','r','i'), LegacyCycleway = FeatureTypeCode('c','y','c'), LegacyFootway = FeatureTypeCode('f','o','o'), LegacyLightRail = FeatureTypeCode('l','i','r'), LegacyMonorail = FeatureTypeCode('m','o','n'), LegacyNarrowGauge = FeatureTypeCode('n','a','r'), LegacyPreservedRailway = FeatureTypeCode('p','r','y'), LegacyRailway = FeatureTypeCode('r','l','y'), LegacySteps = FeatureTypeCode('s','t','e'), LegacySubway = FeatureTypeCode('s','w','y'), LegacyTram = FeatureTypeCode('t','r','a'), Invalid = INT16_MAX