Volver al ranking

komoot/photon

Java

an open source geocoder for openstreetmap data

elasticsearchjavaopenstreetmapphotongeocodinggeocodersearchreverse-geocoding
Crecimiento de estrellas
Estrellas
2.9k
Forks
366
Crecimiento semanal
Issues
43
1k2k
sept 2013dic 2017abr 2022jul 2026
ArtefactosMavengit clone https://github.com/komoot/photon.git
README

About photon

Continuous Integration

photon is an open source geocoder built for OpenStreetMap data. It is based on OpenSearch - an efficient, powerful and highly scalable search platform.

photon was started by komoot who also provide the public demo server at photon.komoot.io.

Features

  • high performance
  • highly scalability
  • search-as-you-type
  • multilingual search
  • location bias
  • typo tolerance
  • filter by osm tag and value
  • filter by bounding box
  • reverse geocode a coordinate to an address
  • OSM data import (built upon Nominatim) inclusive continuous updates
  • import and export dumps in concatenated JSON format

Demo server

You can try out photon via the demo server at https://photon.komoot.io. You are welcome to use the API for your project as long as the number of requests stay in a reasonable limit. Extensive usage will be throttled or completely banned. We do not give guarantees for availability and reserve the right to implement changes without notice.

If you have a larger number of requests to make, please consider setting up your own private instance. It is as simple as downloading two files and starting the server. See instructions below.

Installation

Requirements

photon requires Java, version 21+.

If you want to run against an external database instead of using the embedded server, OpenSearch 3.x is needed.

A planet-wide database requires about 95GB disk space (as of 2026, grows by about 10% a year). Using SSDs for storage is strongly recommended, NVME would even be better. At least 64GB RAM are recommended for smooth operations, more, if the server takes significant load. Running photon with less RAM is possible but consider increasing the available heap (using java -Xmx8G -jar ... for example). Be careful to make sure that there remains enough free RAM that the system doesn't start swapping.

If you want to import data from Nominatim, there are additional requirements for Nominatim.

Setting photon up with the release binaries and extracts

This is the easiest way to set up a self-hosted photon instance. Pre-built jar files can be downloaded from the Github release page.

GraphHopper kindly provides weekly updated dumps of the photon database at https://download1.graphhopper.com/public. The dumps are available for the world-wide dataset and for selected country datasets. The dumps contain names in English, German, French and local language. There is no support for full geometry output. If you need this feature, you need to import your own database from a JSON dump.

Follow the instruction on the webpage to find the right dump suitable for your version.

Make sure you have bzip2 or pbzip2 installed. Do not use WinRAR for unpacking, it is known to have issues with the files. Execute one of these two commands in your shell to download, uncompress and extract the huge database in one step:

wget -O - https://download1.graphhopper.com/public/photon-db-planet-1.0-latest.tar.bz2 | bzip2 -cd | tar x
# you can significantly speed up extracting using pbzip2 (recommended):
wget -O - https://download1.graphhopper.com/public/photon-db-planet-1.0-latest.tar.bz2 | pbzip2 -cd | tar x

Don't forget to adapt the directory to match your photon version.

Updating photon with a new version of the database dump

When you want to update your local database with a newer version of the database dump, then you need to swap out the databases atomically:

  • download and unpack the new version
  • swap the directories to put the new directory in place of the old one
  • restart photon and make sure everything works as expected
  • delete the old database

This unfortunately means you need twice the space of the database for updates.

WARNING: Never unpack the database in place of the old one. This will lead to corrupted data.

Usage

Change to the directory where the photon_data database directory is located (aka the parent directory of photon_data). Then start photon with the following command:

java -jar photon-*.jar serve

The webserver is then available at http://localhost:2322.

For a full documentation of the usage, including on how to import and update a database, see the Usage documentation.

Photon API

A full description of the Photon API and results can be found in the API documentation.

Building photon from scratch

photon uses gradle for building. To build the package from source make sure you have a JDK installed. Then run:

./gradlew build

This will build and test photon. The final jar can be found in the target directory.

Contributing

Code contributions and bug reports are welcome.

PRs that include AI-generated content, may that be in code, in the PR description or in documentation need to

  1. clearly mark the AI-generated sections as such, for example, by mentioning all use of AI in the PR description, and
  2. include proof that you have run the generated code on an actual installation of photon. Adding and executing tests will not be sufficient. You need to show that the code actually solves the problem the PR claims to solve.

For questions please either use Github discussions or join the OpenStreetMap forum.

License

photon is open source and licensed under Apache License, Version 2.0

  • photon's search configuration was developed with a specific test framework. It is written in Python and hosted separately.
  • There is a leaflet-plugin for displaying a search box with a photon server in the backend.
Repositorios relacionados
macrozheng/mall

mall项目是一套电商系统,包括前台商城系统及后台管理系统,基于Spring Boot+MyBatis实现,采用Docker容器化部署。 前台商城系统包含首页门户、商品推荐、商品搜索、商品展示、购物车、订单流程、会员中心、客户服务、帮助中心等模块。 后台管理系统包含商品管理、订单管理、会员管理、促销管理、运营管理、内容管理、统计报表、财务管理、权限管理、设置等模块。

JavaMavenApache License 2.0spring-bootspring-security
macrozheng.com/admin/
84.3k29.8k
doocs/advanced-java

😮 Core Interview Questions & Answers For Experienced Java(Backend) Developers | 互联网 Java 工程师进阶知识完全扫盲:涵盖高并发、分布式、高可用、微服务、海量数据处理等领域知识

JavaMavenCreative Commons Attribution Share Alike 4.0 Internationaljavadistributed-systems
java.doocs.org
79k19.2k
elastic/elasticsearch

Free and Open Source, Distributed, RESTful Search Engine

JavaMavenOtherelasticsearchjava
elastic.co/products/elasticsearch
77.6k26.1k
grafana/grafana

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.

TypeScriptnpmGNU Affero General Public License v3.0grafanamonitoring
grafana.com
75.7k14.3k
typesense/typesense

Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences

C++GNU General Public License v3.0search-enginesearch
typesense.org
26.3k955
elastic/kibana

Your window into all of your data

TypeScriptnpmOtherkibanaelasticsearch
elastic.co/products/kibana
21.2k8.6k
openobserve/openobserve

Open source observability platform for logs, metrics, traces, frontend monitoring, pipelines and LLM observability. A sophisticated, simple and highly performant alternative to Datadog, Splunk, and Elasticsearch with 140x lower storage costs and single binary deployment.

TypeScriptnpmGNU Affero General Public License v3.0logsmetrics
openobserve.ai
20.3k952
YunaiV/yudao-cloud

ruoyi-vue-pro 全新 Cloud 版本,优化重构所有功能。基于 Spring Cloud Alibaba + MyBatis Plus + Vue & Element 实现的后台管理系统 + 用户小程序,支持 RBAC 动态权限、多租户、数据权限、工作流、三方登录、支付、短信、商城、CRM、ERP、MES、IM、AI 大模型、IoT 物联网等功能。你的 ⭐️ Star ⭐️,是作者生发的动力!

JavaMavenMIT Licensedubbospringcloud
cloud.iocoder.cn
19.3k4.8k
Tencent/APIJSON

🏆 Real-Time no-code, powerful and secure ORM 🚀 providing APIs and Docs without coding by Backend, and Frontend(Client) can customize response JSONs 🏆 实时 零代码、全功能、强安全 ORM 库 🚀 后端接口和文档零代码,前端(客户端) 定制返回 JSON 的数据和结构

JavaMavenOtherpostgresql-databasetidb
apijson.cn
18.4k2.3k
deviantony/docker-elk

The Elastic stack (ELK) powered by Docker and Compose.

ShellMIT Licensedockerelasticsearch
18.4k6.9k
zincsearch/zincsearch

ZincSearch . A lightweight alternative to elasticsearch that requires minimal resources, written in Go.

GoGo ModulesOthergogolang
zincsearch-docs.zinc.dev
17.9k777
infinilabs/analysis-ik

🚌 The IK Analysis plugin integrates Lucene IK analyzer into Elasticsearch and OpenSearch, support customized dictionary.

JavaMavenApache License 2.0elasticsearchik-analysis
17.5k3.3k