mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-10 00:04:23 -04:00
a batch geocoding algorithm from a QgsGeocoderInterface Example usage: # create a class which implements the QgsGeocoderInterface interface: class MyGeocoder(QgsGeocoderInterface): def geocodeString(self, string, context, feedback): # calculate and return results... my_geocoder = MyGeocoder() # create an algorithm which allows for batch geocoding operations using the custom geocoder interface # and implement the few required pure virtual methods class MyGeocoderAlgorithm(QgsBatchGeocodeAlgorithm): def __init__(self): super().__init__(my_geocoder) def displayName(self): return "My Geocoder" def name(self): return "my_geocoder_alg" def createInstance(self): return MyGeocoderAlgorithm() # optionally, the group(), groupId(), tags(), shortHelpString() and other metadata style methods can be overridden and customized: def tags(self): return 'geocode,my service,batch'