Advertisement
shubhamgoyal

Getting the ID of the polygon which circumscribes a point 2

Jun 2nd, 2013
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def findFeatureId(point):
  2.   feat = QgsFeature()
  3.   allAttrs = provider.attributeIndexes()
  4.   provider.select(allAttrs)
  5.   while provider.nextFeature(feat):
  6.     if feat.geometry().contains(point):
  7.       return feat.id()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement