an open source geocoder for openstreetmap data

Overview

photon

Continuous Integration

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

photon was started by komoot and provides search-as-you-type and multilingual support. It's used in production with thousands of requests per minute at www.komoot.de. Find our public API and demo on photon.komoot.io. Until October 2020 the API was available under photon.komoot.de. Requests still work as they redirected but please update your apps accordingly.

Contribution

All code contributions and bug reports are welcome!

For questions please send an email to our mailing list.

Feel free to test and participate!

Licence

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

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

Installation

photon requires java, at least version 8.

Download the search index (53G gb compressed, worldwide coverage, languages: English, German, French and local name). The search index is updated weekly and thankfully provided by GraphHopper with the support of lonvia.

Make sure you have bzip2 or pbzip2 installed and execute one of these two commands in your shell. This will download, uncompress and extract the huge database in one step:

wget -O - https://download1.graphhopper.com/public/photon-db-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-latest.tar.bz2 | pbzip2 -cd | tar x

Now get the latest version of photon from the releases and start it:

java -jar photon-*.jar

Use the -data-dir option to point to the parent directory of photon_data if that directory is not in the default location ./photon_data. Before you can send requests to photon, ElasticSearch needs to load some data into memory so be patient for a few seconds.

Check the URL http://localhost:2322/api?q=berlin to see if photon is running without problems. You may want to use our leaflet plugin to see the results on a map.

To enable CORS (cross-site requests), use -cors-any to allow any origin or -cors-origin with a specific origin as the argument. By default, CORS support is disabled.

Discover more of photon's feature with its usage java -jar photon-*.jar -h.

Building

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

mvn package

Customized Search Data

If you need search data in other languages or restricted to a country you will need to create your search data by your own. Once you have your Nominatim database ready, you can import the data to photon.

If you haven't already set a password for your nominatim database user, do it now (change user name and password as you like, below):

su postgres
psql
ALTER USER nominatim WITH ENCRYPTED PASSWORD 'mysecretpassword';

Import the data to photon:

java -jar photon-*.jar -nominatim-import -host localhost -port 5432 -database nominatim -user nominatim -password mysecretpassword -languages es,fr

The import of worldwide data set will take some hours/days, SSD/NVME disks are recommended to accelerate nominatim queries.

Updating from OSM via Nominatim

In order to update nominatim from OSM and then photon from nominatim, you must start photon with the nominatim database credentials on the command line:

java -jar photon-*.jar -host localhost -port 5432 -database nominatim -user nominatim -password ...

A nominatim setup is also a requirement to have continuous updates. To keep nominatim in sync with the latest OSM changes and to update photon with nominatim afterwards run:

export NOMINATIM_DIR=/home/nominatim/...
./continuously_update_from_nominatim.sh

If you have updated nominatim with another method, photon can be updated by making a HTTP GET request to /nominatim-update, e.g. with this command:

curl http://localhost:2322/nominatim-update

Search API

Search

http://localhost:2322/api?q=berlin

Search with Location Bias

http://localhost:2322/api?q=berlin&lon=10&lat=52

Increase this bias (range is 0.1 to 10, default is 1.6)

http://localhost:2322/api?q=berlin&lon=10&lat=52&location_bias_scale=2

Reverse geocode a coordinate

http://localhost:2322/reverse?lon=10&lat=52

Adapt Number of Results

http://localhost:2322/api?q=berlin&limit=2

Adjust Language

http://localhost:2322/api?q=berlin&lang=it

Filter results by bounding box

Expected format is minLon,minLat,maxLon,maxLat.

http://localhost:2322/api?q=berlin&bbox=9.5,51.5,11.5,53.5

Filter results by tags and values

Note: the filter only works on principal OSM tags and not all OSM tag/value combinations can be searched. The actual list depends on the import style used for the Nominatim database (e.g. settings/import-full.style). All tag/value combinations with a property 'main' are included in the photon database. If one or many query parameters named osm_tag are present, photon will attempt to filter results by those tags. In general, here is the expected format (syntax) for the value of osm_tag request parameters.

  1. Include places with tag: osm_tag=key:value
  2. Exclude places with tag: osm_tag=!key:value
  3. Include places with tag key: osm_tag=key
  4. Include places with tag value: osm_tag=:value
  5. Exclude places with tag key: osm_tag=!key
  6. Exclude places with tag value: osm_tag=:!value

For example, to search for all places named berlin with tag of tourism=museum, one should construct url as follows:

http://localhost:2322/api?q=berlin&osm_tag=tourism:museum

Or, just by they key

http://localhost:2322/api?q=berlin&osm_tag=tourism

Results as GeoJSON

{
  "features": [
    {
      "properties": {
        "name": "Berlin",
        "state": "Berlin",
        "country": "Germany",
        "countrycode": "DE",
        "osm_key": "place",
        "osm_value": "city",
        "osm_type": "N",
        "osm_id": 240109189
      },
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          13.3888599,
          52.5170365
        ]
      }
    },
    {
      "properties": {
        "name": "Berlin Olympic Stadium",
        "street": "Olympischer Platz",
        "housenumber": "3",
        "postcode": "14053",
        "state": "Berlin",
        "country": "Germany",
        "countrycode": "DE",
        "osm_key": "leisure",
        "osm_value": "stadium",
        "osm_type": "W",
        "osm_id": 38862723,
        "extent": [
          13.23727,
          52.5157151,
          13.241757,
          52.5135972
        ]
      },
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          13.239514674078611,
          52.51467945
        ]
      }
    }]
  }

Related Projects

  • photon's search configuration was developed with a specific test framework. It is written in Python and hosted separately.
  • R package to access photon's public API with R
Comments
  • Feature Request - State value returned on query

    Feature Request - State value returned on query

    I would like to see more of OSM's 'address' information returned upon querying photon. I specifically need the state field.

    Here are two examples that would satisfy my needs:

    {
        "features": [
            {
                "properties": {
                    "osm_key": "boundary",
                    "name": "San Francisco",
                    "osm_id": 111968,
                    "osm_value": "administrative",
                    "state": "California"
                    "country": "United States of America"
                },
                "type": "Feature",
                "geometry": {
                    "type": "Point",
                    "coordinates": [
                        -122.4192704,
                        37.7792768
                    ]
                }
            },
        ]
    }
    
    
    
    {
        "features": [
            {
                "properties": {
                    "osm_key": "boundary",
                    "name": "San Francisco",
                    "osm_id": 111968,
                    "osm_value": "administrative",
                    "country": "United States of America"
                },
                address": {
                    "city": "San Francisco",
                    "county": "San Francisco City and County",
                    "state": "California",
                    "country": "United States of America",
                    "country_code": "us"
                }
                "type": "Feature",
                "geometry": {
                    "type": "Point",
                    "coordinates": [
                        -122.4192704,
                        37.7792768
                    ]
                }
            },
        ]
    }
    
    opened by daryltucker 53
  • Reverse geocoding performance improvements and Radius/Limit parameters

    Reverse geocoding performance improvements and Radius/Limit parameters

    Includes everything from this pull https://github.com/komoot/photon/pull/217 Plus :

    • similarity is by default BM25 for the whole index (coherence).
    • reverse queries take advantage of ES2.2 geo distance query performance improvements (actually nothing extra is required, simply cleaned-up the query builder from unnecessary calls.
    • reverse query now take radius and limit parameters. Default reverse geocoding lookup radius set to 1km (previously 5km), limit 1.

    Benchmarks

    Java 8GB RAM, full globe index (160M documents). Index size

    • ES 2.2: 90GB index
    • ES 1.7: 64GB index

    Requests per second

    • ES 2.2 (this pull), Spinning disk: 25 to 65 requests / second, depending on data locality.
    • ES 2.2 (this pull), SSD: TO BE TESTED.
    • ES 1.7, SSD: 1 request/second.
    • ES 1.7, SSD, indexed lat_lon : 50-65 requests / second.

    ES 2.2 with SSD test coming soon. Expecting something like 100 requests / seconds.

    opened by masda70 48
  • Migration to Elasticsearch 5

    Migration to Elasticsearch 5

    This is the current result for Elasticsearch 5 migration, as asked for at #249 (from myself).

    In this pull request, everything from #219 is included plus some commits for bugfixing (tests are running now at least on my machine, plus the jarhell fixes from #217. This is commit 538ee4d.

    Further, I implemented the migration to ES 5. The tests are running, I also have a running server with results that looks subjectively good as a first impression (further testing needed of course). I just reindexed the old ES index into a new one for testing - currently I have no Nominatim server for testing the import code. Regarding the Nominatim import, there was also a regarding commit these days - I didn't rebased it yet for simplicity during the merge.

    I am looking forwad to feedback and comments :)

    enhancement 
    opened by reuschling 42
  • release 0.3 preparation

    release 0.3 preparation

    Will try to build a global and nl+de export for the 0.3-beta3 release including the following PRs:

    • [x] #288 house number fix
    • [x] #306 proper location bias
    • [x] #311 Filter punctuation

    If this is positive we'll include the specific PR. If not we'll release 0.3.0 without it.

    • [x] compare geocoder tester (see here)
    opened by karussell 38
  • Allow searching on osm_key and osm_value

    Allow searching on osm_key and osm_value

    There should be another filter parameter in the API to search in a specific area (bounding box) for a specific tag combination or even a set of combinations ('I want food').

    For that osm_key and osm_value have to be indexed in the mapping. Or maybe we make this configurable if this increases size too much.

    opened by karussell 38
  • Increase offset for decay function

    Increase offset for decay function

    As discussed on the mailing list we need a location bias that behaves a bit more like the old functionality and one possibility could be to increase the offset so that results "far away" are still considered with an enabled location bias.

    opened by karussell 28
  • Nominatim import is hanging

    Nominatim import is hanging

    Hi! When i star import from nominatim db i get exeption like:

    [main] ERROR de.komoot.photon.elasticsearch.Server - cannot install plugin: mobz /elasticsearch-head: java.io.IOException: plugin directory c:\gis\photon\photon_ data\elasticsearch\plugins\head already exists. To update the plugin, uninstall it first using --remove mobz/elasticsearch-head command [main] ERROR de.komoot.photon.elasticsearch.Server - cannot install plugin: poly fractal/elasticsearch-inquisitor: java.io.IOException: plugin directory c:\gis\p hoton\photon_data\elasticsearch\plugins\inquisitor already exists. To update the plugin, uninstall it first using --remove polyfractal/elasticsearch-inquisitor command [main] INFO org.elasticsearch.node - [Ringmaster] version[1.4.1], pid[4056], bui ld[89d3241/2014-11-26T15:49:29Z] [main] INFO org.elasticsearch.node - [Ringmaster] initializing ... [main] INFO org.elasticsearch.plugins - [Ringmaster] loaded [lang-mvel, wordendi ng], sites [head, inquisitor] [main] INFO org.elasticsearch.script - [Ringmaster] compiling script file [c:\gi s\photon\photon_data\elasticsearch\config\scripts\general-score.mvel] [main] INFO org.elasticsearch.script - [Ringmaster] compiling script file [c:\gi s\photon\photon_data\elasticsearch\config\scripts\location-biased-score.mvel] [main] INFO org.elasticsearch.node - [Ringmaster] initialized [main] INFO org.elasticsearch.node - [Ringmaster] starting ... [main] INFO org.elasticsearch.transport - [Ringmaster] bound_address {inet[/127. 0.0.1:9301]}, publish_address {inet[/127.0.0.1:9301]} [main] INFO org.elasticsearch.discovery - [Ringmaster] photon/QbPSEUuYQiyuDWm0aH R0tg [elasticsearch[Ringmaster][clusterService#updateTask][T#1]] INFO org.elasticsear ch.cluster.service - [Ringmaster] new_master [Ringmaster]QbPSEUuYQiyuDWm0aHR0tg ][WS-1882][inet[/127.0.0.1:9301]], reason: zen-disco-join (elected_as_master) [main] INFO org.elasticsearch.http - [Ringmaster] bound_address {inet[/127.0.0.1 :9201]}, publish_address {inet[/127.0.0.1:9201]} [main] INFO org.elasticsearch.node - [Ringmaster] started [main] INFO de.komoot.photon.elasticsearch.Server - started elastic search node [elasticsearch[Ringmaster][clusterService#updateTask][T#1]] INFO org.elasticsear ch.gateway - [Ringmaster] recovered [1] indices into cluster_state Exception in thread "main" org.elasticsearch.indices.IndexAlreadyExistsException : [photon] already exists at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validat eIndexName(MetaDataCreateIndexService.java:167) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validat e(MetaDataCreateIndexService.java:559) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.access$ 200(MetaDataCreateIndexService.java:87) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execu te(MetaDataCreateIndexService.java:243) at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.r un(InternalClusterService.java:329) at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecu tor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:153)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
    

    Is that normal mode and i should have to wait or what,s going wrong with it?

    opened by maraev 25
  • Allow https calls for api

    Allow https calls for api

    Would it be possible for you to add an SSL certificate to the api site so that the api can be called from a https site?

    I've also checked out pelias (https://mapzen.com/pelias) which has an https api but for the examples that I've tested yours seems to be a better autosuggest.

    Or would I need to create a proxy page on my https site to call the http api? I'm worried this extra step could slow the response too much when trying to use it for autocompleting.

    opened by amnesia7 25
  • 500 Internal error

    500 Internal error

    Try to use the existing index from http://photon.komoot.de/data/photon_data_140706.tar.bz2, but it gives 500 Internal error when calling the api.

    The search index from http://photon.komoot.de/data/photon_data_140706.tar.bz2 is invalid?

    Tried on two different machines. Both Mac through.

    Thanks,

    bug 
    opened by bianjiang 24
  • index is very big

    index is very big

    I imported the data from sarah's dump and it turns out the search config produces a very big index:

    size: 117Gi (117Gi)
    docs: 101.889.211 (101.889.211)
    

    to compare it with the komoot one: we have only two languages instead of four, index is less than 30GB, so something must be wrong.

    I was suspecting indexing the extent-field occupys a lot of space again, but it is already removed.

    opened by christophlingg 23
  • Added Reverse Geocoding API & Remove old code support

    Added Reverse Geocoding API & Remove old code support

    Reverse Geocoding in Photon

    So I finally had time to merge my old reverse geocode code for Photon with the newly refactored Photon. Sorry for the delay. This PR has basic reverse geocoding support, which lacks some features (described further on) and needs some heavy feedback, as this should be another prime feature for Photon.

    Some info

    First some info about the way I implemented reverse geocoding into Photon. This code has the following features:

    • Give a coordinate and an optional language to Photon, and it returns the closest place in the Photon index. The data gets returned in the same trusted format as forward geocoding (a GeoJSON FeatureCollection). I kept this pretty simplistic. It returns an empty array when no result can be found.
    • The reverse geocode code has been written for the 'old' style and the new refactored style. The old way has a different API call format from the new way:
      • Call /api?reverse=true&lat=51.830866&lon=5.8388302&lang=nl for a basic reverse query on the old way
      • Call /reverse?lat=51.830866&lon=5.8388302&lang=nl for a basic reverse query on the new way
    • To switch between the new and the old way, uncomment/comment the corresponding handlers in App.java, just like it works in the current master
    • The old way works with a JSON query file (query_reverse.json) which is basically what @karussell made in #19 . The new way works with the ElasticSearch Java API, like the forward geocoding does.
    • The query is based on a limit of a 5km radius that it searches around the given coordinate and returns the best (closest) result.
    • I've tried to adhere to the new code structure and style by using factories and kind of mirroring the forward geocoding code with specific changes for this functionality. Also need some feedback here, if this fits the refactored structure.

    Production usage

    We use this code in production a lot. So I can safely say that it is pretty stable. To give you an idea, we have on peak around 50 concurrent users on the geocoder (reverse and forward), with a small (5gb) index of The Netherlands, Belgium and Germany combined. This needs to be tested with a global dataset where performance/timings should be tested on also.

    I would appreciate it if someone other than me uses the global dataset to test this, because I am currently running out of storage on my small SSD to test it properly.

    TO-DO/Missing features

    • [x] Remove old code support
    • [x] ~~The newly added osm_tag filtering is currently missing in this PR~~ (new pr)
    • [x] Documentation on how to use the API (possibly in new PR?)
    • [x] ~~Decide if 5km is a nice sweet-spot for the range Photon searches in, or optionally make it configurable~~ (new pr)
    • [x] Unit tests for reverse geocoding are currently missing in this PR

    Thanks in advance for reviewing this PR and like I said earlier, all feedback is welcome.

    opened by Svantulden 21
  • Reverse search could support osm tag filters

    Reverse search could support osm tag filters

    Would be nice if osm tag filters are supported for reverse search too: https://photon.komoot.io/reverse/?lat=46.99483&lon=9.075354&osm_tag=amenity:pharmacy

    opened by karussell 2
  • Feature request : latinization of names

    Feature request : latinization of names

    Would it be possible to return, regardless of the chosen language, the local and latinization of the city name ?

    Ex : If I'm searching for with the english tag, I get "Al Ghubaiba", but if I look with the french tag, I get the local version "الغبيبة" which is a bit inconsistent.

    Ideally, I would love to have the ability to select several languages in order, so for example : if selecting &lang=fr,en, I would get the french name if available, if not, the english one, and only if none of these are available, the local one.

    opened by scouderc 3
  • Edge Case for combined address

    Edge Case for combined address

    I encountered an example where I tried to geocode Fichtestraße 1-4, 08451 Crimmitschau Chemnitz.

    It fails, even though two query variations which would combine into it work out:

    curl 'https://photon.komoot.io/api/?q=Fichtestraße%201-4,%2008451%20Crimmitschau%20Chemnitz&lang=de&limit=1'
    {"features":[],"type":"FeatureCollection"}
    
    curl 'https://photon.komoot.io/api/?q=Fichtestraße%201-4,%2008451%20Crimmitschau&lang=de&limit=1'
    {"features":[{"geometry":{"coordinates":[12.393781675026666,50.80871965],"type":"Point"},"type":"Feature","properties":{"osm_id":570446453,"extent":[12.3937017,50.8088135,12.3938617,50.8086258],"country":"Deutschland","city":"Crimmitschau","countrycode":"DE","postcode":"08451","locality":"Wahlen","county":"Zwickau","type":"house","osm_type":"W","osm_key":"building","housenumber":"1","street":"Fichtestraße","district":"Crimmitschau","osm_value":"yes","state":"Sachsen"}}],"type":"FeatureCollection"}
    
    curl 'https://photon.komoot.io/api/?q=Fichtestraße%201,%2008451%20Crimmitschau%20Chemnitz&lang=de&limit=1'
    {"features":[{"geometry":{"coordinates":[12.393781675026666,50.80871965],"type":"Point"},"type":"Feature","properties":{"osm_id":570446453,"extent":[12.3937017,50.8088135,12.3938617,50.8086258],"country":"Deutschland","city":"Crimmitschau","countrycode":"DE","postcode":"08451","locality":"Wahlen","county":"Zwickau","type":"house","osm_type":"W","osm_key":"building","housenumber":"1","street":"Fichtestraße","district":"Crimmitschau","osm_value":"yes","state":"Sachsen"}}],"type":"FeatureCollection"}
    

    Is it possible to fix cases like this?

    opened by xeruf 1
  • Bias on name field match

    Bias on name field match

    First of all, thanks for the great tool, this is saving me today!

    In an exemplary query I encountered, there is some gibberish before "Hamburg". But regardless of the language parameter, it matches "Novo Hamburgo" higher, ignoring the exact match of the word Hamburg. Maybe this can be nudged slightly, or do you think this result is somehow appropriate? RElated to #193

    ❯ curl 'https://photon.komoot.io/api/?q=Luftfrachthof-Geb%20Hamburg&limit=1' | jq '.features[0].properties'
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   435    0   435    0     0   1329      0 --:--:-- --:--:-- --:--:--  1334
    {
      "osm_type": "R",
      "osm_id": 242616,
      "extent": [
        -51.1787892,
        -29.6378807,
        -50.9341246,
        -29.8302389
      ],
      "country": "Brasil",
      "osm_key": "place",
      "countrycode": "BR",
      "osm_value": "city",
      "name": "Novo Hamburgo",
      "county": "Região Geográfica Intermediária de Porto Alegre",
      "state": "Rio Grande do Sul",
      "type": "city"
    }
    
    ❯ curl 'https://photon.komoot.io/api/?q=Luftfrachthof-Geb%20Hamburg&lang=de&limit=2' | jq '.features | map(.properties)'
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   782    0   782    0     0   2821      0 --:--:-- --:--:-- --:--:--  2823
    [
      {
        "osm_type": "R",
        "osm_id": 242616,
        "extent": [
          -51.1787892,
          -29.6378807,
          -50.9341246,
          -29.8302389
        ],
        "country": "Brasilien",
        "osm_key": "place",
        "countrycode": "BR",
        "osm_value": "city",
        "name": "Novo Hamburgo",
        "county": "Região Geográfica Intermediária de Porto Alegre",
        "state": "Rio Grande do Sul",
        "type": "city"
      },
      {
        "osm_type": "N",
        "osm_id": 1680910488,
        "country": "Deutschland",
        "osm_key": "railway",
        "city": "Hamburg",
        "street": "Nordsteg",
        "countrycode": "DE",
        "district": "St. Georg",
        "osm_value": "station",
        "postcode": "20099",
        "name": "Hamburg Hauptbahnhof",
        "type": "house"
      }
    ]
    
    ❯ curl 'https://photon.komoot.io/api/?q=Hamburg&lang=de&limit=1' | jq '.features[0].properties'
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   332    0   332    0     0    277      0 --:--:--  0:00:01 --:--:--   277
    {
      "osm_type": "R",
      "osm_id": 62782,
      "extent": [
        8.1044993,
        54.02765,
        10.3252805,
        53.3951118
      ],
      "country": "Deutschland",
      "osm_key": "place",
      "countrycode": "DE",
      "osm_value": "city",
      "name": "Hamburg",
      "type": "city"
    }
    
    opened by xeruf 3
  • Item is missing when searching with default language and present with any other language setting

    Item is missing when searching with default language and present with any other language setting

    When trying out photon I stumbled across inconsistencies with the returned items when the language header is missing or the language is set to default.

    An example of this behaviour can be observed with these two queries:

    https://photon.komoot.io/api/?q=rewe%20worms&lat=8.32932446362749&lon=49.61427555&lang=de https://photon.komoot.io/api/?q=rewe%20worms&lat=8.32932446362749&lon=49.61427555&lang=default

    There seems to be a difference between lang=default and lang={de,fr,en}, where the latter all return the expected top item. Specifically the top hit of the german language result is missing from the default language (OSM ID: 3760787919). See the attached diff. Green lines are additional items only present when a language is set.

    --- default.json	2022-02-17 17:30:08.494200300 +0100
    +++ de.json	2022-02-17 17:30:02.652937500 +0100
    @@ -1,173 +1,419 @@
     {
         "features": [
             {
                 "geometry": {
                     "coordinates": [
    +                    8.347109,
    +                    49.6356295
    +                ],
    +                "type": "Point"
    +            },
    +            "type": "Feature",
    +            "properties": {
    +                "osm_id": 3760787919,
    +                "country": "Deutschland",
    +                "city": "Worms",
    +                "countrycode": "DE",
    +                "postcode": "67549",
    +                "type": "house",
    +                "osm_type": "N",
    +                "osm_key": "shop",
    +                "housenumber": "8",
    +                "street": "Bebelstraße",
    +                "district": "Innenstadt-West",
    +                "osm_value": "supermarket",
    +                "name": "Rewe Rodriguez",
    +                "state": "Rheinland-Pfalz"
    +            }
    +        },
    +        {
    +            "geometry": {
    +                "coordinates": [
                         8.1017907,
                         49.739473
                     ],
                     "type": "Point"
                 },
                 "type": "Feature",
                 "properties": {
                     "osm_id": 9263353737,
                     "country": "Deutschland",
                     "city": "Alzey",
                     "countrycode": "DE",
                     "postcode": "55232",
                     "county": "Landkreis Alzey-Worms",
                     "type": "house",
                     "osm_type": "N",
                     "osm_key": "highway",
                     "street": "Wilhelm-Leuschner-Straße",
                     "osm_value": "bus_stop",
                     "name": "REWE Markt",
                     "state": "Rheinland-Pfalz"
                 }
             },
             {
                 "geometry": {
                     "coordinates": [
    +                    8.255338044250623,
    +                    49.70327295
    +                ],
    +                "type": "Point"
    +            },
    +            "type": "Feature",
    +            "properties": {
    +                "osm_id": 92716709,
    +                "extent": [
    +                    8.2548425,
    +                    49.7035449,
    +                    8.2558336,
    +                    49.7030011
    +                ],
    +                "country": "Deutschland",
    +                "city": "Westhofen",
    +                "countrycode": "DE",
    +                "postcode": "67593",
    +                "county": "Landkreis Alzey-Worms",
    +                "type": "house",
    +                "osm_type": "W",
    +                "osm_key": "shop",
    +                "housenumber": "2",
    +                "street": "An der Brennerei",
    +                "osm_value": "supermarket",
    +                "name": "REWE",
    +                "state": "Rheinland-Pfalz"
    +            }
    +        },
    +        {
    +            "geometry": {
    +                "coordinates": [
    +                    8.32932446362749,
    +                    49.61427555
    +                ],
    +                "type": "Point"
    +            },
    +            "type": "Feature",
    +            "properties": {
    +                "osm_id": 263458970,
    +                "extent": [
    +                    8.329072,
    +                    49.614444,
    +                    8.3297102,
    +                    49.6138524
    +                ],
    +                "country": "Deutschland",
    +                "city": "Worms",
    +                "countrycode": "DE",
    +                "postcode": "67551",
    +                "type": "house",
    +                "osm_type": "W",
    +                "osm_key": "shop",
    +                "housenumber": "90",
    +                "street": "Kolpingstraße",
    +                "district": "Horchheim",
    +                "osm_value": "supermarket",
    +                "name": "REWE",
    +                "state": "Rheinland-Pfalz"
    +            }
    +        },
    +        {
    +            "geometry": {
    +                "coordinates": [
    +                    8.113043859472903,
    +                    49.84437295
    +                ],
    +                "type": "Point"
    +            },
    +            "type": "Feature",
    +            "properties": {
    +                "osm_id": 93122355,
    +                "extent": [
    +                    8.1126669,
    +                    49.8447412,
    +                    8.1134208,
    +                    49.8440048
    +                ],
    +                "country": "Deutschland",
    +                "city": "Wörrstadt",
    +                "countrycode": "DE",
    +                "postcode": "55286",
    +                "county": "Landkreis Alzey-Worms",
    +                "type": "house",
    +                "osm_type": "W",
    +                "osm_key": "shop",
    +                "housenumber": "81",
    +                "street": "Friedrich-Ebert-Straße",
    +                "osm_value": "supermarket",
    +                "name": "REWE",
    +                "state": "Rheinland-Pfalz"
    +            }
    +        },
    +        {
    +            "geometry": {
    +                "coordinates": [
                         8.100618018238372,
                         49.740460999999996
                     ],
                     "type": "Point"
                 },
                 "type": "Feature",
                 "properties": {
                     "osm_id": 329059041,
                     "extent": [
                         8.1003758,
                         49.7406577,
                         8.1008585,
                         49.7402432
                     ],
                     "country": "Deutschland",
                     "city": "Alzey",
                     "countrycode": "DE",
                     "postcode": "55232",
                     "county": "Landkreis Alzey-Worms",
                     "type": "house",
                     "osm_type": "W",
                     "osm_key": "shop",
                     "street": "Wilhelm-Leuschner-Straße",
                     "osm_value": "beverages",
                     "name": "REWE Getränkemarkt",
                     "state": "Rheinland-Pfalz"
                 }
             },
             {
                 "geometry": {
                     "coordinates": [
    +                    8.188491164372667,
    +                    49.7776827
    +                ],
    +                "type": "Point"
    +            },
    +            "type": "Feature",
    +            "properties": {
    +                "osm_id": 66941623,
    +                "extent": [
    +                    8.1879915,
    +                    49.7781287,
    +                    8.1889299,
    +                    49.7774186
    +                ],
    +                "country": "Deutschland",
    +                "city": "Gau-Odernheim",
    +                "countrycode": "DE",
    +                "postcode": "55239",
    +                "county": "Landkreis Alzey-Worms",
    +                "type": "house",
    +                "osm_type": "W",
    +                "osm_key": "man_made",
    +                "housenumber": "31",
    +                "street": "Bahnstraße",
    +                "district": "Gau-Köngernheim",
    +                "osm_value": "surveillance",
    +                "name": "REWE",
    +                "state": "Rheinland-Pfalz"
    +            }
    +        },
    +        {
    +            "geometry": {
    +                "coordinates": [
    +                    8.3845894,
    +                    49.7432109
    +                ],
    +                "type": "Point"
    +            },
    +            "type": "Feature",
    +            "properties": {
    +                "osm_id": 7599698606,
    +                "country": "Deutschland",
    +                "city": "Eich",
    +                "countrycode": "DE",
    +                "postcode": "67575",
    +                "county": "Landkreis Alzey-Worms",
    +                "type": "house",
    +                "osm_type": "N",
    +                "osm_key": "shop",
    +                "housenumber": "1",
    +                "street": "In der Hochgewann",
    +                "osm_value": "supermarket",
    +                "name": "Rewe",
    +                "state": "Rheinland-Pfalz"
    +            }
    +        },
    +        {
    +            "geometry": {
    +                "coordinates": [
                         8.3474491,
                         49.6320007
                     ],
                     "type": "Point"
                 },
                 "type": "Feature",
                 "properties": {
                     "osm_id": 5860276188,
                     "country": "Deutschland",
                     "city": "Worms",
                     "countrycode": "DE",
                     "postcode": "67549",
                     "type": "house",
                     "osm_type": "N",
                     "osm_key": "shop",
                     "street": "Alzeyer Straße",
                     "district": "Innenstadt-West",
                     "osm_value": "convenience",
                     "name": "REWE To Go",
                     "state": "Rheinland-Pfalz"
                 }
             },
             {
                 "geometry": {
                     "coordinates": [
    +                    8.188491164372667,
    +                    49.7776827
    +                ],
    +                "type": "Point"
    +            },
    +            "type": "Feature",
    +            "properties": {
    +                "osm_id": 66941623,
    +                "extent": [
    +                    8.1879915,
    +                    49.7781287,
    +                    8.1889299,
    +                    49.7774186
    +                ],
    +                "country": "Deutschland",
    +                "city": "Gau-Odernheim",
    +                "countrycode": "DE",
    +                "postcode": "55239",
    +                "county": "Landkreis Alzey-Worms",
    +                "type": "house",
    +                "osm_type": "W",
    +                "osm_key": "shop",
    +                "housenumber": "31",
    +                "street": "Bahnstraße",
    +                "district": "Gau-Köngernheim",
    +                "osm_value": "supermarket",
    +                "name": "REWE",
    +                "state": "Rheinland-Pfalz"
    +            }
    +        },
    +        {
    +            "geometry": {
    +                "coordinates": [
    +                    8.338724519868514,
    +                    49.64937705
    +                ],
    +                "type": "Point"
    +            },
    +            "type": "Feature",
    +            "properties": {
    +                "osm_id": 262350366,
    +                "extent": [
    +                    8.338198,
    +                    49.6495782,
    +                    8.3392649,
    +                    49.6491648
    +                ],
    +                "country": "Deutschland",
    +                "city": "Worms",
    +                "countrycode": "DE",
    +                "postcode": "67550",
    +                "type": "house",
    +                "osm_type": "W",
    +                "osm_key": "shop",
    +                "housenumber": "3",
    +                "street": "Dr.-Carl-Sonnenschein-Straße",
    +                "district": "Herrnsheim",
    +                "osm_value": "supermarket",
    +                "name": "Rewe",
    +                "state": "Rheinland-Pfalz"
    +            }
    +        },
    +        {
    +            "geometry": {
    +                "coordinates": [
                         8.1645288,
                         49.8757692
                     ],
                     "type": "Point"
                 },
                 "type": "Feature",
                 "properties": {
                     "osm_id": 734057691,
                     "country": "Deutschland",
                     "city": "Saulheim",
                     "countrycode": "DE",
                     "postcode": "55291",
                     "county": "Landkreis Alzey-Worms",
                     "type": "house",
                     "osm_type": "N",
                     "osm_key": "shop",
                     "street": "Marie-Curie-Ring",
                     "osm_value": "supermarket",
                     "name": "Rewe",
                     "state": "Rheinland-Pfalz"
                 }
             },
             {
                 "geometry": {
                     "coordinates": [
                         8.163955394398851,
                         49.87585765
                     ],
                     "type": "Point"
                 },
                 "type": "Feature",
                 "properties": {
                     "osm_id": 59190638,
                     "extent": [
                         8.1636344,
                         49.876129,
                         8.1645499,
                         49.8756643
                     ],
                     "country": "Deutschland",
                     "city": "Saulheim",
                     "countrycode": "DE",
                     "postcode": "55291",
                     "county": "Landkreis Alzey-Worms",
                     "type": "house",
                     "osm_type": "W",
                     "osm_key": "amenity",
                     "street": "Marie-Curie-Ring",
                     "osm_value": "parking",
                     "name": "REWE",
                     "state": "Rheinland-Pfalz"
                 }
             },
             {
                 "geometry": {
                     "coordinates": [
                         8.101649515275245,
                         49.740010299999994
                     ],
                     "type": "Point"
                 },
                 "type": "Feature",
                 "properties": {
                     "osm_id": 252275813,
                     "extent": [
                         8.1012376,
                         49.7402462,
                         8.1020056,
                         49.7397955
                     ],
                     "country": "Deutschland",
                     "city": "Alzey",
                     "countrycode": "DE",
                     "postcode": "55232",
                     "county": "Landkreis Alzey-Worms",
                     "type": "house",
                     "osm_type": "W",
                     "osm_key": "shop",
                     "street": "Wilhelm-Leuschner-Straße",
                     "osm_value": "supermarket",
                     "name": "REWE",
                     "state": "Rheinland-Pfalz"
                 }
             }
         ],
         "type": "FeatureCollection"
     }
    
    opened by git-commit 1
Releases(0.4.2)
  • 0.4.2(Nov 19, 2022)

    This release adapts the import process to some recent changes in the name handling of linked places in Nominatim. Names of linked places now appear in an artificial _place_name tag which Photon needs to read in addition to the usual name tags.

    On the search side, two changes attempt to improve fuzzy matching of search results:

    • Skipping of words is no longer allowed for short two-word queries. ES otherwise prefers to sometimes skip one of two words instead of matching against a wrongly spelled word.
    • Fuzzy matching is now attempted against all languages variants, not only against the chosen output language. There still is a restriction that multi-lingual queries don't work with fuzzy matching.
    Source code(tar.gz)
    Source code(zip)
    photon-0.4.2.jar(37.31 MB)
  • 0.4.1(Aug 31, 2022)

  • 0.4.0(Jul 30, 2022)

    This release brings limited support for synonym lists and classification terms (#585). This allows simple replacements of terms at query time. See the documentation for details on how to configure and use synonyms.

    The API endpoints for updates is now disabled by default for security reasons. If you want to trigger updates while Photon is running, start Photon with -enable-update-api. Note: updates are not supported against version of Nominatim >= 4.0. See #638 for details.

    The search and reverse APIs have a new filter parameter layer. It allows to restrict results to a certain address level like house, street or city. Use multiple times to allow more than one level. Thanks to @macolu for implementing this feature.

    This release makes some changes to the database schema. Database dumps from versions < 0.4 are not compatible. The extracts on the graphhopper extract server have been updated to provide extracts for this new release. If you still need to run an older version of photon, there is a final set of dumps for versions 0.3.4 and 0.3.5 in the archived/0.3 directory.

    Further changes:

    • compatibility fixes for the upcoming version 4.1 of Nominatim (#635)
    • log4j JndiLookup class removed for security reasons (#621)
    • fix duplicate call to completeDoc on updates (#639)
    • add sanity checks for housenumbers (#642)
    • remove dependencies to jackson-jaxrs, common-io, guava and nv-i18n
    • ensure import thread is always terminated (#650, thanks @codepainters)
    • dependencies updated to latest versions
    • code cleanup and reorganization (#648, #651, #653, #655, #661, thanks @tahini)
    Source code(tar.gz)
    Source code(zip)
    photon-0.4.0.jar(37.30 MB)
  • 0.3.5(Jul 12, 2021)

    This release introduces a major reorganisation of the query structure resulting in better results for mixed-lingual queries (#538), addresses with house numbers, short terms for search-completion-requests and queries with a location bias (#580). There is a new parameter 'zoom' for the location bias which allows to indicate the extent to which the location bias is applicable.

    The Photon database now can save global properties (#582). This is currently used to ensure that the database is compatible with the Photon version running and to remember the languages that were imported into the database. The latter means that the -language parameter is not longer necessary when running Photon in server mode.

    There is a new parameter -extra-tags which is applicable at import time (#576). It takes a comma-separated list of tags to import from Nominatim's extratags column. The imported tags are displayed on result but are not searchable.

    Further changes:

    • output importance and ES score in debug mode (#578)
    • improve import speed for POI objects (#547, thanks to @alfmarcua)
    • code cleanup and modernisation (#510, #511, #517, #518, #519, #520)
    • extend test suite (#515, #526, #587)
    • update dependencies (#505, #513, #524, #571)
    • improve startup of internal ES server (#506, #521)
    • included website converted to static site (#500, #501, #502)
    • demo server switched to https://photon.komoot.io (#508)
    Source code(tar.gz)
    Source code(zip)
    photon-0.3.5.jar(38.95 MB)
  • 0.3.4(Sep 13, 2020)

    This is a bug-fix release which fixes the following issues:

    • missing state and county information (#483, #492)
    • missing country code due to incompatible library change (#491)
    • adapt to new location of linking information in Nominatim (#490)
    • make popups on website readable (#486)
    Source code(tar.gz)
    Source code(zip)
    photon-0.3.4.jar(38.56 MB)
  • 0.3.3(Jul 8, 2020)

    This release adds major improvements to the computation of the address for each place. Please note that when you create a Photon database yourself, then you need Nominatim >= 3.5.1 to fully benefit from the changes. The weekly dumps already contain the improved addresses.

    Further changes:

    • new command-line option for running updates (#454)
    • update dependencies (#459, #461)
    • add new fields: county, district, locality and type (#303, #468, #473)
    • allow searching for house name (#458)
    • respect Accept-Language header (#413)
    • make default language configurable (#469)

    The default behaviour for Photon is now to return the local language unless the use chooses a language via the lang parameter or the Accept-Language header. To revert to the previous behaviour of returning the English version as default, please run photon with -default-language en.

    Source code(tar.gz)
    Source code(zip)
    photon-0.3.3.jar(38.56 MB)
  • 0.3.2(Nov 29, 2019)

    This release adds the following new features to the API:

    • new options for enabling CORS headers (#398)
    • new bbox parameter (#364, #421)
    • output country codes (#425)
    • new debug flag for debugging ES queries (#407)

    In addition, it adds improvements to the developement infrastructure:

    • improve dependency handling (#399)
    • add support for Java 11 (#408, #409)
    • add API-level tests next to existing unit tests (#420)

    Many thanks to all contributors.

    Note: when updating from an older version of Photon, you need to remove the module jar files from your photon data directory. Run rm photon_data/elasticsearch/modules/lang-painless/*jar (where photo_data is your photon data directory). If you forget to do this, startup fails with Jar Hell.

    Source code(tar.gz)
    Source code(zip)
    photon-0.3.2.jar(37.44 MB)
  • 0.3.1(Mar 8, 2019)

    This is a bug fix release which fixes the following issues:

    • respect -cluster setting also when running standalone (#331)
    • remove diacritics from words (#330)
    • set distance_sort default to true for ReverseRequest (#328)
    • add osm_value to dedupe key (#367)
    • fix scripts for continuous updates from nominatim
    • compatibility with latest nominatim version
    Source code(tar.gz)
    Source code(zip)
    photon-0.3.1.jar(37.43 MB)
  • 0.3.0(Apr 14, 2018)

    This release contains major updates of the software dependencies:

    • update elasticsearch to 5.5
    • update sparkjava, groovy and painless
    • switch to slf4j-log4j
    • add support for JDK9
    • update to Nominatim 3.1.0

    In addition, there are the following functional changes:

    • improve performance of reverse geocoding
    • improve house number handling (interpolations, housenumbers with hyphens)
    • improve algorithm for computing location bias
    • new country code filter for export
    • new parameter limit and radius for reverse geocoding
    Source code(tar.gz)
    Source code(zip)
    photon-0.3.0.jar(37.30 MB)
  • 0.2(Jan 16, 2015)

    Changes

    • state information is returned #102
    • test framework working
    • updated to latest elasticsearch version (1.1 -> 1.3.2)
    • disable dynamic mapping of elasticsearch
    • add regional name to index https://github.com/komoot/photon/commit/a8bc9b255ddffd47103172b579e47fd38c642786
    • dynamic language https://github.com/komoot/photon/pull/125
    • code cleanup and documentation
    Source code(tar.gz)
    Source code(zip)
    photon-0.2.0.jar(28.85 MB)
  • 0.1.2(Oct 31, 2014)

  • 0.1.1(Oct 12, 2014)

  • v0.1(Aug 14, 2014)

Owner
komoot
komoot
Planetiler - Flexible tool to build planet-scale vector tilesets from OpenStreetMap data in a few hours

Planetiler Planetiler (pla·nuh·tai·lr, formerly named "Flatmap") is a tool that generates Mapbox Vector Tiles from geographic data sources like OpenSt

On The Go Map 749 Jan 2, 2023
Flexible tool to build planet-scale vector tilesets from OpenStreetMap data in a few hours

Planetiler Planetiler (pla·nuh·tai·lr, formerly named "Flatmap") is a tool that generates Vector Tiles from geographic data sources like OpenStreetMap

On The Go Map 748 Dec 27, 2022
OpenMap is an Open Source JavaBeans-based programmer's toolkit. Using OpenMap, you can quickly build applications and applets that access data from legacy databases and applications.

$Source: /cvs/distapps/openmap/README,v $ $RCSfile: README,v $ $Revision: 1.11 $ $Date: 2002/11/06 19:11:02 $ $Author: bmackiew $ OpenMap(tm) What

OpenMap 65 Nov 12, 2022
GeoServer is an open source software server written in Java that allows users to share and edit geospatial data

GeoServer is an open source software server written in Java that allows users to share and edit geospatial data. Designed for interoperability, it publishes data from any major spatial data source using open standards.

GeoServer 3k Jan 1, 2023
An open-source GIS and remote sensing package

Whitebox Geospatial Analysis Tools This page is related to the open-source GIS Whitebox GAT. If you are instead interested in the stand-alone command-

John Lindsay 170 Apr 5, 2021
Open source routing engine for OpenStreetMap. Use it as Java library or server.

GraphHopper Routing Engine GraphHopper is a fast and memory efficient Java routing engine, released under Apache License 2.0. By default it uses OpenS

GraphHopper 4k Jan 3, 2023
Planetiler - Flexible tool to build planet-scale vector tilesets from OpenStreetMap data in a few hours

Planetiler Planetiler (pla·nuh·tai·lr, formerly named "Flatmap") is a tool that generates Mapbox Vector Tiles from geographic data sources like OpenSt

On The Go Map 749 Jan 2, 2023
Flexible tool to build planet-scale vector tilesets from OpenStreetMap data in a few hours

Planetiler Planetiler (pla·nuh·tai·lr, formerly named "Flatmap") is a tool that generates Vector Tiles from geographic data sources like OpenStreetMap

On The Go Map 748 Dec 27, 2022
Infinispan is an open source data grid platform and highly scalable NoSQL cloud data store.

The Infinispan project Infinispan is an open source (under the Apache License, v2.0) data grid platform. For more information on Infinispan, including

Infinispan 1k Dec 31, 2022
A distributed data integration framework that simplifies common aspects of big data integration such as data ingestion, replication, organization and lifecycle management for both streaming and batch data ecosystems.

Apache Gobblin Apache Gobblin is a highly scalable data management solution for structured and byte-oriented data in heterogeneous data ecosystems. Ca

The Apache Software Foundation 2.1k Jan 4, 2023
Sourcetrail - free and open-source interactive source explorer

Sourcetrail Sourcetrail is a free and open-source cross-platform source explorer that helps you get productive on unfamiliar source code. Windows: Lin

Coati Software 13.2k Jan 5, 2023
Source code of APK-Explorer-Editor (AEE), an open-source tool to explore the contents of an installed APK!

APK Explorer & Editor (AEE) APK Explorer & Editor, an open-source tool to explore the contents of an installed APK, is strictly made with an aim to in

APK Explorer & Editor 271 Jan 8, 2023
Open Source In-Memory Data Grid

Hazelcast Hazelcast is an open-source distributed in-memory data store and computation platform. It provides a wide variety of distributed data struct

hazelcast 5.2k Dec 31, 2022
Apache Camel is an open source integration framework that empowers you to quickly and easily integrate various systems consuming or producing data.

Apache Camel Apache Camel is a powerful, open-source integration framework based on prevalent Enterprise Integration Patterns with powerful bean integ

The Apache Software Foundation 4.7k Dec 31, 2022
OpenRefine is a free, open source power tool for working with messy data and improving it

OpenRefine OpenRefine is a Java-based power tool that allows you to load data, understand it, clean it up, reconcile it, and augment it with data comi

OpenRefine 9.2k Jan 1, 2023
SAMOA (Scalable Advanced Massive Online Analysis) is an open-source platform for mining big data streams.

SAMOA: Scalable Advanced Massive Online Analysis. This repository is discontinued. The development of SAMOA has moved over to the Apache Software Foun

Yahoo Archive 424 Dec 28, 2022
Apache Camel is an open source integration framework that empowers you to quickly and easily integrate various systems consuming or producing data.

Apache Camel Apache Camel is a powerful, open-source integration framework based on prevalent Enterprise Integration Patterns with powerful bean integ

The Apache Software Foundation 4.7k Jan 8, 2023
OpenMap is an Open Source JavaBeans-based programmer's toolkit. Using OpenMap, you can quickly build applications and applets that access data from legacy databases and applications.

$Source: /cvs/distapps/openmap/README,v $ $RCSfile: README,v $ $Revision: 1.11 $ $Date: 2002/11/06 19:11:02 $ $Author: bmackiew $ OpenMap(tm) What

OpenMap 65 Nov 12, 2022