Repository: Kitware/kwiver (language: python)

Issue:
Make vital tag traits dynamic
This rather large pull request implements a change - changing vital tag traits access from compile-time to runtime - and then fixes / updates everywhere in the code that breaks as a result. Previously, the traits of vital's metadata tags (name, data type, description, etc) were defined in one giant macro. This was used to instantiate one templated class for each tag, which could only be accessed via `Tag` template parameter. This meant that these traits could only be directly accessed when the tag was known at compile time. A similar strategy was deployed for the `metadata_item` class, resulting in only being able to add a tag to a metadata collection when the identity of the tag was known at compile time. This sort of interface is difficult to work with and difficult to maintain, resulting in a lot of cumbersome, inelegant code (on net 600 lines removed here!).

Since the existing `vital_meta_trait` class was only accessible via template, there was a helper `metadata_trait` class which provided dynamic lookup capabilities. However, this class was instantiated in _n_ different places, incurring runtime costs as it built _n_ separate identical lookup tables. This whole system has been replaced with a better traits interface which only instantiates the traits once and allows lookup from anywhere. We can remove the 100+ separate `typed_metadata` classes and provide better functionality, now allowing dynamic insertion of runtime-determined tags using the new `metadata::add_any` overload.

There is still one ugly / hard-to-maintain code pattern left here, which the new code did have to add a few more instances of:
```
if( type == typeid( bool );
else if( type == typeid( int ) );
...
```
However, this will (hopefully) eventually be deleted. The `vital` metadata system already encourages/enforces/assumes use of only a handful of small types, which as of right now are all separately listed in the pattern above. Given the fact that these constraints are already being put on the data type, a `variant` is a much better pick for a metadata value representation than `any`, and will allow for more elegant treatment of these types. Though we don't have C++17 yet, we do have MPark's C++11 STL-compliant `variant` implementation already copy-pasted in KWIVER. If this PR goes through, using `variant` instead of `any` would be a reasonable next step in this cleanup.
Make vital tag traits dynamic
This rather large pull request implements a change - changing vital tag traits access from compile-time to runtime - and then fixes / updates everywhere in the code that breaks as a result. Previously, the traits of vital's metadata tags (name, data type, description, etc) were defined in one giant macro. This was used to instantiate one templated class for each tag, which could only be accessed via `Tag` template parameter. This meant that these traits could only be directly accessed when the tag was known at compile time. A similar strategy was deployed for the `metadata_item` class, resulting in only being able to add a tag to a metadata collection when the identity of the tag was known at compile time. This sort of interface is difficult to work with and difficult to maintain, resulting in a lot of cumbersome, inelegant code (on net 600 lines removed here!).

Since the existing `vital_meta_trait` class was only accessible via template, there was a helper `metadata_trait` class which provided dynamic lookup capabilities. However, this class was instantiated in _n_ different places, incurring runtime costs as it built _n_ separate identical lookup tables. This whole system has been replaced with a better traits interface which only instantiates the traits once and allows lookup from anywhere. We can remove the 100+ separate `typed_metadata` classes and provide better functionality, now allowing dynamic insertion of runtime-determined tags using the new `metadata::add_any` overload.

There is still one ugly / hard-to-maintain code pattern left here, which the new code did have to add a few more instances of:
```
if( type == typeid( bool );
else if( type == typeid( int ) );
...
```
However, this will (hopefully) eventually be deleted. The `vital` metadata system already encourages/enforces/assumes use of only a handful of small types, which as of right now are all separately listed in the pattern above. Given the fact that these constraints are already being put on the data type, a `variant` is a much better pick for a metadata value representation than `any`, and will allow for more elegant treatment of these types. Though we don't have C++17 yet, we do have MPark's C++11 STL-compliant `variant` implementation already copy-pasted in KWIVER. If this PR goes through, using `variant` instead of `any` would be a reasonable next step in this cleanup.
Make vital tag traits dynamic
This rather large pull request implements a change - changing vital tag traits access from compile-time to runtime - and then fixes / updates everywhere in the code that breaks as a result. Previously, the traits of vital's metadata tags (name, data type, description, etc) were defined in one giant macro. This was used to instantiate one templated class for each tag, which could only be accessed via `Tag` template parameter. This meant that these traits could only be directly accessed when the tag was known at compile time. A similar strategy was deployed for the `metadata_item` class, resulting in only being able to add a tag to a metadata collection when the identity of the tag was known at compile time. This sort of interface is difficult to work with and difficult to maintain, resulting in a lot of cumbersome, inelegant code (on net 600 lines removed here!).

