Skip to content

Commit

Permalink
updated none level path fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jtgilbert authored and philipbaileynar committed Feb 1, 2024
1 parent 4c5ee10 commit e8dbf21
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/vbet/vbet/vbet.py
Original file line number Diff line number Diff line change
Expand Up @@ -904,9 +904,14 @@ def _tmtfinish():
for feat, *_ in lyr.iterate_features(write_layers=[lyr]):
key = feat.GetField('id')
if level_path_keys[key] is None:
for feat2, *_ in wblyr.iterate_features(clip_shape=feat.GetGeometryRef()):
if feat2 is None:
lyr.ogr_layer.DeleteFeature(feat.GetFID())
ft_env = feat.GetGeometryRef().GetEnvelope()
intersects = False
for feat2, *_ in wblyr.iterate_features(clip_rect=ft_env):
if feat2.GetGeometryRef().Intersects(feat.GetGeometryRef()):
intersects = True
break
if intersects is False:
lyr.ogr_layer.DeleteFeature(feat.GetFID())
feat2 = None
continue
feat.SetField(f'{unique_stream_field}', level_path_keys[key])
Expand Down

0 comments on commit e8dbf21

Please sign in to comment.