Skip to content

Commit

Permalink
#194 Created HSysProjectionEarth transTile method.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich2 committed Aug 16, 2022
1 parent d387b44 commit f0e9b3e
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Tiling/src/egrid/HSysProjectionEarth.scala
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ case class HSysProjectionEarth(gridSys: EGridSys, panel: Panel) extends HSysProj
transLineSegM3Arr(m3s)
}

def transLineSegM3Arr(inp: LineSegM3Arr): LineSegArr ={
val rotated = inp.fromLatLongFocus(focus)
def transLineSegM3Arr(inp: LineSegM3Arr): LineSegArr =
{ val rotated = inp.fromLatLongFocus(focus)
val visible = rotated.filter(_.zsPos)
visible.map(_.xyLineSeg(scale))
}
Expand All @@ -58,5 +58,13 @@ case class HSysProjectionEarth(gridSys: EGridSys, panel: Panel) extends HSysProj
opt.map(_ / scale)
}

def transTile(hc: HCen): Option[Polygon] = {
val p1 = hc.hVertPolygon.map(gridSys.hCoordLL(_)).toMetres3.fromLatLongFocus(focus)
//val m3 = gridSys.hCoordLL(hc).toMetres3
//val rotated = m3.fromLatLongFocus(focus)
val opt = ife(p1.vert(0).zPos, Some(p1.map(_.xy)), None)
opt.map(_.map(_ / scale))
}

override def hCoordOptStr(hc: HCoord): Option[String] = Some(gridSys.hCoordLL(hc).degStr)
}
}

0 comments on commit f0e9b3e

Please sign in to comment.