Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for i in range(n_feats):
- feat = layer.GetFeature(i)
- # get start and end points of feature
- # get bounding box of feature
- layer.SetSpatialFilterRect(bbox[0], bbox[3], bbox[2], bbox[1])
- n_feats_select = layer.GetFeatureCount()
- for dummy_i in range(n_feats_select):
- feat_select = layer.GetNextFeature()
- # check if feature intersects with previously gotten start and end points
- # if they don't, feature has a dangle, do stuff
- layer.SetSpatialFilter(None)
Add Comment
Please, Sign In to add comment