Geocoder requires City to find a match

2699
20
Jump to solution
08-12-2019 02:53 PM
PhilLarkin1
Occasional Contributor III

When using geocoders on 10.7 (Point Address, Street Address) I'm unable to find a match if the City field is not populated. When used in ArcGIS Pro 2.4, the city field is not required and I get good returns. 

Has anyone else noticed this issue?

Shana Britt

Tags (2)
0 Kudos
20 Replies
EricAnderson17
Occasional Contributor

Got it, thank you for the clarification Phil! I'm seeing the same thing on my end with a Point Address locator I created in Pro 2.4 and published to Enterprise 10.7.1. 

 

What's odd is if you bring that geocode service into ArcGIS Pro (Catalog pane > Portal tab), it behaves the same way as the local locator and allows you to search for the address without a city. So it seems like only when submitting a request directly from the REST end-point of the service is the city name required. 

 

From what I can tell from Fiddler, the difference is that the request from ArcGIS Pro includes a "location" parameter, while the request from REST does not (unless of course you specifically include one). If I take the "location" parameter and simply include that onto the REST request, it is successful. 

 

I'd say we have enough here to investigate this a little more thoroughly and I would definitely recommend following up with that Support case. If you want to reference this GeoNet post, I'd be happy to link up with the analyst who takes ownership and pass on my testing notes.

 

Best regards,

Eric

0 Kudos
EricAnderson17
Occasional Contributor

Hi Phil,

To expand on my previous message, looking at more information about the "location" parameter (documentation is for the World Gecoding Service, but the principles are the same), I see this following note:

The location parameter can be used in place of administrative zone (city) or postal code in an address search, as long as a matching address exists within 50 kilometers of the input location. Consider the following example.

  • 251 Vesey St, New York, 10282 is an address in Manhattan, New York City.
  • Coordinates -74.006,40.71437 represent a point within central Manhattan, less than one kilometer away from the address.

If you search for "251 Vesey St"(no city or postal) with location=-74.006,40.71437included in the request, a match to 251 Vesey St, New York, 10282 is returned. However, if instead you search for"251 Vesey St" with a location value in Washington, DC (350 kilometers away) an address match is not returned.

findAddressCandidates—ArcGIS REST API: World Geocoding Service | ArcGIS for Developers 

So because ArcGIS Pro is including this location parameter, the city name is not required. Therefore, this may be expected behavior but it may be good to still log that Support case so we can confirm fully and document this for future users who may have this same question/issue. 

Best regards,

Eric

0 Kudos
JoeBorgione
MVP Emeritus

Eric: you better get some snickers bars stocked up.... 

That should just about do it....
PhilLarkin1
Occasional Contributor III

Well, the answer back from Support is one that has been given since at least 10.1:

  • Modify the loc file to include: supportsOptionalZone = true

Manually editing a file is kludgy. I'd really like to see: 

  1. Locator properties exposed in arcpy
  2. Locator properties exposed in the UI for Create Locator and Create Address Locator tools in ArcMap/Pro. 
  3. Snickers bars mailed out to all the users that test new products extensively and version after version ask for the same enhancements/bug fixes. 

Thanks for your help Eric and Joe.

EricAnderson17
Occasional Contributor

Thanks for following up and closing the loop on this one Phil.

From what we found, by default you need either an admin zone (city, state, postal code), a location parameter, or an extent to return a successful match. For the new locators (those built with the Create Locator tool), if you build the locator without zones, a property will automatically get added to your locator and set to true (supportsOptionalZone = true). This property is not exposed in the properties UI currently but can be manually added to the locator *.loc file as you stated above (simply edit with Notepad and add that "supportsOptionalZone = true" line to the bottom). 

We're going to work on making sure we get an enhancement logged so this setting will be exposed through the UI so the manual change to the *.loc file would not be necessary. Having this property exposed through Python is also a great suggestion. I'll follow up about the Snickers bars 🙂

Thanks for the discussions on this and helping us improve the product!

-Eric

PhilLarkin1
Occasional Contributor III

To Clarify:

if you build the locator without zones

Zone preference is simply not exposed in CreateLocator. This is not something a user can affect when running the tool. 

a property will automatically get added to your locator and set to true (supportsOptionalZone = true)

When a locator is built the property is not written to the loc file in Pro at 2.4. Why would it need to be written to the file if it wasn't there already? The instruction would have been, in my case, to flip this to false. Instead I need to add the entire property to the file every time I build the locator.

It is odd, and a bit frustrating, for these hidden properties to not be documented and available in the UI and arcpy. 


Thanks again.

0 Kudos
EricAnderson17
Occasional Contributor

Hi Phil,

By "if you build the locator without zones", I meant if you run the Create Locator tool without specifying any zonal fields (city, state, postal, etc.) in the field mapping (only house number + street name). 

If you build the locator without specifying any zonal fields in the field mapping, that's when the supportsOptionalZone parameter gets automatically applied to the *.loc file. If you did build the locator with a zonal field (which it sounds like you did with the city field), this setting is not applied and must be manually added if you attempt to search for an address without one of those three things I mentioned earlier (admin zone, location parameter, or extent). 

Again, we are definitely working on getting an enhancement logged so these settings will be exposed through the UI. Manually adding that "supportsOptionalZone = true" line to the *.loc file is just a solution for now until that gets reviewed and hopefully implemented.

Best regards,

Eric

0 Kudos
PhilLarkin1
Occasional Contributor III

Ok, thanks for clarifying. 

0 Kudos
PhilLarkin1
Occasional Contributor III

Apparently this has been fixed in 2.5. I have not tested.

ENH-000124557 [Enhancement] Provide the ability to set the "supportsOptionalZone" property for a locator built with the Create Locator tool in ArcGIS Pro directly from the UI

https://my.esri.com/#/support/bugs/ENH-000124557

PhilLarkin1
Occasional Contributor III

Arcpy at Pro 2.6 now includes a Geocoding module and Locator class.

Locator—ArcGIS Pro | Documentation