geocoder icon indicating copy to clipboard operation
geocoder copied to clipboard

Build QGIS geocoder plugin

Open DenisCarriere opened this issue 10 years ago • 4 comments

DenisCarriere avatar Sep 07 '15 08:09 DenisCarriere

QGIS Field Calculator

Using the QGIS Field Calculator this will output WKT format.

Output Field

Output field name: wkt Output field type: Text, unlimited length (text)

Function Editor

import geocoder

@qgsfunction(group='Geocoder')
def geocode(location, feature, parent):
    g = geocoder.google(location)
    return g.wkt

Expression

Find the geocode expression in the Geocoder function list, the final result will look something like this:

geocode("address")  

Once the wkt field is added, you can then save your document as a CSV format and in the Layer Options define the GEOMETRY = AS_WKT.

DenisCarriere avatar Sep 10 '15 03:09 DenisCarriere

Great use of the custom expression functions in QGIS!

NathanW2 avatar Feb 10 '16 21:02 NathanW2

Thanks! It's a quick fix for geocoding

DenisCarriere avatar Feb 10 '16 22:02 DenisCarriere

@DenisCarriere @NathanW2

Hello, I'd like to create the custom function in QGIS 3.4, but how to install the library ??

I use OSGeo4W Network Installer on win 10 64b

thanks for any help

image

pigreco avatar Mar 16 '19 08:03 pigreco