Skip to content

Commit fa1b250

Browse files
Add warning if entity is not covered by any boundary area
1 parent da9135f commit fa1b250

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/scala/edu/ie3/osmogrid/lv/region_coordinator/OsmoGridModelPartitioner.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ object OsmoGridModelPartitioner {
109109
case EntityAllocationStrategy.AssignByMax =>
110110
entityVotes
111111
.maxByOption(_._2)
112+
.foreach { case (areaKey, voteCount) =>
113+
if voteCount == 0 then
114+
logger warn s"Entity ${enhancedEntity.entity} is not covered by any given area " +
115+
s"(but is assigned to area $areaKey nonetheless)"
116+
}
112117
.map(_._1)
113118
.map(Iterable.single)
114119
.getOrElse(Iterable.empty)

0 commit comments

Comments
 (0)