Since the existing `vital_meta_trait` class was only accessible via template, there was a helper `metadata_trait` class which provided dynamic lookup capabilities. However, this class was instantiated in _n_ different places, incurring runtime costs as it built _n_ separate identical lookup tables. This whole system has been replaced with a better traits interface which only instantiates the traits once and allows lookup from anywhere. We can remove the 100+ separate `typed_metadata` classes and provide better functionality, now allowing dynamic insertion of runtime-determined tags using the new `metadata::add_any` overload.

There is still one ugly / hard-to-maintain code pattern left here, which the new code did have to add a few more instances of:
```
if( type == typeid( bool );
else if( type == typeid( int ) );
...
```
However, this will (hopefully) eventually be deleted. The `vital` metadata system already encourages/enforces/assumes use of only a handful of small types, which as of right now are all separately listed in the pattern above. Given the fact that these constraints are already being put on the data type, a `variant` is a much better pick for a metadata value representation than `any`, and will allow for more elegant treatment of these types. Though we don't have C++17 yet, we do have MPark's C++11 STL-compliant `variant` implementation already copy-pasted in KWIVER. If this PR goes through, using `variant` instead of `any` would be a reasonable next step in this cleanup.


Discussion / hints:
[Kwiver Windows build succeeded.](https://open.cdash.org/buildSummary.php?buildid=7486660)
[Kwiver Windows build succeeded.](https://open.cdash.org/buildSummary.php?buildid=7488224)
[Kwiver CentOS build succeeded.](https://open.cdash.org/buildSummary.php?buildid=7488262)
[Kwiver Windows build succeeded.](https://open.cdash.org/buildSummary.php?buildid=7488272)
[Kwiver Mac build succeeded.](https://open.cdash.org/buildSummary.php?buildid=7488279)
[Kwiver Linux build succeeded.](https://open.cdash.org/buildSummary.php?buildid=7488282)
[Kwiver Windows build succeeded.](https://open.cdash.org/buildSummary.php?buildid=7486660)
[Kwiver Windows build succeeded.](https://open.cdash.org/buildSummary.php?buildid=7488224)
[Kwiver CentOS build succeeded.](https://open.cdash.org/buildSummary.php?buildid=7488262)
[Kwiver Windows build succeeded.](https://open.cdash.org/buildSummary.php?buildid=7488272)
[Kwiver Mac build succeeded.](https://open.cdash.org/buildSummary.php?buildid=7488279)
[Kwiver Linux build succeeded.](https://open.cdash.org/buildSummary.php?buildid=7488282)
[Kwiver Windows build succeeded.](https://open.cdash.org/buildSummary.php?buildid=7486660)
[Kwiver Windows build succeeded.](https://open.cdash.org/buildSummary.php?buildid=7488224)
[Kwiver CentOS build succeeded.](https://open.cdash.org/buildSummary.php?buildid=7488262)
[Kwiver Windows build succeeded.](https://open.cdash.org/buildSummary.php?buildid=7488272)
[Kwiver Mac build succeeded.](https://open.cdash.org/buildSummary.php?buildid=7488279)
[Kwiver Linux build succeeded.](https://open.cdash.org/buildSummary.php?buildid=7488282)

Fix patch:
diff --git a/python/kwiver/vital/types/metadata_tags.cxx b/python/kwiver/vital/types/metadata_tags.cxx
index 98eb1c2256..ddac2e820f 100644
--- a/python/kwiver/vital/types/metadata_tags.cxx
+++ b/python/kwiver/vital/types/metadata_tags.cxx
@@ -17,7 +17,9 @@ PYBIND11_MODULE( metadata_tags, m )
        tag = static_cast< kv::vital_metadata_tag >(
          static_cast< size_t >( tag ) + 1 ) )
   {
-    tags_enum.value( kv::tag_traits_by_tag( tag ).enum_name().c_str(), tag );
+    auto const enum_name =
+      std::string( "VITAL_META_" ) + kv::tag_traits_by_tag( tag ).enum_name();
+    tags_enum.value( enum_name.c_str(), tag );
   }
 
   tags_enum.value( "VITAL_META_LAST_TAG", kv::VITAL_META_LAST_TAG );
diff --git a/vital/types/metadata_traits.cxx b/vital/types/metadata_traits.cxx
index d0d2a65097..96b19149f5 100644
--- a/vital/types/metadata_traits.cxx
+++ b/vital/types/metadata_traits.cxx
@@ -20,335 +20,336 @@ namespace {
 std::vector< metadata_tag_traits > const&
 tag_traits()
 {
-#define TRAITS_OF( X ) X, #X, typeid( type_of_tag< X > )
+#define TRAITS_OF( X ) \
+VITAL_META_##X, #X, typeid( type_of_tag< VITAL_META_##X > )
   static auto const array = std::vector< metadata_tag_traits >{
-    { TRAITS_OF( VITAL_META_UNKNOWN ),
+    { TRAITS_OF( UNKNOWN ),
       "Unknown / Undefined Entry",
       "Unknown or undefined entry." },
-    { TRAITS_OF( VITAL_META_METADATA_ORIGIN ),
+    { TRAITS_OF( METADATA_ORIGIN ),
       "Origin of Metadata",
       "Name of the metadata standard used to decode these metadata values "
       "from a video stream." },
-    { TRAITS_OF( VITAL_META_UNIX_TIMESTAMP ),
+    { TRAITS_OF( UNIX_TIMESTAMP ),
       "Unix Timestamp (microseconds)",
       "Number of microseconds since the Unix epoch, not counting leap "
       "seconds." },
-    { TRAITS_OF( VITAL_META_MISSION_ID ),
+    { TRAITS_OF( MISSION_ID ),
       "Mission ID",
       "Descriptive mission identifier to distinguish event or sortie." },
-    { TRAITS_OF( VITAL_META_MISSION_NUMBER ),
+    { TRAITS_OF( MISSION_NUMBER ),
       "Episode Number",
       "Episode number." },
-    { TRAITS_OF( VITAL_META_PLATFORM_TAIL_NUMBER ),
+    { TRAITS_OF( PLATFORM_TAIL_NUMBER ),
       "Platform Tail Number",
       "Identifier of platform as posted." },
-    { TRAITS_OF( VITAL_META_PLATFORM_HEADING_ANGLE ),
+    { TRAITS_OF( PLATFORM_HEADING_ANGLE ),
       "Platform Heading Angle (degrees)",
       "Aircraft heading angle. Relative between longitudinal axis and True "
       "North measured in the horizontal plane." },
-    { TRAITS_OF( VITAL_META_PLATFORM_PITCH_ANGLE ),
+    { TRAITS_OF( PLATFORM_PITCH_ANGLE ),
       "Platform Pitch Angle (degrees)",
       "Aircraft pitch angle. Angle between longitudinal axis and horzontal "
       "plane. Positive angles above horizontal plane." },
-    { TRAITS_OF( VITAL_META_PLATFORM_ROLL_ANGLE ),
+    { TRAITS_OF( PLATFORM_ROLL_ANGLE ),
       "Platform Roll Angle (degrees)",
       "Platform roll angle. Angle between transverse axis and horizontal "
       "plane. Positive angles for right wing lowered below horizontal plane." },
-    { TRAITS_OF( VITAL_META_PLATFORM_TRUE_AIRSPEED ),
+    { TRAITS_OF( PLATFORM_TRUE_AIRSPEED ),
       "Platform True Airspeed (meters/second)",
       "True airspeed of platform. Indicated airspeed adjusted for temperature "
       "and altitude." },
-    { TRAITS_OF( VITAL_META_PLATFORM_INDICATED_AIRSPEED ),
+    { TRAITS_OF( PLATFORM_INDICATED_AIRSPEED ),
       "Platform Indicated Airspeed (meters/second)",
       "Indicated airspeed of platform. Derived from Pitot tube and static "
       "pressure sensors." },
-    { TRAITS_OF( VITAL_META_PLATFORM_DESIGNATION ),
+    { TRAITS_OF( PLATFORM_DESIGNATION ),
       "Platform Designation",
       "Platform designation." },
-    { TRAITS_OF( VITAL_META_IMAGE_SOURCE_SENSOR ),
+    { TRAITS_OF( IMAGE_SOURCE_SENSOR ),
       "Image Source Sensor",
       "String of image source sensor.  E.g.: 'EO Nose', 'EO Zoom (DLTV)', "
       "'EO Spotter', 'IR Mitsubishi PtSi Model 500', 'IR InSb Amber Model "
       "TBT', 'LYNX SAR Imagery', 'TESAR Imagery', etc." },
-    { TRAITS_OF( VITAL_META_IMAGE_COORDINATE_SYSTEM ),
+    { TRAITS_OF( IMAGE_COORDINATE_SYSTEM ),
       "Image Coordinate System",
       "Coordinate system used. E.g.: 'Geodetic WGS84', 'Geocentric WGS84', "
       "'TUM', 'None', etc." },
-    { TRAITS_OF( VITAL_META_IMAGE_URI ),
+    { TRAITS_OF( IMAGE_URI ),
       "Image URI",
       "URI of source image." },
-    { TRAITS_OF( VITAL_META_VIDEO_DATA_STREAM_INDEX ),
+    { TRAITS_OF( VIDEO_DATA_STREAM_INDEX ),
       "Index of Metadata Stream",
       "Index of metadata stream." },
-    { TRAITS_OF( VITAL_META_VIDEO_URI ),
+    { TRAITS_OF( VIDEO_URI ),
       "Video URI",
       "URI of source video." },
-    { TRAITS_OF( VITAL_META_VIDEO_KEY_FRAME ),
+    { TRAITS_OF( VIDEO_KEY_FRAME ),
       "Is Key Frame",
       "True if the current frame is a key frame." },
-    { TRAITS_OF( VITAL_META_VIDEO_FRAME_NUMBER ),
+    { TRAITS_OF( VIDEO_FRAME_NUMBER ),
       "Frame Number",
       "Frame number of video input." },
-    { TRAITS_OF( VITAL_META_VIDEO_MICROSECONDS ),
+    { TRAITS_OF( VIDEO_MICROSECONDS ),
       "Video Relative Timestamp",
       "Microseconds since beginning of video input." },
-    { TRAITS_OF( VITAL_META_SENSOR_LOCATION ),
+    { TRAITS_OF( SENSOR_LOCATION ),
       "Sensor Geodetic Location (lon/lat/alt)",
       "Three-dimensional coordinates of the sensor: longitude, latitude, and "
       "(optionally) altitude." },
-    { TRAITS_OF( VITAL_META_SENSOR_HORIZONTAL_FOV ),
+    { TRAITS_OF( SENSOR_HORIZONTAL_FOV ),
       "Sensor Horizonal Field of View (degrees)",
       "Horizontal field of view of selected imaging sensor." },
-    { TRAITS_OF( VITAL_META_SENSOR_VERTICAL_FOV ),
+    { TRAITS_OF( SENSOR_VERTICAL_FOV ),
       "Sensor Vertical Field of View (degrees)",
       "Vertical field of view of selected imaging sensor." },
-    { TRAITS_OF( VITAL_META_SENSOR_REL_AZ_ANGLE ),
+    { TRAITS_OF( SENSOR_REL_AZ_ANGLE ),
       "Sensor Relative Azimuth Angle (degrees)",
       "Relative rotation angle of sensor to platform longitudinal axis. "
       "Rotation angle between platform longitudinal axis and camera pointing "
       "direction as seen from above the platform." },
-    { TRAITS_OF( VITAL_META_SENSOR_REL_EL_ANGLE ),
+    { TRAITS_OF( SENSOR_REL_EL_ANGLE ),
       "Sensor Relative Elevation Angle (degrees)",
       "Relative elevation Angle of sensor to platform longitudinal-transverse "
       "plane. Negative angles down." },
-    { TRAITS_OF( VITAL_META_SENSOR_REL_ROLL_ANGLE ),
+    { TRAITS_OF( SENSOR_REL_ROLL_ANGLE ),
       "Sensor Relative Roll Angle (degrees)",
       "Relative roll angle of sensor to aircraft platform. Twisting angle of "
       "camera about lens axis. Top of image is zero degrees. Positive angles "
       "are clockwise when looking from behind camera." },
-    { TRAITS_OF( VITAL_META_SENSOR_YAW_ANGLE ),
+    { TRAITS_OF( SENSOR_YAW_ANGLE ),
       "Sensor Yaw Angle (degrees)",
       "" },
-    { TRAITS_OF( VITAL_META_SENSOR_PITCH_ANGLE ),
+    { TRAITS_OF( SENSOR_PITCH_ANGLE ),
       "Sensor Pitch Angle (degrees)",
       "" },
-    { TRAITS_OF( VITAL_META_SENSOR_ROLL_ANGLE ),
+    { TRAITS_OF( SENSOR_ROLL_ANGLE ),
       "Sensor Roll Angle (degrees)",
       "" },
-    { TRAITS_OF( VITAL_META_SENSOR_TYPE ),
+    { TRAITS_OF( SENSOR_TYPE ),
       "Sensor Type",
       "" },
-    { TRAITS_OF( VITAL_META_SLANT_RANGE ),
+    { TRAITS_OF( SLANT_RANGE ),
       "Slant Range (meters)",
       "Distance to target." },
-    { TRAITS_OF( VITAL_META_TARGET_WIDTH ),
+    { TRAITS_OF( TARGET_WIDTH ),
       "Target Width (meters)",
       "Target width within sensor field of view." },
-    { TRAITS_OF( VITAL_META_FRAME_CENTER ),
+    { TRAITS_OF( FRAME_CENTER ),
       "Geodetic Frame Center (lon/lat/alt)",
       "Three-dimensional coordinates of the frame center: longitude, "
       "latitude, and (optionally) altitude." },
-    { TRAITS_OF( VITAL_META_CORNER_POINTS ),
+    { TRAITS_OF( CORNER_POINTS ),
       "Corner Points (lon/lat)",
       "Four sided polygon representing the image bounds. The corners are "
       "ordered: upper left, upper right, lower right, lower left." },
-    { TRAITS_OF( VITAL_META_ICING_DETECTED ),
+    { TRAITS_OF( ICING_DETECTED ),
       "Icing Detected",
       "Flag for icing detected at aircraft location." },
-    { TRAITS_OF( VITAL_META_WIND_DIRECTION ),
+    { TRAITS_OF( WIND_DIRECTION ),
       "Wind Direction (degrees)",
       "Wind direction at aircraft location. This is the direction the wind is "
       "coming from relative to true north." },
-    { TRAITS_OF( VITAL_META_WIND_SPEED ),
+    { TRAITS_OF( WIND_SPEED ),
       "Wind Speed (meters/second)",
       "Wind speed at aircraft location." },
-    { TRAITS_OF( VITAL_META_STATIC_PRESSURE ),
+    { TRAITS_OF( STATIC_PRESSURE ),
       "Static Pressure (millibar)",
       "Static pressure at aircraft location." },
-    { TRAITS_OF( VITAL_META_DENSITY_ALTITUDE ),
+    { TRAITS_OF( DENSITY_ALTITUDE ),
       "Density Altitude (meters)",
       "Density altitude at aircraft location. Relative aircraft performance "
       "metric based on outside air temperature, static pressure, and "
       "humidity." },
-    { TRAITS_OF( VITAL_META_OUTSIDE_AIR_TEMPERATURE ),
+    { TRAITS_OF( OUTSIDE_AIR_TEMPERATURE ),
       "Outside Air Temperature (Celsius)",
       "Temperature outside aircraft." },
-    { TRAITS_OF( VITAL_META_TARGET_LOCATION ),
+    { TRAITS_OF( TARGET_LOCATION ),
       "Target Geodetic Location (lon/lat/alt)",
       "Three-dimensional coordinates of the target: longitude, latitude, and "
       "(optionally) altitude." },
-    { TRAITS_OF( VITAL_META_TARGET_TRK_GATE_WIDTH ),
+    { TRAITS_OF( TARGET_TRK_GATE_WIDTH ),
       "Target Track Gate Width (pixels)",
       "Tracking gate width (x value) of tracked target within field of view." },
-    { TRAITS_OF( VITAL_META_TARGET_TRK_GATE_HEIGHT ),
+    { TRAITS_OF( TARGET_TRK_GATE_HEIGHT ),
       "Target Track Gate Height (pixels)",
       "Tracking gate height (x value) of tracked target within field of view." },
-    { TRAITS_OF( VITAL_META_TARGET_ERROR_EST_CE90 ),
+    { TRAITS_OF( TARGET_ERROR_EST_CE90 ),
       "Target Error Estimate - CE90 (meters)",
       "Circular Error 90 (CE90) is the estimated error distance in the "
       "horizontal direction. Specifies the radius of 90% probability on a "
       "plane tangent to the earth’s surface." },
-    { TRAITS_OF( VITAL_META_TARGET_ERROR_EST_LE90 ),
+    { TRAITS_OF( TARGET_ERROR_EST_LE90 ),
       "Target Error Estimate - LE90 (meters)",
       "Lateral Error 90 (LE90) is the estimated error distance in the "
       "vertical (or lateral) direction. Specifies the interval of 90% "
       "probability in the local vertical direction." },
-    { TRAITS_OF( VITAL_META_DIFFERENTIAL_PRESSURE ),
+    { TRAITS_OF( DIFFERENTIAL_PRESSURE ),
       "Differential Pressure (millibar)",
       "Differential pressure at aircraft location. Measured as the stagnation/"
       "impact/total pressure minus static pressure." },
-    { TRAITS_OF( VITAL_META_PLATFORM_ANG_OF_ATTACK ),
+    { TRAITS_OF( PLATFORM_ANG_OF_ATTACK ),
       "Platform Angle of Attack (deg)",
       "Angle between platform longitudinal axis and relative wind. Positive "
       "angles for upward relative wind." },
-    { TRAITS_OF( VITAL_META_PLATFORM_VERTICAL_SPEED ),
+    { TRAITS_OF( PLATFORM_VERTICAL_SPEED ),
       "Platform Vertical Speed (meters/sec)",
       "Vertical speed of the aircraft relative to zenith. Positive ascending, "
       "negative descending." },
-    { TRAITS_OF( VITAL_META_PLATFORM_SIDESLIP_ANGLE ),
+    { TRAITS_OF( PLATFORM_SIDESLIP_ANGLE ),
       "Platform Sideslip Angle (degrees)",
       "The sideslip angle is the angle between the platform longitudinal axis "
       "and relative wind. Positive angles to right wing, negative to left." },
-    { TRAITS_OF( VITAL_META_AIRFIELD_BAROMET_PRESS ),
+    { TRAITS_OF( AIRFIELD_BAROMET_PRESS ),
       "Airfield Barometric Pressure (millibars)",
       "Local pressure at airfield of known height." },
-    { TRAITS_OF( VITAL_META_AIRFIELD_ELEVATION ),
+    { TRAITS_OF( AIRFIELD_ELEVATION ),
       "Airfield Elevation (meters)",
       "Elevation of airfield corresponding to Airfield Barometric Pressure." },
-    { TRAITS_OF( VITAL_META_RELATIVE_HUMIDITY ),
+    { TRAITS_OF( RELATIVE_HUMIDITY ),
       "Relative Humidity (percent)",
       "Relative humidity at aircraft location." },
-    { TRAITS_OF( VITAL_META_PLATFORM_GROUND_SPEED ),
+    { TRAITS_OF( PLATFORM_GROUND_SPEED ),
       "Platform Ground Speed (meters/second)",
       "Speed projected to the ground of an airborne platform passing "
       "overhead." },
-    { TRAITS_OF( VITAL_META_GROUND_RANGE ),
+    { TRAITS_OF( GROUND_RANGE ),
       "Ground Range (meters)",
       "Horizontal distance from ground position of aircraft relative to nadir,"
       " and target of interest." },
-    { TRAITS_OF( VITAL_META_PLATFORM_FUEL_REMAINING ),
+    { TRAITS_OF( PLATFORM_FUEL_REMAINING ),
       "Platform Fuel Remaining (kilograms)",
       "" },
-    { TRAITS_OF( VITAL_META_PLATFORM_CALL_SIGN ),
+    { TRAITS_OF( PLATFORM_CALL_SIGN ),
       "Platform Call Sign",
       "Call sign of platform or operating unit." },
-    { TRAITS_OF( VITAL_META_LASER_PRF_CODE ),
+    { TRAITS_OF( LASER_PRF_CODE ),
       "Laser PRF Code",
       "Pulse Repetition Frequency code used to mark a target. Three or four "
       "digit number consisting only of the digits 1..8." },
-    { TRAITS_OF( VITAL_META_SENSOR_FOV_NAME ),
+    { TRAITS_OF( SENSOR_FOV_NAME ),
       "Sensor Field of View Name",
       "Names sensor field of view level in quantized steps: 4x Ultranarrow, "
       "2x Ultranarrow, Ultranarrow, Narrow, Narrow Medium, Medium, Wide, "
       "Ultrawide." },
-    { TRAITS_OF( VITAL_META_PLATFORM_MAGNET_HEADING ),
+    { TRAITS_OF( PLATFORM_MAGNET_HEADING ),
       "Platform Magnetic Heading (degrees)",
       "Aircraft magnetic heading angle. Relative between longitudinal axis and"
       " Magnetic North measured in the horizontal plane." },
-    { TRAITS_OF( VITAL_META_UAS_LDS_VERSION_NUMBER ),
+    { TRAITS_OF( UAS_LDS_VERSION_NUMBER ),
       "UAS LDS Version Number",
       "" },
-    { TRAITS_OF( VITAL_META_ANGLE_TO_NORTH ),
+    { TRAITS_OF( ANGLE_TO_NORTH ),
       "Angle to North (degrees)",
       "" },
-    { TRAITS_OF( VITAL_META_OBLIQUITY_ANGLE ),
+    { TRAITS_OF( OBLIQUITY_ANGLE ),
       "Sensor Obliquity Angle (degrees)",
       "" },
-    { TRAITS_OF( VITAL_META_START_TIMESTAMP ),
+    { TRAITS_OF( START_TIMESTAMP ),
       "Start Timestamp",
       "Time of collection start. Microseconds since UNIX epoch." },
-    { TRAITS_OF( VITAL_META_EVENT_START_TIMESTAMP ),
+    { TRAITS_OF( EVENT_START_TIMESTAMP ),
       "Event Start Timestamp",
       "Time of event, mission, etc. start. Microseconds since UNIX epoch." },
-    { TRAITS_OF( VITAL_META_SECURITY_CLASSIFICATION ),
+    { TRAITS_OF( SECURITY_CLASSIFICATION ),
       "Security Classification",
       "Security classification of source imagery." },
-    { TRAITS_OF( VITAL_META_AVERAGE_GSD ),
+    { TRAITS_OF( AVERAGE_GSD ),
       "Average Ground Sample Distance (meters/pixel)",
       "" },
-    { TRAITS_OF( VITAL_META_VNIIRS ),
+    { TRAITS_OF( VNIIRS ),
       "Video National Imagery Interpretability Rating Scale",
       "A subjective quality scale from 2 to 11 for rating the intelligence "
       "value of airborne motion imagery in the visible spectrum. See "
       "https://gwg.nga.mil/misb/docs/standards/ST0901.2.pdf" },
-    { TRAITS_OF( VITAL_META_WAVELENGTH ),
+    { TRAITS_OF( WAVELENGTH ),
       "Sensor Wavelength",
       "Wavelength band currently in use. Standardized values: 'VIS' "
       "(visible), 'IR' (infrared), 'NIR' (near/short-wave infrared), 'MIR' "
       "(mid-wave infrared), 'LIR' (long-wave infrared), 'FIR' "
       "(far-infrared)." },
-    { TRAITS_OF( VITAL_META_GPS_SEC ),
+    { TRAITS_OF( GPS_SEC ),
       "GPS Seconds",
       "" },
-    { TRAITS_OF( VITAL_META_GPS_WEEK ),
+    { TRAITS_OF( GPS_WEEK ),
       "GPS Week",
       "" },
-    { TRAITS_OF( VITAL_META_NORTHING_VEL ),
+    { TRAITS_OF( NORTHING_VEL ),
       "Northing Velocity (meters/second)",
       "" },
-    { TRAITS_OF( VITAL_META_EASTING_VEL ),
+    { TRAITS_OF( EASTING_VEL ),
       "Easting Velocity (meters/second)",
       "" },
-    { TRAITS_OF( VITAL_META_UP_VEL ),
+    { TRAITS_OF( UP_VEL ),
       "Up Velocity (meters/second)",
       "" },
-    { TRAITS_OF( VITAL_META_IMU_STATUS ),
+    { TRAITS_OF( IMU_STATUS ),
       "IMU Status",
       "" },
-    { TRAITS_OF( VITAL_META_LOCAL_ADJ ),
+    { TRAITS_OF( LOCAL_ADJ ),
       "Local Adj",
       "" },
-    { TRAITS_OF( VITAL_META_DST_FLAGS ),
+    { TRAITS_OF( DST_FLAGS ),
       "Dst Flags",
       "" },
-    { TRAITS_OF( VITAL_META_RPC_HEIGHT_OFFSET ),
+    { TRAITS_OF( RPC_HEIGHT_OFFSET ),
       "RPC Height Offset",
       "" },
-    { TRAITS_OF( VITAL_META_RPC_HEIGHT_SCALE ),
+    { TRAITS_OF( RPC_HEIGHT_SCALE ),
       "RPC Height Scale",
       "" },
-    { TRAITS_OF( VITAL_META_RPC_LONG_OFFSET ),
+    { TRAITS_OF( RPC_LONG_OFFSET ),
       "RPC Longitude Offset",
       "" },
-    { TRAITS_OF( VITAL_META_RPC_LONG_SCALE ),
+    { TRAITS_OF( RPC_LONG_SCALE ),
       "RPC Longitude Scale",
       "" },
-    { TRAITS_OF( VITAL_META_RPC_LAT_OFFSET ),
+    { TRAITS_OF( RPC_LAT_OFFSET ),
       "RPC Latitude Offset",
       "" },
-    { TRAITS_OF( VITAL_META_RPC_LAT_SCALE ),
+    { TRAITS_OF( RPC_LAT_SCALE ),
       "RPC Latitude Scale",
       "" },
-    { TRAITS_OF( VITAL_META_RPC_ROW_OFFSET ),
+    { TRAITS_OF( RPC_ROW_OFFSET ),
       "RPC Row Offset",
       "" },
-    { TRAITS_OF( VITAL_META_RPC_ROW_SCALE ),
+    { TRAITS_OF( RPC_ROW_SCALE ),
       "RPC Row Scale",
       "" },
-    { TRAITS_OF( VITAL_META_RPC_COL_OFFSET ),
+    { TRAITS_OF( RPC_COL_OFFSET ),
       "RPC Column Offset",
       "" },
-    { TRAITS_OF( VITAL_META_RPC_COL_SCALE ),
+    { TRAITS_OF( RPC_COL_SCALE ),
       "RPC Column Scale",
       "" },
-    { TRAITS_OF( VITAL_META_RPC_ROW_NUM_COEFF ),
+    { TRAITS_OF( RPC_ROW_NUM_COEFF ),
       "RPC Row Numerator Coefficients",
       "" },
-    { TRAITS_OF( VITAL_META_RPC_ROW_DEN_COEFF ),
+    { TRAITS_OF( RPC_ROW_DEN_COEFF ),
       "RPC Row Denominator Coefficients",
       "" },
-    { TRAITS_OF( VITAL_META_RPC_COL_NUM_COEFF ),
+    { TRAITS_OF( RPC_COL_NUM_COEFF ),
       "RPC Column Numerator Coefficients",
       "" },
-    { TRAITS_OF( VITAL_META_RPC_COL_DEN_COEFF ),
+    { TRAITS_OF( RPC_COL_DEN_COEFF ),
       "RPC Column Denominator Coefficients",
       "" },
-    { TRAITS_OF( VITAL_META_NITF_IDATIM ),
+    { TRAITS_OF( NITF_IDATIM ),
       "NITF IDATIM",
       "" },
-    { TRAITS_OF( VITAL_META_NITF_BLOCKA_FRFC_LOC_01 ),
+    { TRAITS_OF( NITF_BLOCKA_FRFC_LOC_01 ),
       "First Row First Column Location",
       "" },
-    { TRAITS_OF( VITAL_META_NITF_BLOCKA_FRLC_LOC_01 ),
+    { TRAITS_OF( NITF_BLOCKA_FRLC_LOC_01 ),
       "First Row Last Column Location",
       "" },
-    { TRAITS_OF( VITAL_META_NITF_BLOCKA_LRFC_LOC_01 ),
+    { TRAITS_OF( NITF_BLOCKA_LRFC_LOC_01 ),
       "Last Row First Column Location",
       "" },
-    { TRAITS_OF( VITAL_META_NITF_BLOCKA_LRLC_LOC_01 ),
+    { TRAITS_OF( NITF_BLOCKA_LRLC_LOC_01 ),
       "Last Row Last Column Location",
       "" },
-    { TRAITS_OF( VITAL_META_NITF_IMAGE_COMMENTS ),
+    { TRAITS_OF( NITF_IMAGE_COMMENTS ),
       "Image Comments for NITF File",
       "" }, };
   return array;


Test patch:
diff --git a/python/kwiver/vital/tests/test_metadata_traits.py b/python/kwiver/vital/tests/test_metadata_traits.py
index e649707069..771a8550b7 100644
--- a/python/kwiver/vital/tests/test_metadata_traits.py
+++ b/python/kwiver/vital/tests/test_metadata_traits.py
@@ -52,34 +52,34 @@ def test_vital_meta_traits(self):
         self.check_are_valid_traits(tag_traits_by_tag( mt.tags.VITAL_META_UNKNOWN ),
                                     mt.tags.VITAL_META_UNKNOWN,
                                     "Unknown / Undefined Entry",
-                                    "VITAL_META_UNKNOWN",
+                                    "UNKNOWN",
                                     "int",
                                     "Unknown or undefined entry.")
 
         self.check_are_valid_traits(tag_traits_by_tag( mt.tags.VITAL_META_METADATA_ORIGIN ),
                                     mt.tags.VITAL_META_METADATA_ORIGIN,
                                     "Origin of Metadata",
-                                    "VITAL_META_METADATA_ORIGIN",
+                                    "METADATA_ORIGIN",
                                     "string",
                                     "Name of the metadata standard used to decode these metadata values from a video stream.")
         self.check_are_valid_traits(tag_traits_by_tag( mt.tags.VITAL_META_UNIX_TIMESTAMP ),
                                     mt.tags.VITAL_META_UNIX_TIMESTAMP,
                                     "Unix Timestamp (microseconds)",
-                                    "VITAL_META_UNIX_TIMESTAMP",
+                                    "UNIX_TIMESTAMP",
                                     tc.get_uint64_rep(),
                                     "Number of microseconds since the Unix epoch, not counting leap seconds.")
 
         self.check_are_valid_traits(tag_traits_by_tag( mt.tags.VITAL_META_SLANT_RANGE ),
                                     mt.tags.VITAL_META_SLANT_RANGE,
                                     "Slant Range (meters)",
-                                    "VITAL_META_SLANT_RANGE",
+                                    "SLANT_RANGE",
                                     "double",
                                     "Distance to target.")
 
         self.check_are_valid_traits(tag_traits_by_tag( mt.tags.VITAL_META_VIDEO_KEY_FRAME ),
                                     mt.tags.VITAL_META_VIDEO_KEY_FRAME,
                                     "Is Key Frame",
-                                    "VITAL_META_VIDEO_KEY_FRAME",
+                                    "VIDEO_KEY_FRAME",
                                     "bool",
                                     "True if the current frame is a key frame.")
 
@@ -98,4 +98,4 @@ def test_traits_by_name(self):
         self.assertEqual(tag_traits_by_name( "Origin of Metadata" ).tag(), mt.tags.VITAL_META_METADATA_ORIGIN)
 
     def test_traits_by_enum_name(self):
-        self.assertEqual(tag_traits_by_enum_name( "VITAL_META_METADATA_ORIGIN" ).tag(), mt.tags.VITAL_META_METADATA_ORIGIN)
+        self.assertEqual(tag_traits_by_enum_name( "METADATA_ORIGIN" ).tag(), mt.tags.VITAL_META_METADATA_ORIGIN)