ArcGis 10 locator address result unable to standardize

2300
4
02-01-2011 10:38 AM
brianrathburn
New Contributor
I have this piece of code for standardizing addresses that I pasted below. When using a locator created in 9.3 it works fine, when using a locator created in 10 is crashes on the last line. Have tried both a regular and a composite locator. Both fail in the same way.

ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Server);
pServerConnection = new GISServerConnectionClass();
pServerConnection.Connect(HostName);
pServerObjectManager = pServerConnection.ServerObjectManager;
pSvrCtx = pServerObjectManager.CreateServerContext(SvcName, "GeocodeServer");
pPropMods = (IPropertySet)pSvrCtx.CreateObject("esriSystem.PropertySet");
pAddrPropSet = (IPropertySet)pSvrCtx.CreateObject("esriSystem.PropertySet");
pAddrPropSet.SetProperty("Street", FullAddress); //Street appears to be a valid locator property
pGeocodeServer = pSvrCtx.ServerObject as IGeocodeServer;
pResult = pGeocodeServer.StandardizeAddress(pAddrPropSet, pPropMods);

It crashes on the last line with "Exception from HRESULT: 0x80040212" as the error.

Have not been able to find anything online about this error and everything works fine with 9.3 locators.

Any help or suggestions would be great.

Thanks
Brian
Tags (2)
0 Kudos
4 Replies
BradNiemand
Esri Regular Contributor
ArcGIS 10 locators don't support standardization.

Brad
0 Kudos
KimOllivier
Occasional Contributor III
This is very disappointing. I always standardize before geocoding to enable me to scan for global errors to be fixed before geocoding to improve the match rate, and even more important, to reduce false positives. I can populate missing fields from lookup tables, sort and scan for spelling mistakes, and diagnose reversed elements such as flat and street number.
So now I will have to reinvent a standardiser using regular expressions in Python?
It might therefore be a while before I switch to 10 locators.

Maybe someone clever could generate a regular expression parser from the XML lot definitions?

What do other geocoders do to pre-process the source tables?
0 Kudos
KarynBackus
New Contributor
Kim, I believe that ArcToolbox still has the Standardize Address tool available.  The standardized address output function is no longer a part of the address locator, but the tool can be used on your input addresses or on your matched/unmatched addresses independent of the geocoder.
0 Kudos
KimOllivier
Occasional Contributor III
Yes, I see it there, it is what I use in 9.3. Since 9.3 locators are supported at 10, I assumed that this was there to support previous locators. We have a custom standardiser for 9.3 and its not clear how to create a custom standardiser at 10. I will have to investigate further.

(I also see the help for it that you need an ArcInfo licence to use the standardiser, but the licence matrix contradicts that and has a tic for all licence levels.[ licence : noun, license:verb in English])
0 Kudos