Validation Issue Glossary
=========================

Errors
------

``PYTHON``
**********

These issues are generated when a Python error prevents complete validation.

.. validation-issue:: ERROR:PYTHON:EXCEPTION

   Unexpected Python exception occurred. **Please report this as a bug.** This may or may not be due to an issue in the geodatabase, but even if it is, the issue should be accounted for by the tool and handled appropriately.

``GDB``
*******

These issues are related to some aspect of an :term:`NG911 geodatabase`\ 's configuration.

.. validation-issue:: ERROR:GDB:MISSING_REQUIRED_DATASET

   The :term:`required feature dataset`, :ng911ds:`required`, is not present in the geodatabase.

.. validation-issue:: ERROR:GDB:MISSING_REQUIRED_FEATURE_CLASS

   A :term:`required feature class` is not present in the :term:`required feature dataset`.

.. validation-issue:: ERROR:GDB:EXTRA_ITEM

   An unexpected item, such as a feature class, was found in the geodatabase and should be removed. This code could also indicate that an item is incorrectly named.

.. validation-issue:: ERROR:GDB:MISSING_DOMAIN

   A domain prescribed by the Standard has not been defined for the geodatabase.

.. validation-issue:: ERROR:GDB:EXTRA_DOMAIN

   A domain *not* prescribed by the Standard has been defined for the geodatabase and should be removed.

.. validation-issue:: ERROR:GDB:INCORRECT_DOMAIN_TYPE

   A domain is not of the correct type (*coded-value* or *range*).

.. validation-issue:: ERROR:GDB:DOMAIN_MISSING_CODE

   A coded-value domain lacks an entry listed in the Standard.

.. validation-issue:: ERROR:GDB:DOMAIN_EXTRA_CODE

   A coded-value domain has an entry *not* listed in the Standard.

.. validation-issue:: ERROR:GDB:DOMAIN_CODE_VALUE_MISMATCH

   A code in a coded-value domain has an incorrect description.

.. validation-issue:: ERROR:GDB:INCORRECT_DOMAIN_DESCRIPTION

   The description of a domain itself is incorrect.

``DATASET``
***********

These issues pertain to feature datasets within the geodatabase.

.. validation-issue:: ERROR:DATASET:INCORRECT_SPATIAL_REFERENCE

   The spatial reference of a feature dataset is not among those allowed by the Standard.

Unused Codes
++++++++++++

.. validation-issue:: ERROR:DATASET:MISSING_TOPOLOGY

   *This code is defined but not currently used.*

.. validation-issue:: ERROR:DATASET:INCORRECT_TOPOLOGY

   *This code is defined but not currently used.*

.. validation-issue:: ERROR:DATASET:TOPOLOGY_VIOLATION

   *This code is defined but not currently used.*

``FEATURE_CLASS``
*****************

Issues in this category concern the configuration or entire contents of a particular feature class.

.. validation-issue:: ERROR:FEATURE_CLASS:MISSING_REQUIRED_FIELD

   A field listed in the Standard for a particular feature class is missing.

.. validation-issue:: ERROR:FEATURE_CLASS:EXTRA_FIELD

   A field *not* listed in the Standard for a particular feature class is present and should be removed.

.. validation-issue:: ERROR:FEATURE_CLASS:INCORRECT_SPATIAL_REFERENCE

   The spatial reference of a feature class is not among those allowed by the Standard.

.. validation-issue:: ERROR:FEATURE_CLASS:INCORRECT_GEOMETRY_TYPE

   The geometry type (e.g., point, polyline, polygon) of a feature class is not consistent with the Standard.

.. validation-issue:: ERROR:FEATURE_CLASS:INCORRECT_FEATURE_TYPE

   The feature type (e.g., simple, annotation) of a feature class is not consistent with the Standard.

.. validation-issue:: ERROR:FEATURE_CLASS:EMPTY

   The feature class contains no features.

.. validation-issue:: ERROR:FEATURE_CLASS:EMPTY_SUBMISSION

   The feature class contains no features where :ng911field:`submit=Y`.

``FIELD``
*********

.. validation-issue:: ERROR:FIELD:INCORRECT_FIELD_TYPE

   The data type of the field is incorrect.

.. validation-issue:: ERROR:FIELD:INCORRECT_FIELD_LENGTH

   The length of the field is incorrect.

.. validation-issue:: ERROR:FIELD:INCORRECT_FIELD_DOMAIN

   The field has the wrong domain assigned to it, has a domain when it should not, or has no domain when it should have one.

``DOMAIN``
**********

.. validation-issue:: ERROR:DOMAIN:INVALID_VALUE

   The attribute is set to a value that is not present in the field's domain.

.. validation-issue:: ERROR:GENERAL:INVALID_VALUE

   The attribute is set to a value that is not valid for the particular feature class and field. Currently, this is only used when the :ng911field:`topoexcept` field of :ng911fc:`address_point` is set to a value that only makes sense for the equivalent field in :ng911fc:`road_centerline`.

``GENERAL``
***********

