[GIS] US One Address locator style missing city, state and zip code fields

arcgis-10.0arcgis-enginecgeocoding

I am using the file:
C:\Program Files\ArcGIS\Desktop10.0\Locators\US One Address.lot

To do address resolution on a parcel / polygon layer. I'm trying to understand why the file doesn't contain city, state or zip code fields. It only contains:

{ HouseNum, PreDir, PreType, StreetName, StreetType, SufDir }.  

MWrenn suggested I try the locator named "US One Address with Zone" and map city to zone. This technique works, but the results omit state and zip code. How can I get city, state, and zip code as a "US One Address" locator?

ArcEngine 10, C#, VS2010

Also posted here:
http://forums.arcgis.com/threads/25632-Why-doesn-t-US-One-Address-locator-style-have-city-state-or-zip-code-fields?p=84515


Edit:
Sean made the point that

"Having an address and ZIP code is
sufficient to geocode the address"

which I don't take issue with, but maybe I didn't properly explain why I want City, State, Zip…

If the address is not found in the search and address candidates are found, I open a window which allows the user to select which address they want. Unsurprisingly, the client wants a regular looking address with house number street name, city, state, zip.

Here is how I fetch addresses:

IArray resultsArray = addressCandidates.FindAddressCandidates(addressProperties);
IFields candidateFields = addressCandidates.CandidateFields;

for (int candidateIndex = 0; candidateIndex < resultsArray.Count; candidateIndex++)
{
ClosestAddressResults thisResult = new ClosestAddressResults(); 
candidatePropertySet = resultsArray.get_Element(candidateIndex) as IPropertySet2;

List<string> dataAvailableToDisplay = new List<string>(); 
for (int fieldIndex = 0; fieldIndex < candidateFields.FieldCount; fieldIndex++)
{
  addressField = candidateFields.get_Field(fieldIndex);
  dataAvailableToDisplay.add(addressField.AliasName + " " + candidatePropertySet.GetProperty(addressField.Name)); 
}

The list looks like this:

Shape System.__ComObject
Score 66
HouseNum 104
PreDir 
PreType 
StreetName 1ST
StreetType ST
SufDir 
Zone 56441
Match_addr 104 1ST ST, 56441

In this case I mapped Zip to Zone. If I had mapped City to Zone, I would get the city name back. Because I am allowing the user to select an address in a window I want to display the addresses with all the data, but since only Zone comes back, I'm having a difficult time figuring out how to get it.

Right now my workaround is may City to Zone. Then for each address match, get the IPoint, for each IPoint, run it through a find closest address function, with Zone mapped to Zip, grab the Zip code, and concatenate the results. And of course I could do this for state too. The problem with my workaround even though technically it works, is that its pretty slow. So any ideas whatsoever are appreciated.

Best Answer

If you have a mix of different address types, you might consider making a composite locator where each contained locator interprets Zone differently.

Related Question