Skip to content

Commit

Permalink
Merge branch 'feature/raster_write_revision'
Browse files Browse the repository at this point in the history
  • Loading branch information
johntruckenbrodt committed Mar 2, 2022
2 parents c987857 + ef62cc8 commit c5e124c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions spatialist/vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,11 +804,13 @@ def boundary(vectorobject, expression=None, outname=None):
major = feat_major.GetGeometryRef()

boundary = major.Boundary()

longest = None
for line in boundary:
if (longest is None) or (line.Length() > longest.Length()):
longest = line
if boundary.GetGeometryName() == 'LINESTRING':
longest = boundary
else: # MULTILINESTRING
longest = None
for line in boundary:
if (longest is None) or (line.Length() > longest.Length()):
longest = line

points = longest.GetPoints()
ring = ogr.Geometry(ogr.wkbLinearRing)
Expand Down

0 comments on commit c5e124c

Please sign in to comment.