⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 garmintypes.cpp

📁 garmin 协议处理范例: 处理了 0183协议 处理了 gps的专有格式等
💻 CPP
📖 第 1 页 / 共 3 页
字号:
	{0x2f, 0x12, 0,    "Communication service",          & g_hcurTelephone},
	{0x2f, 0x13, 0,    "Repair service",                 & g_hcurService},
	{0x2f, 0x14, 0,    "Social service",                 & g_hcurService},
	{0x2f, 0x15, 0,    "Public utilities",               & g_hcurService},

	{0x30, 0x00, 0,    "Emergency/Governmental",         & g_hcurPublic},
	{0x30, 0x01, 0,    "Police station",                 & g_hcurPolice},
	{0x30, 0x02, 0,    "Hospital",                       & g_hcurHospital},
	{0x30, 0x03, 0,    "City hall",                      & g_hcurPublic},
	{0x30, 0x04, 0,    "Court house",                    & g_hcurPublic},
	{0x30, 0x05, 0,    "Community center",               & g_hcurPublic},
	{0x30, 0x06, 0,    "Border crossing",                & g_hcurPublic},

	{0x40, 0x00, 0x3f, "Golf",                           & g_hcurGolf},
	{0x41, 0x00, 0x3f, "Fishing spot",                   & g_hcurFish},
	{0x42, 0x00, 0x3f, "Wreck",                          & g_hcurWreck},
	{0x43, 0x00, 0x3f, "Marina",                         & g_hcurWarf},
	{0x44, 0x00, 0x3f, "Gas station",                    & g_hcurPetrol},
	{0x45, 0x00, 0x3f, "Restaurant",                     & g_hcurDining},
	{0x46, 0x00, 0x3f, "Bar",                            & g_hcurBar},
	{0x47, 0x00, 0x3f, "Boat ramp",                      & g_hcurBoatRamp},
	{0x48, 0x00, 0x3f, "Camping",                        & g_hcurCamping},
	{0x49, 0x00, 0x3f, "Park",                           & g_hcurPark},
	{0x4a, 0x00, 0x3f, "Picnic area",                    & g_hcurPicnic},
	{0x4b, 0x00, 0x3f, "First aid station",              & g_hcurHospital},
	{0x4c, 0x00, 0x3f, "Information",                    & g_hcurInformation},
	{0x4d, 0x00, 0x3f, "Parking",                        & g_hcurParking},
	{0x4e, 0x00, 0x3f, "Restroom",                       & g_hcurRestroom},
	{0x4f, 0x00, 0x3f, "Shower",                         & g_hcurShower},
	{0x50, 0x00, 0x3f, "Drinking water",                 & g_hcurDrinkingWater},
	{0x51, 0x00, 0x3f, "Telephone",                      & g_hcurTelephone},
	{0x52, 0x00, 0x3f, "Scenic area",                    & g_hcurScenic},
	{0x53, 0x00, 0x3f, "Skiing",                         & g_hcurSkiing},
	{0x54, 0x00, 0x3f, "Swimming area",                  & g_hcurSwimming},
	{0x55, 0x00, 0x3f, "Dam",                            & g_hcurDam},
	{0x56, 0x00, 0x3f, "Controlled area",                & g_hcurControlled},
	{0x57, 0x00, 0x3f, "Danger area",                    & g_hcurDanger},
	{0x58, 0x00, 0x3f, "Restricted area",                & g_hcurRestricted},

	{0x59, 0x00, 0,    "Generic airport",                & g_hcurAirport},
	{0x59, 0x01, 0,    "Large airport",                  & g_hcurAirportLarge},
	{0x59, 0x02, 0,    "Medium airport",                 & g_hcurAirport},
	{0x59, 0x03, 0,    "Small airport",                  & g_hcurAirport},
	{0x59, 0x04, 0,    "Heliport",                       & g_hcurHeliport},
	{0x59, 0x05, 0x3f, "Airport",                        & g_hcurAirport},

	{0x5a, 0x00, 0x3f, "Mile marker",                    & g_hcurLocale},
	{0x5b, 0x00, 0x3f, "Bell",                           & g_hcurBell},
	{0x5c, 0x00, 0x3f, "Diving area",                    & g_hcurDiving},
	{0x5d, 0x00, 0,    "Daymark, green square",          & g_hcurBeaconSquare},
	{0x5e, 0x00, 0,    "Daymark, red triangle",          & g_hcurBeaconTriangle},
	{0x60, 0x00, 0x3f, "Horn",                           & g_hcurHorn},
	{0x61, 0x00, 0x3f, "House",                          & g_hcurBuilding},

	{0x62, 0x00, 0x3f, "Depth spot",                     & g_hcurTop,        & g_DepthSpotLabel},
	{0x63, 0x00, 0x3f, "Elevation spot",                 & g_hcurTop,        & g_ElevSpotLabel},

	{0x64, 0x00, 0,    "Man-made place",                 & g_hcurManMade,    & g_FeatureLabel},
	{0x64, 0x01, 0,    "Bridge",                         & g_hcurBridge,     & g_FeatureLabel},
	{0x64, 0x02, 0,    "Building",                       & g_hcurBuilding,   & g_FeatureLabel},
	{0x64, 0x03, 0,    "Cemetery",                       & g_hcurCemetery,   & g_FeatureLabel},
	{0x64, 0x04, 0,    "Church/mosque/etc",              & g_hcurChurch,     & g_FeatureLabel},
	{0x64, 0x05, 0,    "Civil bulding",                  & g_hcurPublic,     & g_FeatureLabel},
	{0x64, 0x06, 0,    "Crossing",                       & g_hcurPassing,    & g_FeatureLabel},
	{0x64, 0x07, 0,    "Dam",                            & g_hcurDam,        & g_FeatureLabel},
	{0x64, 0x08, 0,    "Hospital",                       & g_hcurHospital,   & g_FeatureLabel},
	{0x64, 0x09, 0,    "Levee",                          & g_hcurDam,        & g_FeatureLabel},
	{0x64, 0x0a, 0,    "Locale",                         & g_hcurLocale,     & g_FeatureLabel},
	{0x64, 0x0b, 0,    "Military",                       & g_hcurMilitary,   & g_FeatureLabel},
	{0x64, 0x0c, 0,    "Mine",                           & g_hcurMine,       & g_FeatureLabel},
	{0x64, 0x0d, 0,    "Oil field",                      & g_hcurOil,        & g_FeatureLabel},
	{0x64, 0x0e, 0,    "Park",                           & g_hcurPark,       & g_FeatureLabel},
	{0x64, 0x0f, 0,    "Post office",                    & g_hcurPostOffice, & g_FeatureLabel},
	{0x64, 0x10, 0,    "School",                         & g_hcurSchool,     & g_FeatureLabel},
	{0x64, 0x11, 0,    "Tower",                          & g_hcurTower,      & g_FeatureLabel},
	{0x64, 0x12, 0,    "Trailhead",                      & g_hcurTrailHead,  & g_FeatureLabel},
	{0x64, 0x13, 0,    "Tunnel",                         & g_hcurTunnel,     & g_FeatureLabel},
	{0x64, 0x14, 0,    "Well",                           & g_hcurDrinkingWater, & g_FeatureLabel},
	{0x64, 0x15, 0,    "Historical (ghost) town",        & g_hcurGhostTown,  & g_FeatureLabel},
	{0x64, 0x16, 0,    "Subdivision of housing",         & g_hcurGhostTown,  & g_FeatureLabel},

	{0x65, 0x00, 0,    "Water feature",                  & g_hcurWater,      & g_FeatureLabel},
	{0x65, 0x01, 0,    "Arroyo",                         & g_hcurArroyo,     & g_FeatureLabel},
	{0x65, 0x02, 0,    "Sand bar",                       & g_hcurWater,      & g_FeatureLabel},
	{0x65, 0x03, 0,    "Bay",                            & g_hcurWater,      & g_FeatureLabel},
	{0x65, 0x04, 0,    "Bend",                           & g_hcurWater,      & g_FeatureLabel},
	{0x65, 0x05, 0,    "Canal",                          & g_hcurWater,      & g_FeatureLabel},
	{0x65, 0x06, 0,    "Channel",                        & g_hcurWater,      & g_FeatureLabel},
	{0x65, 0x07, 0,    "Cove",                           & g_hcurWater,      & g_FeatureLabel},
	{0x65, 0x08, 0,    "Falls",                          & g_hcurFalls,      & g_FeatureLabel},
	{0x65, 0x09, 0,    "Geyser",                         & g_hcurGeyser,     & g_FeatureLabel},
	{0x65, 0x0a, 0,    "Glacier",                        & g_hcurWater,      & g_FeatureLabel},
	{0x65, 0x0b, 0,    "Harbor",                         & g_hcurWarf,       & g_FeatureLabel},
	{0x65, 0x0c, 0,    "Island",                         & g_hcurIsland,     & g_FeatureLabel},
	{0x65, 0x0d, 0,    "Lake",                           & g_hcurReservoir,  & g_FeatureLabel},
	{0x65, 0x0e, 0,    "Rapids",                         & g_hcurFalls,      & g_FeatureLabel},
	{0x65, 0x0f, 0,    "Reservoir",                      & g_hcurReservoir,  & g_FeatureLabel},
	{0x65, 0x10, 0,    "Sea",                            & g_hcurReservoir,  & g_FeatureLabel},
	{0x65, 0x11, 0,    "Spring",                         & g_hcurSpring,     & g_FeatureLabel},
	{0x65, 0x12, 0,    "Stream",                         & g_hcurStream,     & g_FeatureLabel},
	{0x65, 0x13, 0,    "Swamp",                          & g_hcurSwamp,      & g_FeatureLabel},

	{0x66, 0x00, 0,    "Land feature",                   & g_hcurLand,       & g_FeatureLabel},
	{0x66, 0x01, 0,    "Arch",                           & g_hcurArch,       & g_FeatureLabel},
	{0x66, 0x02, 0,    "Area",                           & g_hcurLand,       & g_FeatureLabel},
	{0x66, 0x03, 0,    "Basin",                          & g_hcurReservoir,  & g_FeatureLabel},
	{0x66, 0x04, 0,    "Beach",                          & g_hcurLand,       & g_FeatureLabel},
	{0x66, 0x05, 0,    "Bench",                          & g_hcurLand,       & g_FeatureLabel},
	{0x66, 0x06, 0,    "Cape",                           & g_hcurLand,       & g_FeatureLabel},
	{0x66, 0x07, 0,    "Cliff",                          & g_hcurCliff,      & g_FeatureLabel},
	{0x66, 0x08, 0,    "Crater",                         & g_hcurCrater,     & g_FeatureLabel},
	{0x66, 0x09, 0,    "Flat",                           & g_hcurLand,       & g_FeatureLabel},
	{0x66, 0x0a, 0,    "Forest",                         & g_hcurTree,       & g_FeatureLabel},
	{0x66, 0x0b, 0,    "Gap",                            & g_hcurLand,       & g_FeatureLabel},
	{0x66, 0x0c, 0,    "Gut",                            & g_hcurLand,       & g_FeatureLabel},
	{0x66, 0x0d, 0,    "Isthmus",                        & g_hcurLand,       & g_FeatureLabel},
	{0x66, 0x0e, 0,    "Lava",                           & g_hcurLava,       & g_FeatureLabel},
	{0x66, 0x0f, 0,    "Pillar",                         & g_hcurPillar,     & g_FeatureLabel},
	{0x66, 0x10, 0,    "Plain",                          & g_hcurLand,       & g_FeatureLabel},
	{0x66, 0x11, 0,    "Range",                          & g_hcurLand,       & g_FeatureLabel},
	{0x66, 0x12, 0,    "Reserve",                        & g_hcurLand,       & g_FeatureLabel},
	{0x66, 0x13, 0,    "Ridge",                          & g_hcurRock,       & g_FeatureLabel},
	{0x66, 0x14, 0,    "Rock",                           & g_hcurRock,       & g_FeatureLabel},
	{0x66, 0x15, 0,    "Slope",                          & g_hcurLand,       & g_FeatureLabel},
	{0x66, 0x16, 0,    "Summit",                         & g_hcurHill,       & g_FeatureLabel},
	{0x66, 0x17, 0,    "Valley",                         & g_hcurLand,       & g_FeatureLabel},
	{0x66, 0x18, 0,    "Wooded area",                    & g_hcurTree,       & g_FeatureLabel},
};