.. validation-issue:: ERROR:GENERAL:MANDATORY_IS_NULL

   A value in a mandatory field is null.

.. validation-issue:: ERROR:GENERAL:MANDATORY_IS_BLANK

   A value in a mandatory field is not null, but is a blank string or similar empty value.

.. validation-issue:: ERROR:GENERAL:NOT_UPPERCASE

   A value contains lowercase letters when all its letters should be uppercase. This is used for text fields that the Standard states should contain only all-uppercase attributes.

.. validation-issue:: ERROR:GENERAL:UNIQUENESS

   A value is repeated in a field that should contain only unique values.

   .. seealso::

      Similar issues pertaining to specific cases include :term:`ERROR:NGUID:DUPLICATE`, :term:`ERROR:ADDRESS:DUPLICATE`, and :term:`ERROR:ADDRESS_RANGE:OVERLAP`.

``NGUID``
*********

These issues pertain specifically to the validity of NGUIDs.

.. validation-issue:: ERROR:NGUID:FORMAT

   The format of the NGUID is incorrect.

.. validation-issue:: ERROR:NGUID:V2_FORMAT

   The format of the NGUID matches the format used by Version 2.2 of the Standard instead of the current version.

.. validation-issue:: ERROR:NGUID:AGENCY

   The Agency ID portion of the NGUID does not exist, i.e., it is not in the :ng911domain:`AGENCYID` domain.

.. validation-issue:: ERROR:NGUID:LAYER

   The layer portion of the NGUID does not match the name of the feature class.

.. validation-issue:: ERROR:NGUID:DUPLICATE

   The NGUID is not unique. The Local ID portion of the NGUID (and the :ng911field:`local_id` attribute) should be changed.

``ADDRESS``
***********

.. validation-issue:: ERROR:ADDRESS:DUPLICATE

   An address point's address-related fields, when combined, match those of another address point.

``ADDRESS_RANGE``
*****************

.. validation-issue:: ERROR:ADDRESS_RANGE:OVERLAP

   Address ranges of :ng911fc:`road_centerline` features overlap. This means that, after considering :ng911field:`parity_l`/:ng911field:`parity_r` there is numerical overlap between one feature's :ng911field:`add_l_to` or :ng911field:`add_r_to` and another feature's :ng911field:`add_l_from` or :ng911field:`add_r_from`. The features' :ng911field:`fullname` and (as appropriate) :ng911field:`msagcomm_l` or :ng911field:`msagcomm_r` must also be equal for this issue to occur.

.. validation-issue:: ERROR:ADDRESS_RANGE:DECREASING

   A :ng911fc:`road_centerline` feature has a from-address value greater than that side's to-address value, i.e., :ng911field:`add_l_from` > :ng911field:`add_l_to` or :ng911field:`add_r_from` > :ng911field:`add_l_to`. Address ranges should always go from low to high.

``ROAD_ESN``
************

.. validation-issue:: ERROR:ROAD_ESN:DEVIATION

   A :ng911fc:`road_centerline` feature does one or more of the following in relation to :ng911fc:`esz_boundary` features:

   - Passes through an intersection of ESZ polygon borders
   - Follows the border of an ESZ polygon for part, but not all, of the road's length

.. validation-issue:: ERROR:ROAD_ESN:CROSSING

   A :ng911fc:`road_centerline` feature crosses the border of one or more :ng911fc:`esz_boundary` features. The road may have an *endpoint* on a border, but it may not cross a border.

.. validation-issue:: ERROR:ROAD_ESN:OUT_OF_BOUNDS

   At least part, if not all, of a :ng911fc:`road_centerline` feature is neither inside an :ng911fc:`esz_boundary` feature nor along a border.

``PARITY``
**********

These issues are related to the parity attributes of :ng911fc:`road_centerline` features.

.. note::

   In this section:

   - *Side* refers to the left or right side of a :ng911fc:`road_centerline` feature
   - *Parity* refers to a :ng911fc:`road_centerline` feature's :ng911field:`parity_l` or :ng911field:`parity_r` attribute
   - *From-address* refers to a :ng911fc:`road_centerline` feature's :ng911field:`add_l_from` or :ng911field:`add_r_from` attribute
   - *To-address* refers to a :ng911fc:`road_centerline` feature's :ng911field:`add_l_to` or :ng911field:`add_r_to` attribute

   Features can have these issues on both sides. In that case, each side will have its own row in the error table.

.. validation-issue:: ERROR:PARITY:EXPECTED_ZERO

   On a given side, the parity is ``ZERO``, but the from-address and/or to-address is not set to ``0``.

.. validation-issue:: ERROR:PARITY:EXPECTED_NONZERO

   On a given side, the parity is **not** ``ZERO``, but the from-address and/or to-address **is** set to ``0``.

.. validation-issue:: ERROR:PARITY:MISMATCH

   On a given side, the parity does not make sense given the from-address and to-address. As examples:

   - The range 101-199 could be ``ODD`` or ``BOTH`` but not ``EVEN`` or ``ZERO``
   - The range 200-299 must be ``BOTH``.

