declarations for units in spatialReference and spatialRaster are inconsistent
Author Name: Margaret O'Brien (Margaret O'Brien) Original Redmine Issue: 3523, https://projects.ecoinformatics.org/ecoinfo/issues/3523 Original Date: 2008-10-09 Original Assignee: Matt Jones
In spatialReference.xsd and spatialRaster.xsd the use of units is inconsistent. eml-spatialReference.xsd defines 2 types which are lists of units, very similar to what is going on in the attribute and coverage schemas (see bug #1019 comment #4).
<simpleType name="lengthUnits"> and <simpleType name="angleUnit"> each of which is an enumeration that includes a group units which are also in standardUnits, but as implied by the names, their lists are units of type length and angle, respectively. The types are used inconsistently: eml-spatialReference.xsd:2215: <xs:element name="altitudeDistanceUnits" type="xs:string"> eml-spatialReference.xsd:2273: <xs:element name="depthDistanceUnits" type="xs:string"> eml-spatialReference.xsd:2386: <xs:element name="unit"> eml-spatialReference.xsd:2396: <xs:attribute name="name" type="angleUnits" use="required"> eml-spatialReference.xsd:2499: <xs:element name="unit"> eml-spatialReference.xsd:2508: <xs:attribute name="name" type="lengthUnits" use="required"> eml-spatialRaster.xsd 793: <xs:element name="waveLengthUnits" type="spref:lengthUnits" minOccurs="0">
Original Redmine Comment Author Name: Redmine Admin (Redmine Admin) Original Date: 2013-03-27T21:23:42Z
Original Bugzilla ID was 3523
Clarification: the eml-unitTypeDefinitions.xsd has Types for length and mass units, and the LengthUnitType is used in for altitudeUnits in coverage (MassUnitType is not currently used).
The fix for this bug would be to use that LengthUnitType in spatialReference.xsd and spatialRaster.xsd. And there is even a parallel simpleType for length and angle units in spatialReference.xsd. However, the unit elements (above) are currently typed as strings. So to restrict them now to named Type is a breaking change, so will not happen in 2.2.