Skip to content

Commit e320742

Browse files
committed
fixed bug with not registering last polygon
1 parent 0ff44c1 commit e320742

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/geoslurp/plugins/dset/icedraindiv.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,14 @@ def IceSatPolygons(fname):
8181
#initialize a ring
8282
ring=ogr.Geometry(ogr.wkbLinearRing)
8383
ring.AddPoint(row[1],row[2])
84-
85-
84+
#return the last polygon
85+
poly=ogr.Geometry(ogr.wkbPolygon)
86+
poly.AddGeometry(ring)
87+
poly.FlattenTo2D()
88+
poly.CloseRings()
89+
meta={"basinid":row[0],"geom":WKBElement(poly.ExportToIsoWkb(),srid=4326)}
90+
91+
yield meta
8692

8793
class IceSatDDivBase(DataSet):
8894
"""Icesat Drainage divide table base"""

0 commit comments

Comments
 (0)