Friday, 16 June 2017

pyqgis - Spatial Filter in Qgis Using Python



Is it possible to create buffer and get intersected features in Qgis using Python?


I did in ArcObjects.but i need the same in QGIS also.


Dim topo As ITopologicalOperator
topo = chkPoint
Dim sFc As ISpatialFilter = New SpatialFilter
With sFc

.Geometry = topo.Buffer(1000)
.GeometryField = "Shape"
.SpatialRel = esriSpatialRelIntersects
.WhereClause = "NAME = 'ROYAL'"
End With
pFcursor = pLayer.Search(sFc, False)
pFeature = pFcursor.NextFeature


No comments:

Post a Comment