Guest User

Untitled

a guest
Dec 18th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. for i in range(n_feats):
  2. feat = layer.GetFeature(i)
  3. # get start and end points of feature
  4. # get bounding box of feature
  5.  
  6. layer.SetSpatialFilterRect(bbox[0], bbox[3], bbox[2], bbox[1])
  7. n_feats_select = layer.GetFeatureCount()
  8. for dummy_i in range(n_feats_select):
  9. feat_select = layer.GetNextFeature()
  10. # check if feature intersects with previously gotten start and end points
  11. # if they don't, feature has a dangle, do stuff
  12.  
  13. layer.SetSpatialFilter(None)
Add Comment
Please, Sign In to add comment