JGeocoder is a free, open source geocoder implemented in Java. It assigns geocoordinates to postal addresses using the Federal Census Bureau's TIGER/Line data. It was abandoned by Jay Liang in 2008 and resurrected by the New York State Senate in late 2012.
Java Groovy Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



JGeocoder is a free, open source geocoder implemented in Java.


There are 2 projects:

  • jgeocoder performs all the geocoding functionality.
  • Jgeocoder-import is only used to import data from a csv (called tiger_main.csv, stored in the same folder all the jgeocoder-import code is) into an H2 database

Install Groovy


Install a database.

We used H2 version 1.3.168; you'll need the same version. Download it and add it to your classpath:


You can use something else by just changing a bit of code in import_tiger_main.groovy in jgeocoder-import, and H2DbDataSourceFactory.java in jgeocoder.

Download the Data

Go to ftp://ftp2.census.gov/geo/tiger/TIGER2011/ADDRFEAT/ and download all the files address feature files you are interested in. Files for the state of NY all start with 36 and are in the range 36001-36123. Other states will follow a similar pattern. Extract all the files into their own folders, stored in one parent folder.

Convert the Shape Files

Install Python and the pyshp library: http://pypi.python.org/pypi/pyshp

Edit convertShapefile.py:93, setting the outputFile to the directory that contains the jgeocoder-import/src/main/groovy/import_tiger_main.groovy file.

Edit import_tiger_main.groovy, specifying where you want to save your database.

Run groovy import_tiger_main.groovy from the directory that contains the jgeocoder-import/src/main/groovy/import_tiger_main.groovy file

Edit the H2DbDataSourceFactory.java to reflect where the H2 database is stored, on the line config.setTigerDataSource(H2DbDataSourceFactory.getH2DbDataSource(

Running a Test

Save the Data folder containing the three JDB files somewhere on your harddrive, and specify its location in BobbysTest.java

Run BobbysTest.java