feat: remove projection from grid(s), now in archmesiter
This commit is contained in:
11
src/Fvcom.fs
11
src/Fvcom.fs
@@ -5,7 +5,6 @@ module Oceanbox.FvcomKit.Fvcom
|
||||
open System
|
||||
open Microsoft.Research.Science.Data
|
||||
open FSharpPlus
|
||||
open ProjNet.FSharp
|
||||
open Serilog
|
||||
open Grid
|
||||
|
||||
@@ -19,7 +18,6 @@ type FvcomGrid =
|
||||
Siglay: single [,]
|
||||
SiglayCenter: single [,]
|
||||
Siglev: single [,]
|
||||
Proj: Projection
|
||||
}
|
||||
interface IGrid with
|
||||
member x.getVertex n = x.Nodes[n]
|
||||
@@ -30,7 +28,6 @@ type FvcomGrid =
|
||||
member x.getVertices() = x.Nodes
|
||||
member x.getCells() = x.Elem
|
||||
member x.getBoundingBox() = x.BBox
|
||||
member x.Projection = x.Proj
|
||||
static member empty =
|
||||
{
|
||||
Elem = Array.empty
|
||||
@@ -41,14 +38,12 @@ type FvcomGrid =
|
||||
Siglay = Array2D.zeroCreate 0 0
|
||||
SiglayCenter = Array2D.zeroCreate 0 0
|
||||
Siglev = Array2D.zeroCreate 0 0
|
||||
Proj = WebMercator
|
||||
}
|
||||
member this.ToGrid() =
|
||||
{
|
||||
Elem = this.Elem
|
||||
Nodes = this.Nodes
|
||||
BBox = this.BBox
|
||||
Proj = this.Proj
|
||||
}
|
||||
|
||||
let getNumFrames (ds: DataSet) =
|
||||
@@ -552,11 +547,6 @@ let getGrid (ds: DataSet) : FvcomGrid =
|
||||
|> Array.map (fun (a, b, c) -> a - 1, b - 1, c - 1)
|
||||
let nds = Array.zip x y
|
||||
let cells = Array.zip xc yc
|
||||
let proj =
|
||||
try
|
||||
ds.Metadata["CoordinateProjection"] :?> string
|
||||
with
|
||||
| _ -> ""
|
||||
{
|
||||
Elem = elem
|
||||
Nodes = nds
|
||||
@@ -566,7 +556,6 @@ let getGrid (ds: DataSet) : FvcomGrid =
|
||||
Siglay = siglay
|
||||
SiglayCenter = siglay_c
|
||||
Siglev = siglev
|
||||
Proj = Projection.FromString proj
|
||||
}
|
||||
with
|
||||
| e ->
|
||||
|
||||
@@ -48,14 +48,12 @@ type IGrid =
|
||||
abstract getVertices: unit -> Vertex []
|
||||
abstract getCells: unit -> Cell []
|
||||
abstract getBoundingBox: unit -> BBox
|
||||
abstract Projection: Projection
|
||||
|
||||
type Grid =
|
||||
{
|
||||
Elem: Elem array
|
||||
Nodes: Node array
|
||||
BBox: BBox
|
||||
Proj: Projection
|
||||
}
|
||||
interface IGrid with
|
||||
member x.getVertex n = x.Nodes[n]
|
||||
@@ -66,13 +64,11 @@ type Grid =
|
||||
member x.getVertices() = x.Nodes
|
||||
member x.getCells() = x.Elem
|
||||
member x.getBoundingBox() = x.BBox
|
||||
member x.Projection = x.Proj
|
||||
static member empty =
|
||||
{
|
||||
Elem = Array.empty
|
||||
Nodes = Array.empty
|
||||
BBox = BBox.empty
|
||||
Proj = WebMercator
|
||||
}
|
||||
|
||||
type ElemsAroundNode = Map<NodeIdx, ElemIdx []>
|
||||
@@ -519,7 +515,6 @@ type ExtendedGrid(grid: IGrid) =
|
||||
member x.getVertices() = grid.getVertices ()
|
||||
member x.getCells() = grid.getCells ()
|
||||
member x.getBoundingBox() = grid.getBoundingBox ()
|
||||
member x.Projection = grid.Projection
|
||||
|
||||
member x.NeighborIndex = neighborIndex
|
||||
member x.NodeTree = nodeTree
|
||||
|
||||
Reference in New Issue
Block a user