Use Address Coder in Geoprocessing Python Scripting

611
1
04-13-2010 12:53 PM
PrashanthSukumaran
New Contributor II
Hi,

I am currently using the NorthAmerica Composite Geocoder to geocode the addresses in batch mode.  Is it possible to use the Address Coder instead.

If Yes, How do i specify the address coder in a python script as the geocoder.
Tags (2)
0 Kudos
1 Reply
ChrisRobben
New Contributor
Hi,

First, Address Coder is a program built on the same geocoder that is in ArcMAP. Second, Address Coder itself does not have an API that can be called. It does however have a command line mode that maybe you can use via a "shell" command. The following is taken from Address Coder's help file on the Command Line Feature:

[INDENT]Sometimes it is necessary to code a file without interaction from the user interface. Perhaps you require one program to start an Address Coder job running without interaction or you have a series of saved projects that need to be run automatically. This can be done by using a command line parameter.

Address Coder accepts one command line parameter, an Address Coder project file. Address Coder project files are created with the user interface. Set up a job the way you normally would, selecting the input and output files, data items, and reports. Click Save on the toolbar to create the .cpr file. This file can then be used during batch processing or from the command line.

Command line use has a form similar to the following: "c:\Program Files\ESRI\Address Coder\acoder.exe" "d:\My Projects\Project_01.cpr"

The parameter containing the .cpr file should always contain the full path. The .exe string and .cpr string should be enclosed in double quotes (" ") if they contain any spaces. If you have a number of projects, you can place a series of statements like the one above in a .bat file that can be executed from Start > Run or a command prompt.

Address Coder project files are text files that are in an .ini format, are easily edited with any text editor (for example, Notepad), and can be accessed programmatically if you need to generate a large number of project files.[/INDENT]

HTH