pds-data-dictionaries / PDS4-LDD-Issue-Repo

Issue repository for tracking all PDS4 Discipline Dictionary-related issues, new feature requests, and releases.
Apache License 2.0
2 stars 1 forks source link

[ldd-cart] Add new Schematron rules and associated test files #220

Open wkiri opened 2 years ago

wkiri commented 2 years ago

Describe the issue identified Two logical requirements of the namespace have been identified that can be checked via Schematron rules.

Describe the solution you'd like Classes

  1. Add Schematron rules

    • [x] Spatial_Domain must be present if Secondary_Spatial_Domain is used
    • [ ] Check that the (string) value for grid_coordinate_system_name is consistent with the subclass specified in the choice under Grid_Coordinate_System
    • [ ] Check that the (string) value for map_projection_name is consistent with the subclass specified in the choice under Map_Projection. NOTE: There are more values available for the attribute than there are corresponding classes, but all subclasses do have a corresponding attribute value.
    • [ ] Check that the (string) value for lander_map_projection_name is consistent with the subclass specified in the choice under Map_Projection_Lander
    • [ ] Check that the (string) value for rings_map_projection_name is consistent with the subclass specified in the choice under Map_Projection_Rings NOTE: Currently there is only one option for each, so not currently a necessary rule.
    • [x] In the Lambert_Conformal_Conic class, standard_parallel_1 & standard_parallel_2 are optional. Assuming you can't use one without the other, need a Schematron rule enforcing neither or both are present.
    • [x] In the Vector_Cartesian_Unit_Base class, the definition says the length of the vector square root of the (sum of the squares of the components) must be 1.0. Needs a Schematron rule - over to you! Just noting here - we doubt Schematron will do the math.
  2. Attributes

    • [x] angular_scale The definition requires radian/pixel, if this is in fact a requirement, it needs a Schematron rule to enforce.
    • [x] azimuthal_angle The definition requires degrees, if this is in fact a requirement, it needs a Schematron rule to enforce.
    • [x] local_time_scale The definition lists various units, but does not include radian/pixel, if this is in fact prohibited, it needs a Schematron rule to enforce.
    • [x] oblique_proj_pole_rotation The definition requires degrees, if this is in fact a requirement, it needs a Schematron rule to enforce.
    • [x] radial_scale The definition requires km/pixel if this is in fact a requirement, it needs a Schematron rule to enforce.
    • [x] target_center_distance The definition requires meters, if this is in fact a requirement, it needs a Schematron rule to enforce.
    • [x] upperleft_corner_x The definition requires meters, if this is in fact a requirement, it needs a Schematron rule to enforce.
    • [x] upperleft_corner_y The definition requires meters, if this is in fact a requirement, it needs a Schematron rule to enforce.
  3. Add test cases (pass and fail) for each rule.

LDD Dictionary Version 1.9.6.0

PDS4 IM Version 1.18.0.0

Need-by Date May 20, 2022 to be included in the next IM build.

Additional context DMSP workshop follow-up.