static POI_desc_t g_MarinePOIs [] = {
	{0x16, 0x00, 0,    "Navaid",                         & g_hcurNavaid},
	{0x16, 0x01, 0,    "Fog horn",                       & g_hcurFogHorn},
	{0x16, 0x02, 0,    "Radio beacon",                   & g_hcurRadioBeacon},
	{0x16, 0x03, 0,    "Racon",                          & g_hcurRacon},
	{0x16, 0x04, 0,    "Daybeacon, red triangle",        & g_hcurBeaconTriangle},
	{0x16, 0x05, 0,    "Daybeacon, green square",        & g_hcurBeaconSquare},
	{0x16, 0x06, 0,    "Daybeacon, white diamond",       & g_hcurBeaconDiamond},
	{0x16, 0x07, 0,    "Unlit navaid, white",            & g_hcurUNavaidWhite},
	{0x16, 0x08, 0,    "Unlit navaid, red",              & g_hcurUNavaidRed},
	{0x16, 0x09, 0,    "Unlit navaid, green",            & g_hcurUNavaidGreen},
	{0x16, 0x0a, 0,    "Unlit navaid, black",            & g_hcurUNavaidBlack},
	{0x16, 0x0b, 0,    "Unlit navaid, yellow/amber",     & g_hcurUNavaidYellow},
	{0x16, 0x0c, 0,    "Unlit navaid, orange",           & g_hcurUNavaidOrange},
	{0x16, 0x0d, 0,    "Unlit navaid, multi colored",    & g_hcurUNavaidMulti},
	{0x16, 0x0e, 0,    "Navaid, unknown",                & g_hcurNavaid},
	{0x16, 0x0f, 0,    "Navaid, white",                  & g_hcurNavaidWhite},
	{0x16, 0x10, 0,    "Navaid, red",                    & g_hcurNavaidRed},
	{0x16, 0x11, 0,    "Navaid, green",                  & g_hcurNavaidGreen},
	{0x16, 0x12, 0,    "Navaid, yellow/amber",           & g_hcurNavaidYellow},
	{0x16, 0x13, 0,    "Navaid, orange",                 & g_hcurNavaidOrange},
	{0x16, 0x14, 0,    "Navaid, violet",                 & g_hcurNavaidViolet},
	{0x16, 0x15, 0,    "Navaid, blue",                   & g_hcurNavaidBlue},
	{0x16, 0x16, 0,    "Navaid, multi colored",          & g_hcurNavaidMulti},
};

