Skip to content

Commit 2e16ae4

Browse files
committed
More refactoring
1 parent 573bd05 commit 2e16ae4

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

geocss/src/main/scala/Translator.scala

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ class Translator(val baseURL: Option[java.net.URL]) {
610610
val zGroups: Seq[((Double, Option[OGCExpression]), (Rule, Seq[gt.Symbolizer]))] =
611611
for {
612612
rule <- cascading2exclusive(overlays)
613-
(z, syms) <- groupByZ(symbolize(rule))
613+
(z, syms) <- orderedRuns(symbolize(rule))
614614
} yield ((z, None), (rule, syms))
615615

616616
// In order to ensure minimal output, the conversion requires that like
@@ -696,18 +696,6 @@ class Translator(val baseURL: Option[java.net.URL]) {
696696
private def orderedRuns[K : Ordering, V] (xs: Seq[(K, V)]) : Seq[(K, Seq[V])] =
697697
runs(xs sortBy(_._1))
698698

699-
private def groupByZ(syms: Seq[(Double, Symbolizer)])
700-
: Seq[(Double, Seq[Symbolizer])] = {
701-
// we make a special case for labels; they will be rendered last anyway, so
702-
// we can fold them into one layer
703-
val (labels, symbols) = syms partition { _.isInstanceOf[TextSymbolizer] }
704-
val grouped =
705-
for {
706-
(z, syms) <- symbols.groupBy(_._1).toSeq.sortBy(_._1)
707-
} yield (z, syms map (_._2))
708-
grouped ++ Seq((0d, labels map (_._2)))
709-
}
710-
711699
/**
712700
* Given a list, generate all possible groupings of the contents of that list
713701
* into two sublists. The sublists preserve the ordering of the original

0 commit comments

Comments
 (0)