ghoton

command module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

README

Ghoton

Go reimplementation of photon (v1.1.0), an open-source geocoder for OpenStreetMap data. Uses bluge for indexing.

Quick Start

go build && ./ghoton serve

Commands

ghoton serve [options]    Start the API server
ghoton import [options]   Import data from JSON dump
Serve Options
Flag Default Description
-data-dir ./data Data directory for bluge index
-listen localhost:2322 Listen address
-languages en,de,fr,es,it Supported languages
-default-lang en Default language
-max-results 50 Maximum results per query
Import Options
Flag Description
-data-dir Data directory for bluge index (required)
-file Input JSON dump file (use - for stdin)

API Endpoints

Forward geocoding with optional location bias.

Parameters:

Param Description
q Search query (required)
lang Language code (or "default")
limit Max results (default: 15)
lat, lon Location for bias
zoom Zoom level (0-18)
location_bias_scale Bias scale (0-1)
bbox Bounding box filter
layer Address type filter
osm_tag OSM tag filter
include Include categories
exclude Exclude categories
geometry Include full geometry
debug Return query debug info
dedupe Deduplicate results

Same parameters as /api, returns full GeoJSON with geometry.

/status

Returns index status:

{
  "status": "Ok",
  "import_date": "2026-05-02T00:00:00Z"
}

License

Apache 2.0

History

  • v0.0.2 - Now with all files
  • v0.0.1 - Initial Release

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
core

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL