Add threaded processor
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import qgis.core
|
||||
import qgis.gui
|
||||
#import qgis.core
|
||||
#import qgis.gui
|
||||
import re
|
||||
|
||||
#
|
||||
@@ -8,14 +8,14 @@ import re
|
||||
# or >1 suffix-letters, like 12th Street or 243rd Ave.
|
||||
#
|
||||
|
||||
@qgsfunction(args='auto', group='Custom', referenced_columns=[])
|
||||
# @qgsfunction(args='auto', group='Custom', referenced_columns=[])
|
||||
def getstreetfromaddress(value1, feature, parent):
|
||||
parts = value1.split()
|
||||
parts.pop(0) # Ignore the first bit (i.e. "123" in "123 N MAIN ST")
|
||||
parts = map(formatstreetname, parts)
|
||||
return " ".join(parts)
|
||||
|
||||
@qgsfunction(args='auto', group='Custom', referenced_columns=[])
|
||||
# @qgsfunction(args='auto', group='Custom', referenced_columns=[])
|
||||
def formatstreet(value1, feature, parent):
|
||||
parts = value1.split()
|
||||
# Handle the special case of a street name starting with "ST"
|
||||
@@ -34,13 +34,13 @@ def formatstreet(value1, feature, parent):
|
||||
return " ".join(parts)
|
||||
|
||||
|
||||
@qgsfunction(args='auto', group='Custom', referenced_columns=[])
|
||||
# @qgsfunction(args='auto', group='Custom', referenced_columns=[])
|
||||
def formatname(value1, feature, parent):
|
||||
parts = value1.split()
|
||||
parts = map(formatstreetname, parts)
|
||||
return " ".join(parts)
|
||||
|
||||
@qgsfunction(args='auto', group='Custom', referenced_columns=[])
|
||||
# @qgsfunction(args='auto', group='Custom', referenced_columns=[])
|
||||
def gethighwaytype(value1, feature, parent):
|
||||
match value1:
|
||||
case "ALLEY":
|
||||
|
||||
Reference in New Issue
Block a user