<div dir="ltr"><div><div><div><div><div><div><div><div><br></div><div>Hi all<br><br></div>Since parsing units from a string can be tricky, I have gone through all of the networks available via the fdsnstation web service and pulled the units out. Luckily, there are only 41 distinct strings as unit names. To aid in converting values, I have put together a csv file with three columns:<br>
1) unit name from the xml<br></div>2) my best guess at how to &quot;SI&quot; the unit (some are, um, nonstandard)<br></div>3) a &quot;description&quot; <br><br></div>The only case I found of a unit name meaning two things in two different channels was the symbol M which means &quot;meter&quot; in most places, but &quot;minute&quot; in a small number of channel responses. <br>
<br></div>The file is available here:<br><a href="http://code.google.com/p/seisfile/source/browse/src/main/resources/edu/sc/seis/seisFile/stationxml/units.convert">http://code.google.com/p/seisfile/source/browse/src/main/resources/edu/sc/seis/seisFile/stationxml/units.convert</a><br>
<br></div>The file is mostly ascii, except for the degree symbol  ° and the micro symbol µ. I am unsure if these are worth the non-ascii-ness or not. Maybe it is a unicode world, so they will be ok.<br><br></div>Not sure how useful this is, but at least gives a starting point should anyone else need to parse units out of stationXML. I will try to remember to update it periodically.<br>
<br></div>Philip<br></div>