.. validation-issue:: ERROR:PARITY:INVALID

   The parity is not in the :ng911domain:`PARITY` domain.

.. validation-issue:: ERROR:PARITY:NULL

   The parity is null.

``LEGACY``
**********

.. validation-issue:: ERROR:LEGACY:MISMATCH

   A legacy attribute is not consistent with its corresponding next-gen attribute. For example, if :ng911field:`streettype=ROAD`, then :ng911field:`lgcytype=RD` must be true.

``GEOCODE``
***********

These issues pertain to the relationship between :ng911fc:`address_point` and :ng911fc:`road_centerline`.

.. validation-issue:: ERROR:GEOCODE:UNKNOWN_MATCH

   No :ng911fc:`road_centerline` feature with the given :ng911field:`nguid_rdcl` exists.

.. validation-issue:: ERROR:GEOCODE:WRONG_SIDE

   The :ng911field:`rclmatch` is correct, but the :ng911field:`rclside` is not consistent with the address range parity on that side of the road.

.. validation-issue:: ERROR:GEOCODE:BOTH_SIDES

   The address matches both the left and right sides of the road.

.. validation-issue:: ERROR:GEOCODE:WRONG_COMMUNITY

   The :ng911fc:`address_point` feature's :ng911field:`msagcomm` attribute doesn't match the :ng911fc:`road_centerline` feature's :ng911field:`msagcomm_l` (if :ng911field:`rclside=LEFT`) or :ng911field:`msagcomm_r` (if :ng911field:`rclside=RIGHT`), but the addresses otherwise match.

.. validation-issue:: ERROR:GEOCODE:OUT_OF_RANGE

   The :ng911fc:`address_point` feature's :ng911field:`addnumber` attribute is not within the :ng911fc:`road_centerline` feature's address range on the given side.

.. validation-issue:: ERROR:GEOCODE:NAME_MISMATCH

   The :ng911fc:`address_point` feature's street name attributes do not match those of the :ng911fc:`road_centerline` feature.

``CONSISTENCY``
***************

.. validation-issue:: ERROR:CONSISTENCY:ADDRESS_ESN

   The :ng911fc:`address_point` feature is located in an :ng911fc:`esz_boundary` feature with a different :ng911field:`esn` attribute.

.. validation-issue:: ERROR:CONSISTENCY:ROAD_ESN

   The :ng911fc:`road_centerline` feature's :ng911field:`esn_l` does not match the :ng911field:`esn` attribute of the :ng911fc:`esz_boundary` feature on the road's left side, or the :ng911fc:`road_centerline` feature's :ng911field:`esn_r` does not match the :ng911field:`esn` attribute of the :ng911fc:`esz_boundary` feature on the road's right side.

Unused Codes
++++++++++++

.. validation-issue:: ERROR:CONSISTENCY:COMMUNITY

   *This code is defined but not currently used.*

``GEOMETRY``
************

.. validation-issue:: ERROR:GEOMETRY:TOPOLOGY

   There is a topology rule violation that is not marked as an exception (using the :ng911field:`topoexcept` field).


Warnings
--------

``GENERAL``
***********

.. validation-issue:: WARNING:GENERAL:LEADING_TRAILING_SPACE

   An attribute begins or ends with a space character.

``CONSISTENCY``
***************

.. validation-issue:: WARNING:CONSISTENCY:ROAD_LEVEL

   All :ng911fc:`road_centerline` features that intersect at a point must have the same value in their :ng911field:`fromlevel` or :ng911field:`tolevel` attributes (as appropriate, depending on whether each feature is starting or ending at that point), **unless**, in reality, there is grade separation between intersecting roads, such as with a freeway overpass.

``GEOMETRY``
************

These issues are related to the actual geometry of a feature.

.. validation-issue:: WARNING:GEOMETRY:CUTBACK

   A :ng911fc:`road_centerline` feature has a vertex with a particularly sharp angle between segments of less than 55 degrees.

.. validation-issue:: WARNING:GEOMETRY:SHORT_SEGMENT

   A :ng911fc:`road_centerline` feature has a particularly short segment of less than 5 meters.


Notices
-------

``GDB``
*******

.. validation-issue:: NOTICE:GDB:MISSING_OPTIONAL_DATASET

   The :term:`optional feature dataset`, :ng911ds:`optional`, is missing from the geodatabase.

.. validation-issue:: NOTICE:GDB:MISSING_OPTIONAL_FEATURE_CLASS

   An :term:`optional feature class` is missing from the :term:`optional feature dataset`.

``CONSISTENCY``
***************

.. validation-issue:: NOTICE:CONSISTENCY:ROAD_ESN

   A :ng911fc:`road_centerline` feature lies on the border of an :ng911fc:`esz_boundary` feature that it does not share with another ESZ feature. That is, there is an ESZ feature on one side of the road but not on the other. This Notice is only generated when :ng911field:`esn=$fill_value`.
