Geocoding Parsed Addresses without concatenating?

2622
6
08-25-2011 12:57 PM
KyleLeissner
New Contributor
Hello,

I have a dataset where the entire address is broken up in different columns such as house number, direction, ect.... (see attached sample of data). When I go to geocode the only options for the data are address, city, state, and zip? Is there any way to have more fields to select, or must I concatenate all the fields so they fit under the address part? I prefer not to concatenate as I think the results will be more accurate.

What is the best way to geocode these addresses in this format?
Tags (2)
0 Kudos
6 Replies
JoeBorgione
MVP Emeritus
Hello,

I have a dataset where the entire address is broken up in different columns such as house number, direction, ect.... (see attached sample of data). When I go to geocode the only options for the data are address, city, state, and zip? Is there any way to have more fields to select, or must I concatenate all the fields so they fit under the address part? I prefer not to concatenate as I think the results will be more accurate.

What is the best way to geocode these addresses in this format?


I've always concatenated address data; the accuracy is in your locator when it comes parsing out address components.  For example if you are matching against streets, it's always better to have Prefix, StreetName, Suffix etc in their own fields.

It only takes a second to add a field to your table, call it something like, hmm.... address and then calc it with &" "& between your field names if you are still old fashioned like me and use vb. (Or really really old fashioned and use Perl, Csh, Bourne etc which I've been known to use too...)

Hope this helps-
That should just about do it....
0 Kudos
daniellesanford
New Contributor
I�??m trying to do this now, and I am concatenating, problem is that not all the fields have values and I end up with leading/trailing spaces or double spaces.  How can I get it to concatenate but skip over the empty fields?

Small sample set attached.
0 Kudos
JoeBorgione
MVP Emeritus
I�??m trying to do this now, and I am concatenating, problem is that not all the fields have values and I end up with leading/trailing spaces or double spaces.  How can I get it to concatenate but skip over the empty fields?

Small sample set attached.


That's a pretty common problem.  There are several approaches you can take:

Perform a selection such that all the elements are present and concatenate all those list, and then perform subsequent selections (and subsequent concatenations) that 'weed out' those address elements that are <null> or blank.

or

Just perform the concatenation process on all records regardless of individual column content, and then go back and search and replace for double spaces or leading spaces.  I don't think trailing spaces will give you a problem when geocoding.

or

In the field calculator, use the advanced setting and build a series of conditional statements that take care of empty field contents.

Whatever you do, I suggest that you import the data to a table in some flavor of a geodatabase and leave Excel to the accountants.
That should just about do it....
0 Kudos
ToddLusk
New Contributor III
I�??m trying to do this now, and I am concatenating, problem is that not all the fields have values and I end up with leading/trailing spaces or double spaces.  How can I get it to concatenate but skip over the empty fields?

Small sample set attached.


There's a pretty easy way to remove "extra" spaces within a string.  I picked this tip up from a SQL Server forum/blog somewhere, but it can be adapted for use in any "language" (i.e., VB, Python, etc.).

REPLACE(REPLACE(REPLACE(YourString, " ", "<>"), "><", ""), "<>", " ")

Basically that does the following:
1)  It replaces all instances of a space (" ") with "<>". So if you have two spaces you would see "MAIN<><>ST" after the first "replace".
2)  Next, it goes through and replaces all the "><" with a blank (i.e. "").  So then you would have "MAIN<>ST".
3)  Lastly, it goes through and replaces all the "<>" with a single space (" ").  So you end up with "MAIN ST".

It seems to run pretty fast.

You can also use "trim", "left trim", or "right trim" (or a combo of those, again, depending on the language) to eliminate the leading and trailing spaces.  In Excel specifically, you should be able to use those to essentially "ignore" your blank cells.  I wouldn't worry specifically about avoiding them, just make sure junk doesn't end up in them as a result of the concatenation process.
0 Kudos
TylerBoyle
New Contributor III
The easiest way to remove the double spaces I've found it to start editing you layer. Highlight your address field and do a find and replace. Put a double space in the "find" and single in "replace with". You can run this several times to remove possible triple of quad spaces from the concatenating process.


Tyler
0 Kudos
DavidKallemeyn
New Contributor
There used to be a way to set it up so that both the reference data and the input address fields were parsed.  Attached is a screenshot of what my old locator looks like when viewed from 10.1.  It was not set up in 10.1 so it cannot be edited/updated. 

Can someone from ESRI provide input as to whether you can set it up to geocode parsed input address fields in 10.1?  It would be great to be able to edit the input address fields in the locator properties to add/remove as needed, I would really prefer to avoid having to concatenate.
0 Kudos