mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add support for max and mean depths for CSV import
Add support of importing max and mean depths from DC header information. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
parent
4a5b40c144
commit
5046fa34a4
1 changed files with 31 additions and 0 deletions
|
@ -31,6 +31,8 @@
|
|||
<xsl:param name="Firmware" select="Firmware"/>
|
||||
<xsl:param name="Serial" select="Serial"/>
|
||||
<xsl:param name="GF" select="GF"/>
|
||||
<xsl:param name="maxDepth" select="maxDepth"/>
|
||||
<xsl:param name="meanDepth" select="meanDepth"/>
|
||||
<xsl:output method="xml" indent="yes"/>
|
||||
|
||||
<xsl:variable name="lf"><xsl:text>
|
||||
|
@ -189,6 +191,35 @@
|
|||
</extradata>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="string-length($maxDepth) > 0 or string-length($meanDepth) > 0">
|
||||
<depth>
|
||||
<xsl:if test="string-length($maxDepth) > 0">
|
||||
<xsl:attribute name="max">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$units = 0">
|
||||
<xsl:value-of select="translate($maxDepth, ',', '.')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="round(translate(translate($maxDepth, translate($maxDepth, '0123456789,.', ''), ''), ',', '.') * 0.3048 * 1000) div 1000"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:if test="string-length($meanDepth) > 0">
|
||||
<xsl:attribute name="mean">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$units = 0">
|
||||
<xsl:value-of select="translate($meanDepth, ',', '.')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="round(translate(translate($meanDepth, translate($meanDepth, '0123456789,.', ''), ''), ',', '.') * 0.3048 * 1000) div 1000"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
</depth>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:call-template name="printLine">
|
||||
<xsl:with-param name="line" select="substring-before(//csv, $lf)"/>
|
||||
<xsl:with-param name="lineno" select="'1'"/>
|
||||
|
|
Loading…
Add table
Reference in a new issue