struct polyline_desc_t {
	BYTE btCode;

	char * strTypeName;

		// The pens to draw polylines .
	HPEN *         phPen;
		// The pen for second pass. NOTE: NULL means not to draw 2nd pass.
	HPEN *         phPen2;

	label_desc_t * pLabelDesc;
};

static polyline_desc_t g_Polylines [] = {
	// appears in some MapDekode maps
//	{0x00, "Road ???",                   & g_hpenThinRoad,     NULL,              & g_RoadLabel},

	{0x01, "Major highway",              & g_hpenHighway1,     & g_hpenHighway2,  & g_RoadLabel},
	{0x02, "Principal highway",          & g_hpenEnhancedRoad, NULL,              & g_RoadLabel},
	{0x03, "Other highway road",         & g_hpenThinRoad,     NULL,              & g_RoadLabel},
	{0x04, "Arterial road",              & g_hpenThickRoad,    NULL,              & g_RoadLabel},
	{0x05, "Collector road",             & g_hpenThickRoad,    NULL,              & g_RoadLabel},
	{0x06, "Residential street",         & g_hpenThinRoad,     NULL,              & g_RoadLabel},
	{0x07, "Alleyway/private driveway",  & g_hpenThinRoad,     NULL,              & g_RoadLabel},
	{0x08, "Highway ramp, low-speed",    & g_hpenThinRoad,     NULL,              & g_RoadLabel},
	{0x09, "Highway ramp, high-speed",   & g_hpenThinRoad,     NULL,              & g_RoadLabel},
	{0x0a, "Unpaved road",               & g_hpenGroundRoad,   NULL,              & g_RoadLabel},
	{0x0b, "Major highway connector",    & g_hpenEnhancedRoad, NULL,              & g_RoadLabel},
	{0x0c, "Roundabout",                 & g_hpenThinRoad,     NULL,              & g_RoadLabel},

	{0x14, "Railroad",                   & g_hpenRailroad1,    & g_hpenRailroad2, & g_DefLabel},
	{0x15, "Shoreline of water body",    & g_hpenCoast,        NULL,              & g_DefLabel},
	{0x16, "Walkway/trail",              & g_hpenGroundRoad,   NULL,              & g_DefLabel},

	{0x18, "Stream",                     & g_hpenWater,        NULL,              & g_LineRiverLabel},

	{0x19, "Time-zone",                  & g_hpenUnknown,      NULL,              & g_DefLabel},
	{0x1a, "Water or rail ferry",        & g_hpenGroundRoad,   NULL,              & g_DefLabel},
	{0x1b, "Water or rail ferry",        & g_hpenGroundRoad,   NULL,              & g_DefLabel},

	{0x1c, "State/province boundary",    & g_hpenBoundary,     NULL,              & g_BoundaryLabel},
	{0x1d, "County/parish boundary",     & g_hpenBoundary,     NULL,              & g_BoundaryLabel},
	{0x1e, "International boundary",     & g_hpenBoundary,     NULL,              & g_BoundaryLabel},

	{0x1f, "River",                      & g_hpenWater,        NULL,              & g_LineRiverLabel},

	{0x20, "Minor land contour (1/10)",  & g_hpenHeight1,      NULL,              & g_ContourLabel},
	{0x21, "Interm. land contour (1/2)", & g_hpenHeight2,      NULL,              & g_ContourLabel},
	{0x22, "Major land contour (1/1)",   & g_hpenHeight3,      NULL,              & g_ContourLabel},

	{0x23, "Minor depth contour (1/10)", & g_hpenDepth1,       NULL,              & g_DepthLabel},
	{0x24, "Interm. depth contour (1/2)", & g_hpenDepth2,      NULL,              & g_DepthLabel},
	{0x25, "Major depth contour (1/1)",  & g_hpenDepth3,       NULL,              & g_DepthLabel},

	{0x26, "Intermittent stream/ditch",  & g_hpenDryWater,     NULL,              & g_LineRiverLabel},

	{0x27, "Airport runway centerline",  & g_hpenHighway1,     & g_hpenHighway2,  & g_RoadLabel},

	{0x28, "Oil or water pipeline",      & g_hpenUnknown,      NULL,              & g_DefLabel},
	{0x29, "Power line",                 & g_hpenPowerLine,    NULL,              & g_DefLabel},

	{0x2a, "Marine boundary (no line)",  & g_hpenUnknown,      NULL,              & g_DefLabel},
	{0x2b, "Marine hazard (no line)",    & g_hpenUnknown,      NULL,              & g_DefLabel},
};

struct polygon_desc_t {
	BYTE btCode;

	char * strTypeName;

		// The brush to fill polygons.
	HBRUSH *       phBrush;
		// The pen to draw border.
	HPEN *         phPen;

	label_desc_t * pLabelDesc;
};

static polygon_desc_t g_Polygons [] = {
	// appears in some MPC maps
//	{0x00, "???",                    & g_hbrUnknown,       & g_hpenUnknown,   },

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -