MCPcopy Index your code
hub / github.com/chrismattmann/lucene-geo-gazetteer

github.com/chrismattmann/lucene-geo-gazetteer @0.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.2 ↗ · + Follow
49 symbols 97 edges 7 files 15 documented · 31% updated 34d ago★ 38
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Lucene Geo-Gazetteer

A command line gazetteer built around the Geonames.org dataset, that uses the Apache Lucene library to create a searchable gazetter.

Use

The Geonames.org dataset contains over 10,000,000 geographical names corresponding to over 7,500,000 unique features. Beyond names of places in various languages, data stored include latitude, longitude, elevation, population, administrative subdivision and postal codes. All coordinates use the World Geodetic System 1984 (WGS84).

  1. What we need here is to download the latest version of allCountries.zip file from GeoNames.org: curl -O http://download.geonames.org/export/dump/allCountries.zip
  2. and unzip the GeoNames file: unzip allCountries.zip
  3. Take the allCountries.txt and use it to create a geoIndex: java -cp target/lucene-geo-gazetteer-<version>-jar-with-dependencies.jar edu.usc.ir.geo.gazetteer.GeoNameResolver -i geoIndex -b allCountries.txt
  4. Then search the index (e.g., for Pasadena and Texas): java -cp target/lucene-geo-gazetteer-<version>-jar-with-dependencies.jar edu.usc.ir.geo.gazetteer.GeoNameResolver -i geoIndex -s Pasadena Texas
  5. The service mode: #Launch Server $ lucene-geo-gazetteer -server # Query $ curl "localhost:8765/api/search?s=Pasadena&s=Texas&c=2"

Questions, comments?

Send them to Chris A. Mattmann.

Contributors

  • Thamme Gowda N., USC
  • Madhav Sharan, USC
  • Yun Li, USC
  • Chris A. Mattmann, JPL

Credits

This project began as the CSCI 572 project of Yun Li on the NSF Polar CyberInfrastructure project at USC under the supervision of Chris Mattmann. You can find Yun's original code base here.

This work was sponsored by the National Science Foundation under funded projects PLR-1348450 and PLR-144562.

License

Apache License, version 2

Core symbols most depended-on inside this repo

Shape

Method 41
Class 7
Enum 1

Languages

Java100%

Modules by API surface

src/main/java/edu/usc/ir/geo/gazetteer/domain/Location.java21 symbols
src/main/java/edu/usc/ir/geo/gazetteer/GeoNameResolver.java15 symbols
src/main/java/edu/usc/ir/geo/gazetteer/CustomLuceneGeoGazetteerComparator.java5 symbols
src/main/java/edu/usc/ir/geo/gazetteer/service/Launcher.java3 symbols
src/main/java/edu/usc/ir/geo/gazetteer/api/SearchResource.java3 symbols
src/main/java/edu/usc/ir/geo/gazetteer/api/HealthCheckAPI.java2 symbols

For agents

$ claude mcp add lucene-geo-gazetteer \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page