From 4533fc870bb6631cf08a20d0d0514f1d7ee457a0 Mon Sep 17 00:00:00 2001 From: changliao1025 Date: Tue, 18 Jul 2023 13:03:44 -0700 Subject: [PATCH] polygon bug fix --- pyflowline/mesh/mpas/create_mpas_mesh.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pyflowline/mesh/mpas/create_mpas_mesh.py b/pyflowline/mesh/mpas/create_mpas_mesh.py index f283a3d..54164a2 100644 --- a/pyflowline/mesh/mpas/create_mpas_mesh.py +++ b/pyflowline/mesh/mpas/create_mpas_mesh.py @@ -276,6 +276,13 @@ def add_cell_into_list(aList, i, lCellID, dArea,dElevation_mean,dElevation_profi aCoords[j,0] = x1 aCoords[j,1] = y1 pass + + x1 = convert_360_to_180(aLonVertex[0]) + y1 = aLatVertex[0] + ring.AddPoint(x1, y1) #double check + pPolygon = ogr.Geometry(ogr.wkbPolygon) + pPolygon.AddGeometry(ring) + if dLat < -60: iFlag = True else: