Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am doing this tutorial http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_geocode_a_single_address/00010000038r000000/

but it requires the following file: UnitedStates.gdb

I downloaded DataMaps10 from ESRI but I do not see any .gdb files.

share|improve this question
This question is still valid, where to download UnitedStates.gdb used in the samples. –  MathiasWestin Sep 8 '10 at 17:59
add comment

2 Answers

up vote 1 down vote accepted

I assumed that it would be in the same location as the downloaded maps from ESRI.

It's actually located here: C:\Program Files\ArcGIS\DeveloperKit10.0\Samples\data\Usa\USA.gdb

And gets installed when you install the VS2010 dev kit.

Too bad I can't create a GeoProcessor because when following this tutorial http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Creating_an_address_locator/0001000004pm000000/ The call to

IGeoProcessorResult result = GP.Execute(createAddressLocator, null); //fails

Inspecting the messages via GP.getMessages() yields

Failed to execute. Parameters are not valid.
ERROR 000039: Not enough reference data tables for this style.
Failed to execute (CreateAddressLocator).

After spending 100 years one the phone I've gotten the impression that in order to create an AddressLocator you just have to do the following

System.Object obj = Activator.CreateInstance(Type.GetTypeFromProgID("esriLocation.LocatorManager"));
ILocatorManager2 locatorManager2 = obj as ILocatorManager2;
ILocatorWorkspace locatorWorkspace = locatorManager2.GetLocatorWorkspaceFromPath(@"Z:\ESRI\DataMaps10\streetmap_na");
Address - Dual Ranges");
locator = locatorWorkspace.GetLocator("Street_Addresses_US");

With this code locator appears to be a valid object, however, I have not yet got it to do anything useful, at least it didn't throw a COM exception.

share|improve this answer
I got the same problem yesterday when trying the sample against the USA layer in the arcgis sdk samples data. –  MathiasWestin Sep 8 '10 at 16:38
nice to know I'm not crazy. :| –  patrick Sep 8 '10 at 16:52
@iterationx, I will have look at data in a minute, I think the probelm is that our data doesen't have the right table and column names.. –  MathiasWestin Sep 8 '10 at 16:56
The data in the folder C:\Program Files (x86)\ArcGIS\DeveloperKit10.0\Samples\data\Usa\USA.gdb don't have a US_Streets table. So I guess that why the geoprocessor is crashing on execute. –  MathiasWestin Sep 8 '10 at 17:25
@iterationx, I opened it in ArcEditor and looked at it in catalog pane. –  MathiasWestin Sep 9 '10 at 5:52
show 1 more comment

This is what you do

1) download the 3 ISO maps from the customer care site. Make sure you decompress in the correct directory.

2) You need to modify the sample somewhat, here's what you do:

and replacing this code :

  IWorkspaceFactory2 workspaceFactory = obj as IWorkspaceFactory2; IWorkspace workspace = workspaceFactory.OpenFromFile(@"C:\UnitedStates.gdb", 0); //THIS CAUSED ALL THE TROUBLE // 
    Get the Locator and QI to IAddressCandidates2 obj = 
            ILocatorManager locatorManager = obj as ILocatorManager2; 
    ILocatorWorkspace locatorWorkspace = locatorManager.GetLocatorWorkspace (workspace); ILocator locator = locatorWorkspace.GetLocator("USLocator");

   With this code

    System.Object obj = Activator.CreateInstance(Type.GetTypeFromProgID("esriLocation.LocatorManager"));
    ILocatorManager2 locatorManager2 = obj as ILocatorManager2; ILocatorWorkspace locatorWorkspace = locatorManager2.GetLocatorWorkspaceFromPath(@"Z:\ESRI\DataMaps10.doNotUse\streetmap_na\data");
    ILocator locator = locatorWorkspace.GetLocator("Street_Addresses_US");

//NOTICE : even tho the file name is Street_Addresses_US.loc, we *still* only open Street_Addresses_US 

And ignore all that crap about creating a locator.

If you are reading this in the future and you find this helpful, I'd better get upvotes since it took me like 5 days to get this info. :)

share|improve this answer
-1 your actually not answering the question you asked. –  MathiasWestin Sep 9 '10 at 19:57
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.