[eml-dev] defining new units
Carl Boettiger
cboettig at gmail.com
Wed Jul 23 11:23:56 PDT 2014
Hi list,
I’m looking to make use of the unit “grams per meter” but I’m not seeing
any unit on the EML list
<https://knb.ecoinformatics.org/#external//emlparser/docs/eml-2.1.1/eml-unitTypeDefinitions.html#StandardUnitDictionary>
that is a mass per length.
I’m not sure I quite understand how to construct the STMML block for the
additionalMetadata Section. Here’s how far I got, would appreciate any
insight or pointers where I’ve gone wrong:
A new unit type for “g m-1” would look like this:
<unitType id="massPerLength" name="massPerLength">
<dimension name="mass"/>
<dimension name="length" power="-1"/></unitType>
Then one could use that as the unit type:
<unit id="gramsPerMeter" multiplerToSI=".001" name="gramsPerMeter"
parentSI="KilogramsPerMeter" unitType="massPerLength",
abbreviation="g/m">
<description>Grams per meter</description></unit>
Note above we have also defined the conversion to the parent SI, since SI
base unit for mass is kilogram, not gram. I’m not sure if it is also
necessary for us to define the unit KilogramPerMeter, in this case?
<unit id="kilogramsPerMeter" name="kilogramsPerMeter"
unitType="massPerLength" abbreviation="kg/m">
<description>Kilograms per meter</description></unit>
Also, where does the unitType definition go in the EML/additionalMetadata?
--
Carl Boettiger
UC Santa Cruz
http://carlboettiger.info/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nceas.ucsb.edu/ecoinformatics/pipermail/eml-dev/attachments/20140723/8a0de897/attachment.html>
More information about the Eml-dev
mailing list