...
Here is a working command line client written for Python 2.7.
If you download it and run it with no arguments, you will get the following usage argument:
Code Block | ||
---|---|---|
| ||
usage:
c:\temp\geocoding_client_dph.py
<host ip> <host port>
<input file path> <output file path>
<address column name> [zip code column name]
example command line:
python geocoding_client_dph.py eas.sfgov.org 80 c:/temp/input.csv c:/temp/output.csv Address Zip |
You must specify the host IP, host port, input file, output file name, name of the field containing addresses, and optionally the name of the field containing zip codes.
For <host IP>, you can run the client against the development (DEV), quality assurance (QA) or production (PROD) server... the production server is the most stable and is recommended.
Running the client against this input file will produce a file like this. The output file will contain your original data fields, plus 18 additional fields with elements converted from the json query result.
As documented above, each address query can return several match candidates and several parcels. The output file will contain a field called detailfields called match_input_row, match_candidate_row, and match_parcel_row that will help you decode these cases. The part of the number before the decimal point in the detail_row is the row in the input file that the query came from. Additional candidates returned are enumerated in the tenths column after the decimal point. Additional parcels returned are enumerated in the thousandths column. For example, detail_row 237.205 represents the fifth parcel of the second candidate returned for input row 237.
...