14

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
10

I don't think this question is explicitly geographic, because you're only interested in names, so you may want to ask it on Stack Overflow. 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.

  • +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 (geonames.org) may work for me. Thanks. – Jay Askren Aug 7 '10 at 23:14
5

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: http://www.vividsolutions.com/jts/jtshome.htm

County geometries for the United States can be found at the Census: http://www.census.gov/geo/www/cob/co2000.html

To get started on the gazetteer, the U.S. Board on Geographic Names has a database: http://geonames.usgs.gov/

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

  • 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
2

for Java Geocoder try http://jgeocoder.sourceforge.net/

a little dated (2008) but still might be useful has a wiki http://docs.codehaus.org/display/JGEOCODER/JGeocoder+-+Free+Java+Geocoder

1

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.

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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