AnsweredAssumed Answered

Geocoding addresses with an Locator that does NOT return Points

Question asked by AntoJK on Feb 10, 2014
Hello all,

I am writing some code to use ArcGIS locators to geocode some addresses.
I have this working correctly for Locators that return Point geometries using the AddressToLocations method, this works for single line and multi line addresses.
But if a Locator that returns Polylines is used this method throws an error saying "Invalid Geometry", this seems to be because the results are expected to have a Point geometry in them but because I am using a Locator that returns Polylines the geometry can't be passed into the result.

I have found a way to get around this for Polyline locators by using the FindAddresses method, it seems to work in a similar way to the AddressToLocations method except that it does not throw an error for the Polyline geometry, it just returns a null geometry, you can see the attributes in the singlLine image attached, note the X and Y are empty because the geometry is not a point. But there is an issue with this method too, multiline addresses do not seem to work with the FindAddress method, or at least not correctly.
The candidates that come back from the multiline addresses when using FindAddresses seem to be empty, I would have expected that there would be no candidates if it could not find any features that matched, this can be seen in the multiline image.

Just as an example I have attached a screenshot called inputs that show the values that are passed into AddressToLocations (for a point locator) or FindAddresses (for a polyline locator). These work correctly when used for a multiline search with the point locator but they do not work for multi line serching with the Polyline locator.

So my main questions are:
should an empty candidate be returned if no matching addresses are found?
Is there a better way to geocode addresses using the Runtime SDK for WPF for a locator that does not return Point geometries and that works for both Single and Multi line searches?

Thanks for any help,
Anthony

[ATTACH=CONFIG]31283[/ATTACH]
[ATTACH=CONFIG]31284[/ATTACH]
[ATTACH=CONFIG]31285[/ATTACH]

Attachments

Outcomes