Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to write a geocoding web service for genealogy in Java. Because it is for genealogy, I don't need to go down to the street level. I only need to go down to the county.

Looking at genealogy data, misspelled names are very common. People also use a lot of non standard abbreviations. For instance for Baltimore County might look like:

  1. Baltimore
  2. Baltimore County
  3. Baltimore Co
  4. Baltimore Cty
share|improve this question
Thanks for the questions and answers!!!! I am new on this ... but this questions are taking and idea.... – user41253 Nov 28 '14 at 11:27
up vote 9 down vote accepted

I don't think this question is explicitly geographic, because you're only interested in names, so you may want to ask it on SO. You could answer your question with two pieces of information: the state and the corrected county name. To perform the corrections, you'd likely want to use the Levenshtein distance (example & java implementation) to match the fuzzy data to corrected values.

share|improve this answer
+1 That's probably true. Levenshtein looks like a good place to start and it looks like Postgres even supports it. Thanks. – Jay Askren Aug 7 '10 at 23:11
I think combining Levenshtein distance with the data from Geonames ( may work for me. Thanks. – Jay Askren Aug 7 '10 at 23:14

A geocoding service needs geographic geometry data, an associated gazetteer (to handle naming and name alternatives), and a user interface (to mediate the search). For a reverse geocoder, you'll need to add a topology validator. For Java, the open source JTS Topology Suite would be the natural choice:

County geometries for the United States can be found at the Census:

To get started on the gazetteer, the U.S. Board on Geographic Names has a database:

Creating a solid gazetteer database and weaving algorithms that tolerate approximate search matches are the difficult part.

share|improve this answer
The algorithms are what I'm looking for. – Jay Askren Aug 7 '10 at 21:27
Inquiries about semantic similarity algorithms may have more respondents on the main stackoverflow site. – glennon Aug 7 '10 at 21:42

Google has a nice API for geocoding, if you can follow their terms of service. Basic demo can be found here.

Using their service is subject to some limitations, but the result is intuitive, fast, accurate and familiar to most users. It will allow you to focus on developing the genealogy part of your service.

share|improve this answer
I would really like to host everything in house and not depend on an outside api. – Jay Askren Aug 7 '10 at 20:07
So you're looking for an open source licensed geocoding DB? – Adam Matan Aug 7 '10 at 20:54

for Java Geocoder try

a little dated (2008) but still might be useful has a wiki

share|improve this answer
Very nice! Thank you. – Jay Askren Aug 12 '10 at 21:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.