mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Visibility scaling for UDDF import
Visibility is defined in meters in UDDF and we use scale up to 5 stars. Thus the meters are scaled to our star rating using one-size-fits all method. < 1m => 1 star <= 3m => 2 star <= 5m => 3 star <= 10m => 4 star > 10m => 5 star Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
72d0030509
commit
9066c8bad6
1 changed files with 17 additions and 1 deletions
|
@ -128,7 +128,23 @@
|
|||
|
||||
<xsl:if test="condition/visibility != '' and condition/visibility != 0">
|
||||
<xsl:attribute name="visibility">
|
||||
<xsl:value-of select="condition/visibility"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="condition/visibility < 1">
|
||||
<xsl:value-of select="1"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="condition/visibility <= 3">
|
||||
<xsl:value-of select="2"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="condition/visibility <= 5">
|
||||
<xsl:value-of select="3"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="condition/visibility <= 10">
|
||||
<xsl:value-of select="4"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="5"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
|
||||
|
|
Loading…
Reference in a new issue