forked from LEOXINGU/lftools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlftools_provider.py
More file actions
257 lines (241 loc) · 12.5 KB
/
lftools_provider.py
File metadata and controls
257 lines (241 loc) · 12.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
# -*- coding: utf-8 -*-
"""
/***************************************************************************
LFTools
A QGIS plugin
Tools for cartographic production and spatial analysis.
Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
-------------------
begin : 2021-03-01
copyright : (C) 2021 by Leandro Franca
email : geoleandro.franca@gmail.com
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
"""
__author__ = 'Leandro Franca'
__date__ = '2021-02-18'
__copyright__ = '(C) 2021 by Leandro Franca'
# This will get replaced with a git SHA1 when you do a git archive
__revision__ = '$Format:%H$'
import os
from qgis.core import QgsProcessingProvider
from qgis.PyQt.QtGui import QIcon
from .processing_provider.Cart_inom2utm import Inom2utmGrid
from .processing_provider.Cart_coord2utm import Coord2UTMGrid
from .processing_provider.Cart_extent2utm import Extent2UTMGrid
from .processing_provider.Survey_closedPolygonal import ClosedPolygonal
from .processing_provider.Survey_Estimate3dCoord import Estimate3dCoord
from .processing_provider.Survey_coordTransf2D import CoordTransf2D
from .processing_provider.Survey_LocalTangentPlane import LocalTangentPlane
from .processing_provider.Survey_traverseAdjustment import TraverseAdjustment
from .processing_provider.Survey_azimuthDistance import AzimuthDistance
from .processing_provider.Stat_confidenceEllipse import ConfidenceEllipse
from .processing_provider.Stat_randomDist import RandomDist
from .processing_provider.Easy_coord2layer import CoordinatesToLayer
from .processing_provider.Easy_measures_layers import MeasureLayers
from .processing_provider.Rast_Bands2RGB import Bands2RGB
from .processing_provider.Rast_compressJPEG import CompressJPEG
from .processing_provider.Rast_createHolesInRaster import CreateHolesInRaster
from .processing_provider.Rast_defineNullCell import DefineNullCell
from .processing_provider.Rast_extractRasterBand import ExtractRasterBand
from .processing_provider.Rast_fillRasterwithPatches import FillRasterwithPatches
from .processing_provider.Rast_inventoryRaster import InventoryRaster
from .processing_provider.Rast_loadRasterByLocation import LoadRasterByLocation
from .processing_provider.Rast_mosaicRaster import MosaicRaster
from .processing_provider.Drone_removeAlphaBand import RemoveAlphaBand
from .processing_provider.Rast_rescaleTo8bits import RescaleTo8bits
from .processing_provider.Rast_supervisedClassification import SupervisedClassification
from .processing_provider.Drone_saveAsJPEG import SaveAsJPEG
from .processing_provider.Rast_binaryThresholding import BinaryThresholding
from .processing_provider.Reamb_ImportPhotos import ImportPhotos
from .processing_provider.Vect_DirectionalMerge import DirectionalMerge
from .processing_provider.Vect_ExtendLines import ExtendLines
from .processing_provider.Vect_PolygonAngles import CalculatePolygonAngles
from .processing_provider.Vect_reverseVertexOrder import ReverseVertexOrder
from .processing_provider.Vect_sequencePoints import SequencePoints
from .processing_provider.Doc_AreaPerimeter import AreaPerimterReport
from .processing_provider.Doc_DescriptiveMemorial import DescriptiveMemorial
from .processing_provider.Doc_MarkInformation import SurveyMarkDoc
from .processing_provider.Doc_DescriptiveTable import DescriptiveTable
from .processing_provider.Post_Restore import Restore
from .processing_provider.Post_Backup import Backup
from .processing_provider.Post_CloneDB import CloneDB
from .processing_provider.Post_DeleteDB import DeleteDB
from .processing_provider.Post_RenameDB import RenameDB
from .processing_provider.Post_ImportRaster import ImportRaster
from .processing_provider.Post_ChangeEnconding import ChangeEnconding
from .processing_provider.Drone_overviewsJPEG import OverviewsJPEG
from .processing_provider.Drone_GeorrefAdjust import GeorrefAdjust
from .processing_provider.Rast_getPointValue import GetPointValue
from .processing_provider.Drone_photosByBlocks import PhotosByBlocks
from .processing_provider.Drone_copySelectedPhotos import CopySelectedPhotos
from .processing_provider.Drone_copySelectedPhotos import CopySelectedPhotos
from .processing_provider.Drone_joinFolders import JoinFolders
from .processing_provider.Drone_createGCPfile import CreateGCPfile
from .processing_provider.Drone_verticalAdjustment import VerticalAdjustment
from .processing_provider.Relief_DEMfilter import DEMfilter
from .processing_provider.Relief_SpotElevation import SpotElevation
from .processing_provider.Cad_PolygonOrientation import PolygonOrientation
from .processing_provider.Easy_getAttributeByLocation import GetAttributeByLocation
from .processing_provider.Rast_bandArithmetic import BandArithmetic
from .processing_provider.Gnss_NMEA2layer import NMEA2layer
from .processing_provider.Reamb_ResizePhotos import ResizePhotos
from .processing_provider.Rast_rgb2hsv import RGB2HSV
from .processing_provider.Cad_GeoNumbering import GeoNumbering
from .processing_provider.Cad_FrontLotLine import FrontLotLine
from .processing_provider.Stat_centralTendency import CentralTendency
from .processing_provider.Doc_PointsFromText import PointsFromText
from .processing_provider.Cad_ConnectPolygons import ConnectFeatures
from .processing_provider.Gnss_pos2layer import Pos2layer
from .processing_provider.Gnss_StopAndGo import StopAndGo
from .processing_provider.Vect_LineSequence import LineSequence
from .processing_provider.Vect_PointsToPolygon import PointsToPolygon
from .processing_provider.Vect_LinesToPolygon import LinesToPolygon
from .processing_provider.Gnss_RTKCorrection import RTKCorrection
from .processing_provider.Stat_standardDistance import StandardDistance
from .processing_provider.Drone_PointCloudAdjust import PointCloudAdjust
from .processing_provider.Relief_DEM2txt import DEM2txt
from .processing_provider.Cad_AdjoinerLine import AdjoinerLine
from .processing_provider.Vect_Overlapping import Overlapping
from .processing_provider.Relief_DEMdifference import DEMdifference
from .processing_provider.Rast_ZonalStatistics import ZonalStatistics
from .processing_provider.Drone_PhotosHistogramMatch import PhotosHistogramMatch
from .processing_provider.Reamb_KmlPhotos import KmlPhotos
from .processing_provider.Rast_HistogramMatching import HistogramMatching
from .processing_provider.Rast_SplitRaster import SplitRaster
from .processing_provider.Stat_nearestPoints import NearestPoints
from .processing_provider.Vect_ConnectLayers import ConnectLayers
from .processing_provider.Cart_framesFromLines import FramesFromLines
from .processing_provider.Vect_CrossSections import CrossSections
from .processing_provider.Easy_exportASCII import ExportASCII
from .processing_provider.Doc_ValidateTopology import ValidateTopology
from .processing_provider.Vect_ReprojectGPKG import ReprojectGPKG
from .processing_provider.Relief_SetZfromDEM import SetZfromDEM
from .processing_provider.Easy_SelectByKeyAtt import SelectByKeyAtt
from .processing_provider.Drone_exportToCloudCompare import ExportToCloudCompare
class LFToolsProvider(QgsProcessingProvider):
def __init__(self):
"""
Default constructor.
"""
QgsProcessingProvider.__init__(self)
def unload(self):
"""
Unloads the provider. Any tear-down steps required by the provider
should be implemented here.
"""
pass
def loadAlgorithms(self):
self.addAlgorithm(Inom2utmGrid())
self.addAlgorithm(Coord2UTMGrid())
self.addAlgorithm(Extent2UTMGrid())
self.addAlgorithm(ClosedPolygonal())
self.addAlgorithm(Estimate3dCoord())
self.addAlgorithm(CoordTransf2D())
self.addAlgorithm(LocalTangentPlane())
self.addAlgorithm(TraverseAdjustment())
self.addAlgorithm(ConfidenceEllipse())
self.addAlgorithm(RandomDist())
self.addAlgorithm(CoordinatesToLayer())
self.addAlgorithm(MeasureLayers())
self.addAlgorithm(Bands2RGB())
self.addAlgorithm(CompressJPEG())
self.addAlgorithm(CreateHolesInRaster())
self.addAlgorithm(DefineNullCell())
self.addAlgorithm(ExtractRasterBand())
self.addAlgorithm(FillRasterwithPatches())
self.addAlgorithm(InventoryRaster())
self.addAlgorithm(LoadRasterByLocation())
self.addAlgorithm(MosaicRaster())
self.addAlgorithm(RemoveAlphaBand())
self.addAlgorithm(RescaleTo8bits())
self.addAlgorithm(SupervisedClassification())
self.addAlgorithm(ImportPhotos())
self.addAlgorithm(DirectionalMerge())
self.addAlgorithm(ExtendLines())
self.addAlgorithm(CalculatePolygonAngles())
self.addAlgorithm(ReverseVertexOrder())
self.addAlgorithm(SequencePoints())
self.addAlgorithm(AreaPerimterReport())
self.addAlgorithm(DescriptiveMemorial())
self.addAlgorithm(SurveyMarkDoc())
self.addAlgorithm(DescriptiveTable())
self.addAlgorithm(AzimuthDistance())
self.addAlgorithm(Restore())
self.addAlgorithm(Backup())
self.addAlgorithm(CloneDB())
self.addAlgorithm(DeleteDB())
self.addAlgorithm(RenameDB())
self.addAlgorithm(ImportRaster())
self.addAlgorithm(ChangeEnconding())
self.addAlgorithm(SaveAsJPEG())
self.addAlgorithm(BinaryThresholding())
self.addAlgorithm(OverviewsJPEG())
self.addAlgorithm(GeorrefAdjust())
self.addAlgorithm(GetPointValue())
self.addAlgorithm(PhotosByBlocks())
self.addAlgorithm(CopySelectedPhotos())
self.addAlgorithm(JoinFolders())
self.addAlgorithm(CreateGCPfile())
self.addAlgorithm(VerticalAdjustment())
self.addAlgorithm(DEMfilter())
self.addAlgorithm(SpotElevation())
self.addAlgorithm(PolygonOrientation())
self.addAlgorithm(GetAttributeByLocation())
self.addAlgorithm(BandArithmetic())
self.addAlgorithm(NMEA2layer())
self.addAlgorithm(ResizePhotos())
self.addAlgorithm(RGB2HSV())
self.addAlgorithm(GeoNumbering())
self.addAlgorithm(FrontLotLine())
self.addAlgorithm(CentralTendency())
self.addAlgorithm(PointsFromText())
self.addAlgorithm(ConnectFeatures())
self.addAlgorithm(Pos2layer())
self.addAlgorithm(StopAndGo())
self.addAlgorithm(LineSequence())
self.addAlgorithm(PointsToPolygon())
self.addAlgorithm(LinesToPolygon())
self.addAlgorithm(RTKCorrection())
self.addAlgorithm(StandardDistance())
self.addAlgorithm(PointCloudAdjust())
self.addAlgorithm(DEM2txt())
self.addAlgorithm(AdjoinerLine())
self.addAlgorithm(Overlapping())
self.addAlgorithm(DEMdifference())
self.addAlgorithm(ZonalStatistics())
self.addAlgorithm(PhotosHistogramMatch())
self.addAlgorithm(KmlPhotos())
self.addAlgorithm(HistogramMatching())
self.addAlgorithm(SplitRaster())
self.addAlgorithm(NearestPoints())
self.addAlgorithm(ConnectLayers())
self.addAlgorithm(FramesFromLines())
self.addAlgorithm(CrossSections())
self.addAlgorithm(ExportASCII())
self.addAlgorithm(ValidateTopology())
self.addAlgorithm(ReprojectGPKG())
self.addAlgorithm(SetZfromDEM())
self.addAlgorithm(SelectByKeyAtt())
self.addAlgorithm(ExportToCloudCompare())
def id(self):
return 'lftools'
def name(self):
return self.tr('LF Tools')
def icon(self):
return QIcon(os.path.dirname(__file__) + '/images/lftools.png')
def longName(self):
"""
Returns the a longer version of the provider name, which can include
extra details such as version numbers. E.g. "Lastools LIDAR tools
(version 2.2.1)". This string should be localised. The default
implementation returns the same string as name().
"""
return self.name()