Geocoding a table with ArcGIS Online tasks via stand alone Arcobjects project

598
6
06-23-2012 08:09 AM
GregoryRoss
New Contributor II
Does anyone know if you can still geocode a table of addresses using the ArcGIS Online task server with the realease of 10.1 or does batch geocoding via Arcobjects outside of an ArcMap session require a subscription to ArcGIS Online?

My Arcobject batch geocoding calls using the ArcGIS 10 style North American Address Locator (TA_Address_NA_10) are now only returning records with an accuracy of postal codes...
Tags (2)
0 Kudos
6 Replies
VivekGupta
New Contributor
Does anyone know if you can still geocode a table of addresses using the ArcGIS Online task server with the realease of 10.1 or does batch geocoding via Arcobjects outside of an ArcMap session require a subscription to ArcGIS Online?

My Arcobject batch geocoding calls using the ArcGIS 10 style North American Address Locator (TA_Address_NA_10) are now only returning records with an accuracy of postal codes...


Could you make sure that the input fields are mapped correctly? Also provide the Server URL Connection information so that we could try and replicate this issue.
0 Kudos
GregoryRoss
New Contributor II
Could you make sure that the input fields are mapped correctly? Also provide the Server URL Connection information so that we could try and replicate this issue.


Thanks for the response.

The input table is a Sql Sever view accessed through an ArcSDE direct connection. It contains 6 fields (CustomerID - int, Address - nvarchar(255), City- nvarchar(255), State- nvarchar(255), Zip - nvarchar(255), MarkforGeocoding - bit).

The geocoding results work fine using the ArcMap interface or the Geocode Addresses tool via ArcToolbox, though I do notice that the tool fails to automatically map to the address field and I have to manually select it. It maps to the city, state, and zip fields just fine.

When accessing the GeocodeAddresses tool via ArcObjects it fails to return anything better than a city location. Here is my code:

            Dim geocodeAddresses As ESRI.ArcGIS.GeocodingTools.GeocodeAddresses = New ESRI.ArcGIS.GeocodingTools.GeocodeAddresses()
            geocodeAddresses.in_table = "Database Connections\GIS - DEFAULT.sde\IRMCD.GIS.CustomersNeedingGeocoding" 'SQL Server View that identifies Customers needing geocoding by looking at MarkedforGeocoding field.
            geocodeAddresses.address_locator = "GIS Servers\arcgis on tasks.arcgisonline.com\Locators\TA_Address_NA_10.GeocodeServer"
            geocodeAddresses.in_address_fields = "Address Address VISIBLE NONE;" & "City City VISIBLE NONE;" & "State State VISIBLE NONE;" & "ZIP ZIP VISIBLE NONE"
            geocodeAddresses.out_feature_class = "Database Connections\GIS - DEFAULT.sde\IRMCD.GIS.IRMCDGISData\IRMCD.GIS.GeocodingCustomersResults" 'FC that holds geocoding results from ARCGISOnline
            geocodeAddresses.out_relationship_type = "STATIC"
            RunTool(GP, geocodeAddresses, Nothing)   ' Process: GeocodeAddresses...

I thought perhaps I have a corruption issue with my address field...however, if I use the TA_Address_NA.GeocodeServer, the geocoding works fine. Also, this code worked fine as recently as two weeks ago...
0 Kudos
VivekGupta
New Contributor
Thanks for the response.

The input table is a Sql Sever view accessed through an ArcSDE direct connection. It contains 6 fields (CustomerID - int, Address - nvarchar(255), City- nvarchar(255), State- nvarchar(255), Zip - nvarchar(255), MarkforGeocoding - bit).

The geocoding results work fine using the ArcMap interface or the Geocode Addresses tool via ArcToolbox, though I do notice that the tool fails to automatically map to the address field and I have to manually select it. It maps to the city, state, and zip fields just fine.

When accessing the GeocodeAddresses tool via ArcObjects it fails to return anything better than a city location. Here is my code:

            Dim geocodeAddresses As ESRI.ArcGIS.GeocodingTools.GeocodeAddresses = New ESRI.ArcGIS.GeocodingTools.GeocodeAddresses()
            geocodeAddresses.in_table = "Database Connections\GIS - DEFAULT.sde\IRMCD.GIS.CustomersNeedingGeocoding" 'SQL Server View that identifies Customers needing geocoding by looking at MarkedforGeocoding field.
            geocodeAddresses.address_locator = "GIS Servers\arcgis on tasks.arcgisonline.com\Locators\TA_Address_NA_10.GeocodeServer"
            geocodeAddresses.in_address_fields = "Address Address VISIBLE NONE;" & "City City VISIBLE NONE;" & "State State VISIBLE NONE;" & "ZIP ZIP VISIBLE NONE"
            geocodeAddresses.out_feature_class = "Database Connections\GIS - DEFAULT.sde\IRMCD.GIS.IRMCDGISData\IRMCD.GIS.GeocodingCustomersResults" 'FC that holds geocoding results from ARCGISOnline
            geocodeAddresses.out_relationship_type = "STATIC"
            RunTool(GP, geocodeAddresses, Nothing)   ' Process: GeocodeAddresses...

I thought perhaps I have a corruption issue with my address field...however, if I use the TA_Address_NA.GeocodeServer, the geocoding works fine. Also, this code worked fine as recently as two weeks ago...


We tried to replicate but everything works fine. I would check if the view has the right field name. If ArcMap fails to map the Address field then there is something in the input table or the view that's not correct.
0 Kudos
GregoryRoss
New Contributor II
OK, I have been doing some testing under the assumption that the ADDRESS field has some corruption, but that really doesn't seem to be the problem.

To clarify, I am running ArcGIS 10 SP3.

I created new tables in 3 different formats: FGDB, PGDB, and SDE (SQL Server) with the following fields: ID, Address, City, State, Zip and tested them all with no data and some test data.

If I run the Geocode Adresses tool, either from the geocoding toolbar or the toolbox, AND I select the tasks.arcgisonline.com\Locators\TA_Address_NA_10.GeocodeServer (ArcGIS 10) as my locator, the tool fails to recognize the ADDRESS field.

If I run the Geocode Adresses tool, either from the geocoding toolbar or the toolbox, AND I select the tasks.arcgisonline.com\Locators\TA_Address_NA.GeocodeServer (ArcGIS 9.3.1) as my locator, the tool successfully recognizes the ADDRESS field.

See attachments.

[ATTACH=CONFIG]15520[/ATTACH]
[ATTACH=CONFIG]15521[/ATTACH]

If I try to run the ArcToolbox Geocode Adresses tool via ArcObjects AND use the TA_Address_NA_10 GeocodeServer, it also fails in that it only returns CITY locations. I am assuming it is failing to pick up the ADDRESS field even if I map the fields.

I am starting to believe that this is not an ArcGIS Online issue and more of an issue with my ArcGIS installation. This problem was not present about two weeks ago. Also, in that time, I have started having trouble reading layer packages within ArcGIS Explorer unless they are created with 9.3.1 data formats included. My next step will be to try on a different machine.
0 Kudos
GregoryRoss
New Contributor II
I have verified that I have this problem on 2 other computers, all running ArcGIS 10 SP3. Can anyone duplicate this problem?
0 Kudos
VivekGupta
New Contributor
I have verified that I have this problem on 2 other computers, all running ArcGIS 10 SP3. Can anyone duplicate this problem?


Can you rename the Address field to Street in your input table? The other perfect solution for now would be to change the code to map to both Address or Street.
0 Kudos