JGeocoder
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.
Install / Use
/learn @nysenate/JGeocoderREADME
JGeocoder
JGeocoder is a free, open source geocoder implemented in Java.
Installation
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
http://groovy.codehaus.org/Download
Install a database.
We used H2 version 1.3.168; you'll need the same version. Download it and add it to your classpath:
http://hsql.sourceforge.net/m2-repo/com/h2database/h2/1.3.168/h2-1.3.168.jar
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
Related Skills
node-connect
343.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
92.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
