43
43
import doIntersectLines , doSelectByLocation , doVectorSplit , doMeanCoords
44
44
import doPointDistance , doPointsInPolygon , doRandom , doRandPoints , doRegPoints
45
45
import doSpatialJoin , doSubsetSelect , doSumLines , doVectorGrid , doMergeShapes
46
- import doValidate , doSimplify , doDefineProj , doSpatialIndex
46
+ import doValidate , doSimplify , doDefineProj , doSpatialIndex , doEliminate
47
47
48
48
class fToolsPlugin :
49
49
def __init__ (self ,iface ):
@@ -94,6 +94,7 @@ def updateThemeIcons(self, theme):
94
94
self .clip .setIcon (QIcon (self .getThemeIcon ("clip.png" )))
95
95
self .dissolve .setIcon (QIcon (self .getThemeIcon ("dissolve.png" )))
96
96
self .erase .setIcon (QIcon (self .getThemeIcon ("difference.png" )))
97
+ self .eliminate .setIcon (QIcon (self .getThemeIcon ("eliminate.png" )))
97
98
98
99
self .conversionMenu .setIcon (QIcon (self .getThemeIcon ("geometry.png" )))
99
100
self .compGeo .setIcon (QIcon (self .getThemeIcon ("export_geometry.png" )))
@@ -134,7 +135,7 @@ def initGui(self):
134
135
self .meanCoords = QAction (QCoreApplication .translate ("fTools" , "Mean coordinate(s)" ),self .iface .mainWindow ())
135
136
self .intLines = QAction (QCoreApplication .translate ("fTools" , "Line intersections" ) ,self .iface .mainWindow ())
136
137
self .analysisMenu .addActions ([self .distMatrix , self .sumLines , self .pointsPoly ,
137
- self .listUnique , self .compStats , self .nearestNeigh , self .meanCoords , self .intLines ])
138
+ self .listUnique , self .compStats , self .nearestNeigh , self .meanCoords , self .intLines ])
138
139
139
140
self .researchMenu = QMenu (QCoreApplication .translate ("fTools" , "&Research Tools" ))
140
141
self .randSel = QAction (QCoreApplication .translate ("fTools" , "Random selection" ),self .iface .mainWindow ())
@@ -145,7 +146,7 @@ def initGui(self):
145
146
self .selectLocation = QAction (QCoreApplication .translate ("fTools" , "Select by location" ), self .iface .mainWindow ())
146
147
self .layerExtent = QAction (QCoreApplication .translate ("fTools" , "Polygon from layer extent" ), self .iface .mainWindow ())
147
148
self .researchMenu .addActions ([self .randSel , self .randSub , self .randPoints ,
148
- self .regPoints , self .vectGrid , self .selectLocation , self .layerExtent ])
149
+ self .regPoints , self .vectGrid , self .selectLocation , self .layerExtent ])
149
150
150
151
self .geoMenu = QMenu (QCoreApplication .translate ("fTools" , "&Geoprocessing Tools" ))
151
152
self .minConvex = QAction (QCoreApplication .translate ("fTools" , "Convex hull(s)" ),self .iface .mainWindow ())
@@ -156,8 +157,10 @@ def initGui(self):
156
157
self .clip = QAction (QCoreApplication .translate ("fTools" , "Clip" ),self .iface .mainWindow ())
157
158
self .dissolve = QAction (QCoreApplication .translate ("fTools" , "Dissolve" ),self .iface .mainWindow ())
158
159
self .erase = QAction (QCoreApplication .translate ("fTools" , "Difference" ),self .iface .mainWindow ())
160
+ self .eliminate = QAction ( QCoreApplication .translate ( "fTools" , "Eliminate sliver polygons" ),self .iface .mainWindow () )
159
161
self .geoMenu .addActions ([self .minConvex , self .dynaBuffer , self .intersect ,
160
- self .union , self .symDifference , self .clip , self .erase , self .dissolve ])
162
+ self .union , self .symDifference , self .clip , self .erase , self .dissolve ,
163
+ self .eliminate ])
161
164
162
165
self .conversionMenu = QMenu (QCoreApplication .translate ("fTools" , "G&eometry Tools" ))
163
166
self .compGeo = QAction (QCoreApplication .translate ("fTools" , "Export/Add geometry columns" ),self .iface .mainWindow ())
@@ -173,8 +176,8 @@ def initGui(self):
173
176
self .polysToLines = QAction (QCoreApplication .translate ("fTools" , "Polygons to lines" ),self .iface .mainWindow ())
174
177
self .linesToPolys = QAction (QCoreApplication .translate ("fTools" , "Lines to polygons" ),self .iface .mainWindow ())
175
178
self .conversionMenu .addActions ([self .checkGeom , self .compGeo , self .centroids , self .delaunay , self .voronoi ,
176
- self .simplify , self .densify , self .multiToSingle , self .singleToMulti , self .polysToLines , self .linesToPolys ,
177
- self .extNodes ])
179
+ self .simplify , self .densify , self .multiToSingle , self .singleToMulti , self .polysToLines , self .linesToPolys ,
180
+ self .extNodes ])
178
181
179
182
self .dataManageMenu = QMenu (QCoreApplication .translate ("fTools" , "&Data Management Tools" ))
180
183
self .define = QAction (QCoreApplication .translate ("fTools" , "Define current projection" ), self .iface .mainWindow ())
@@ -183,6 +186,7 @@ def initGui(self):
183
186
self .mergeShapes = QAction (QCoreApplication .translate ("fTools" , "Merge shapefiles to one" ), self .iface .mainWindow ())
184
187
self .spatialIndex = QAction (QCoreApplication .translate ("fTools" , "Create spatial index" ), self .iface .mainWindow ())
185
188
self .dataManageMenu .addActions ([self .define , self .spatJoin , self .splitVect , self .mergeShapes , self .spatialIndex ])
189
+
186
190
self .updateThemeIcons ("theme" )
187
191
188
192
self .tmpAct = QAction ( self .iface .mainWindow () )
@@ -220,6 +224,7 @@ def initGui(self):
220
224
QObject .connect (self .union , SIGNAL ("triggered()" ), self .dounion )
221
225
QObject .connect (self .clip , SIGNAL ("triggered()" ), self .doclip )
222
226
QObject .connect (self .dynaBuffer , SIGNAL ("triggered()" ), self .dodynaBuffer )
227
+ QObject .connect (self .eliminate , SIGNAL ("triggered()" ), self .doEliminate )
223
228
224
229
QObject .connect (self .multiToSingle , SIGNAL ("triggered()" ), self .domultiToSingle )
225
230
QObject .connect (self .singleToMulti , SIGNAL ("triggered()" ), self .dosingleToMulti )
@@ -416,3 +421,7 @@ def doSpatIndex(self):
416
421
d = doSpatialIndex .Dialog (self .iface )
417
422
d .show ()
418
423
d .exec_ ()
424
+
425
+ def doEliminate (self ):
426
+ d = doEliminate .Dialog (self .iface )
427
+ d .exec_ ()
0 commit comments