[GIS] get UnitedStates.gdb file

arcobjectsdata

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.

Best Answer

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.

Related Question