├── .github
└── workflows
│ └── elasticsearch-image-builder.yml
├── .gitignore
├── .gitmodules
├── LICENSE
├── README.md
├── cmd
├── docker.sh
├── download.sh
├── elastic.sh
├── import.sh
├── prepare.sh
├── system.sh
└── test.sh
├── common
└── preview
│ └── index.html
├── images
├── elasticsearch
│ ├── 2.4
│ │ ├── Dockerfile
│ │ └── elasticsearch.yml
│ ├── 5.6.12
│ │ ├── Dockerfile
│ │ └── elasticsearch.yml
│ ├── 6.8.5
│ │ ├── Dockerfile
│ │ └── elasticsearch.yml
│ ├── 7.17.15
│ │ ├── Dockerfile
│ │ └── elasticsearch.yml
│ ├── 7.5.1
│ │ ├── Dockerfile
│ │ └── elasticsearch.yml
│ └── 8.12.2-beta
│ │ ├── Dockerfile
│ │ └── elasticsearch.yml
└── valhalla
│ └── Dockerfile
├── lib
├── cli.sh
└── env.sh
├── pelias
└── projects
├── australia
├── .env
├── README.md
├── blacklist
│ └── osm.txt
├── docker-compose.yml
├── pelias.json
└── test_cases
│ ├── search_address.json
│ └── search_venue.json
├── austria
├── .env
├── README.md
├── docker-compose.yml
├── elasticsearch.yml
└── pelias.json
├── belgium
├── .env
├── README.md
├── docker-compose.yml
├── elasticsearch.yml
└── pelias.json
├── brazil
├── .env
├── README.md
├── blacklist
│ └── osm.txt
├── docker-compose.yml
└── pelias.json
├── denmark
├── .env
├── README.md
├── docker-compose.yml
├── elasticsearch.yml
└── pelias.json
├── france
├── .env
├── README.md
├── docker-compose.yml
├── elasticsearch.yml
└── pelias.json
├── germany
├── .env
├── README.md
├── docker-compose.yml
├── elasticsearch.yml
└── pelias.json
├── israel
├── .env
├── README.md
├── blacklist
│ └── osm.txt
├── docker-compose.yml
├── elasticsearch.yml
└── pelias.json
├── italy
├── .env
├── README.md
├── docker-compose.yml
├── elasticsearch.yml
└── pelias.json
├── jamaica
├── .env
├── README.md
├── blacklist
│ └── osm.txt
├── docker-compose.yml
├── pelias.json
└── test_cases
│ ├── search_address.json
│ └── search_venue.json
├── kyrgyzstan
├── .env
├── README.md
├── docker-compose.yml
├── elasticsearch.yml
└── pelias.json
├── las-vegas-metro
├── .env
├── README.md
├── docker-compose.yml
├── pelias.json
├── synonyms
│ ├── custom_name.txt
│ └── custom_street.txt
└── test_cases
│ ├── search_address.json
│ └── search_venue.json
├── lithuania
├── .env
├── README.md
├── docker-compose.yml
├── elasticsearch.yml
└── pelias.json
├── los-angeles-metro
├── .env
├── README.md
├── docker-compose.yml
├── pelias.json
├── synonyms
│ ├── custom_name.txt
│ └── custom_street.txt
└── test_cases
│ └── search_venue.json
├── netherlands
├── .env
├── README.md
├── docker-compose.yml
├── elasticsearch.yml
└── pelias.json
├── new-york-city
├── .env
├── README.md
├── blacklist
│ └── osm.txt
├── docker-compose.yml
├── pelias.json
├── synonyms
│ ├── custom_name.txt
│ └── custom_street.txt
└── test_cases
│ ├── search_address.json
│ └── search_venue.json
├── north-america
├── .env
├── README.md
├── docker-compose.yml
├── pelias.json
└── test_cases
│ ├── address_interpolation.json
│ ├── address_matching.json
│ ├── address_parsing.json
│ ├── address_type.json
│ ├── admin_lookup.json
│ ├── autocomplete_acushnet_antiques.json
│ ├── autocomplete_admin_areas.json
│ ├── autocomplete_boundary_country.json
│ ├── autocomplete_boundary_rect.json
│ ├── autocomplete_daly_city.json
│ ├── autocomplete_focus.json
│ ├── autocomplete_jitter.json
│ ├── autocomplete_poi.json
│ ├── autocomplete_stop_words.json
│ ├── autocomplete_street_centroids.json
│ ├── autocomplete_street_fallback.json
│ ├── autocomplete_streets.json
│ ├── autocomplete_venues.json
│ ├── balance.json
│ ├── brooklyn.json
│ ├── confidence_score.json
│ ├── encoding.json
│ ├── exact_matches.json
│ ├── fallback.json
│ ├── international.json
│ ├── labels.json
│ ├── landmarks.json
│ ├── missing_postcodes.json
│ ├── place.json
│ ├── placeholder_altnames.json
│ ├── placeholder_general.json
│ ├── placeholder_geometric_filters.json
│ ├── placeholder_sorting.json
│ ├── properties_source_id.json
│ ├── quattroshapes_popularity.json
│ ├── reverse_address.json
│ ├── reverse_coarse.json
│ ├── reverse_coordinate_wrapping.json
│ ├── san_francisco.json
│ ├── search.json
│ ├── search_abbreviations.json
│ ├── search_city_country.json
│ ├── search_coarse.json
│ ├── search_geodisambiguation.json
│ ├── search_iso2_to_iso3.json
│ ├── search_layers.json
│ ├── search_poi.json
│ ├── search_postalcodes.json
│ ├── search_street_centroids.json
│ ├── structured_address_parsing.json
│ ├── structured_geocoding.json
│ ├── structured_postalcodes.json
│ ├── tizen-sdk-geocoder.json
│ ├── tizen-sdk-places.json
│ ├── university.json
│ ├── washington_dc.json
│ ├── wof_counties.json
│ ├── wof_countries.json
│ ├── wof_localadmins.json
│ ├── wof_localities.json
│ ├── wof_neighbourhoods.json
│ └── wof_regions.json
├── norway
├── .env
├── README.md
├── docker-compose.yml
├── elasticsearch.yml
└── pelias.json
├── planet
├── .env
├── README.md
├── docker-compose.yml
├── pelias.json
└── test_cases
├── poland
├── .env
├── README.md
├── docker-compose.yml
├── elasticsearch.yml
├── pelias.json
└── test_cases
│ └── search_address.json
├── portland-metro
├── .env
├── README.md
├── blacklist
│ └── osm.txt
├── docker-compose.yml
├── pelias.json
├── synonyms
│ ├── custom_name.txt
│ └── custom_street.txt
└── test_cases
│ ├── libpostal_quirks.json
│ ├── search_address.json
│ └── search_venue.json
├── san-jose-metro
├── .env
├── README.md
├── docker-compose.yml
├── pelias.json
├── synonyms
│ ├── custom_name.txt
│ └── custom_street.txt
└── test_cases
│ └── search_venue.json
├── singapore
├── .env
├── README.md
├── docker-compose.yml
├── pelias.json
└── test_cases
│ └── search_venue.json
├── south-africa
├── .env
├── README.md
├── docker-compose.yml
├── pelias.json
├── synonyms
│ ├── custom_name.txt
│ └── custom_street.txt
└── test_cases
│ └── search_address.json
├── south-america
├── .env
├── README.md
├── blacklist
│ └── osm.txt
├── docker-compose.yml
└── pelias.json
└── texas
├── .env
├── README.md
├── blacklist
└── osm.txt
├── docker-compose.yml
├── pelias.json
├── synonyms
├── custom_name.txt
└── custom_street.txt
└── test_cases
├── libpostal_quirks.json
├── search_address.json
└── search_venue.json
/.github/workflows/elasticsearch-image-builder.yml:
--------------------------------------------------------------------------------
1 | # name: Build Docker Images
2 | # on:
3 | # push:
4 | # paths:
5 | # - "images/elasticsearch/**"
6 | # - ".github/workflows/**"
7 | # jobs:
8 | # build:
9 | # if: github.ref == 'refs/heads/master' && needs.unit-tests.result == 'success'
10 | # runs-on: ubuntu-22.04
11 | # strategy:
12 | # matrix:
13 | # elastic-version:
14 | # - "7.17.15"
15 | # env:
16 | # DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
17 | # DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
18 | # steps:
19 | # - uses: actions/checkout@v2
20 | # with:
21 | # fetch-depth: 100
22 | # - name: "Build elasticsearch@${{ matrix.elastic-version }}"
23 | # run: |
24 | # cd images/elasticsearch/${{ matrix.elastic-version }}
25 | # curl "https://raw.githubusercontent.com/pelias/ci-tools/master/build-docker-images.sh" | bash -
26 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | projects/*/data
2 | .DS_Store
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "projects/planet/acceptance-tests"]
2 | path = projects/planet/acceptance-tests
3 | url = https://github.com/pelias/acceptance-tests.git
4 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2018 Pelias Contributors
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/cmd/docker.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e;
3 |
4 | function net_init(){
5 | docker network create ${COMPOSE_PROJECT_NAME}_default &>/dev/null || true
6 | }
7 |
8 | function compose_pull(){ compose_exec pull; }
9 | register 'compose' 'pull' 'update all docker images' compose_pull
10 |
11 | function compose_logs(){ compose_exec logs $@; }
12 | register 'compose' 'logs' 'display container logs' compose_logs
13 |
14 | function compose_ps(){ compose_exec ps $@; }
15 | register 'compose' 'ps' 'list containers' compose_ps
16 |
17 | function compose_top(){ compose_exec top $@; }
18 | register 'compose' 'top' 'display the running processes of a container' compose_top
19 |
20 | # the 'docker compose' subcommand is now the recommended method of calling compose.
21 | # if not available, we fallback to the legacy 'docker-compose' command.
22 | function compose_exec(){
23 | NATIVE_COMPOSE_VERSION=$(docker compose version 2> /dev/null || true)
24 | if [ -z "$NATIVE_COMPOSE_VERSION" ]; then
25 | docker-compose $@;
26 | else
27 | docker compose $@;
28 | fi
29 | }
30 | register 'compose' 'exec' 'execute an arbitrary `docker compose` command' compose_exec
31 |
32 | function compose_run(){ net_init; compose_exec run --rm $@; }
33 | register 'compose' 'run' 'execute a `docker compose` run command' compose_run
34 |
35 | function compose_up(){ compose_exec up -d $@; }
36 | register 'compose' 'up' 'start one or more `docker compose` service(s)' compose_up
37 |
38 | function compose_kill(){ compose_exec kill $@; }
39 | register 'compose' 'kill' 'kill one or more `docker compose` service(s)' compose_kill
40 |
41 | function compose_down(){ compose_exec down; }
42 | register 'compose' 'down' 'stop all `docker compose` service(s)' compose_down
43 |
44 |
--------------------------------------------------------------------------------
/cmd/download.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e;
3 |
4 | # per-source downloads
5 | function download_wof(){ compose_run -T 'whosonfirst' './bin/download'; }
6 | function download_oa(){ compose_run -T 'openaddresses' './bin/download'; }
7 | function download_osm(){ compose_run -T 'openstreetmap' './bin/download'; }
8 | function download_geonames(){ compose_run -T 'geonames' './bin/download'; }
9 | function download_tiger(){ compose_run -T 'interpolation' './bin/download-tiger'; }
10 | function download_transit(){ compose_run -T 'transit' './bin/download'; }
11 | function download_csv(){ compose_run -T 'csv-importer' './bin/download'; }
12 |
13 | register 'download' 'wof' '(re)download whosonfirst data' download_wof
14 | register 'download' 'oa' '(re)download openaddresses data' download_oa
15 | register 'download' 'osm' '(re)download openstreetmap data' download_osm
16 | register 'download' 'geonames' '(re)download geonames data' download_geonames
17 | register 'download' 'tiger' '(re)download TIGER data' download_tiger
18 | register 'download' 'transit' '(re)download transit data' download_transit
19 | register 'download' 'csv' '(re)download csv data' download_csv
20 |
21 | # download all the data to be used by imports
22 | function download_all(){
23 | download_wof &
24 | download_oa &
25 | download_osm &
26 |
27 | if [[ "$ENABLE_GEONAMES" == "true" ]]; then
28 | download_geonames &
29 | fi
30 |
31 | download_tiger &
32 | download_transit &
33 | download_csv &
34 | wait
35 | }
36 |
37 | register 'download' 'all' '(re)download all data' download_all
38 |
--------------------------------------------------------------------------------
/cmd/elastic.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e;
3 |
4 | function elastic_schema_drop(){ compose_run 'schema' node scripts/drop_index "$@" || true; }
5 | function elastic_schema_create(){ compose_run 'schema' ./bin/create_index; }
6 | function elastic_start(){
7 | mkdir -p $DATA_DIR/elasticsearch
8 | # attemp to set proper permissions if running as root
9 | chown $DOCKER_USER $DATA_DIR/elasticsearch 2>/dev/null || true
10 | compose_exec up -d elasticsearch
11 | }
12 |
13 | function elastic_stop(){ compose_exec kill elasticsearch; }
14 |
15 | register 'elastic' 'drop' 'delete elasticsearch index & all data' elastic_schema_drop
16 | register 'elastic' 'create' 'create elasticsearch index with pelias mapping' elastic_schema_create
17 | register 'elastic' 'start' 'start elasticsearch server' elastic_start
18 | register 'elastic' 'stop' 'stop elasticsearch server' elastic_stop
19 |
20 | # to use this function:
21 | # if test $(elastic_status) -ne 200; then
22 | function elastic_status(){
23 | curl \
24 | --output /dev/null \
25 | --silent \
26 | --write-out "%{http_code}" \
27 | "http://${ELASTIC_HOST:-localhost:9200}/_cluster/health?wait_for_status=yellow&timeout=1s" \
28 | || true;
29 | }
30 |
31 | # the same function but with a trailing newline
32 | function elastic_status_newline(){ echo $(elastic_status); }
33 | register 'elastic' 'status' 'HTTP status code of the elasticsearch service' elastic_status_newline
34 |
35 | function elastic_wait(){
36 | echo 'waiting for elasticsearch service to come up';
37 | retry_count=30
38 |
39 | i=1
40 | while [[ "$i" -le "$retry_count" ]]; do
41 | if [[ $(elastic_status) -eq 200 ]]; then
42 | echo "Elasticsearch up!"
43 | exit 0
44 | elif [[ $(elastic_status) -eq 408 ]]; then
45 | # 408 indicates the server is up but not yet yellow status
46 | printf ":"
47 | else
48 | printf "."
49 | fi
50 | sleep 1
51 | i=$(($i + 1))
52 | done
53 |
54 | echo -e "\n"
55 | echo "Elasticsearch did not come up, check configuration"
56 | exit 1
57 | }
58 |
59 | register 'elastic' 'wait' 'wait for elasticsearch to start up' elastic_wait
60 |
61 | function elastic_info(){ curl -s "http://${ELASTIC_HOST:-localhost:9200}/"; }
62 | register 'elastic' 'info' 'display elasticsearch version and build info' elastic_info
63 |
64 | function elastic_stats(){
65 | curl -s "http://${ELASTIC_HOST:-localhost:9200}/${ELASTIC_INDEX:-pelias}/_search?request_cache=true&timeout=10s&pretty=true" \
66 | -H 'Content-Type: application/json' \
67 | -d '{
68 | "aggs": {
69 | "sources": {
70 | "terms": {
71 | "field": "source",
72 | "size": 100
73 | },
74 | "aggs": {
75 | "layers": {
76 | "terms": {
77 | "field": "layer",
78 | "size": 100
79 | }
80 | }
81 | }
82 | }
83 | },
84 | "size": 0
85 | }';
86 | }
87 | register 'elastic' 'stats' 'display a summary of doc counts per source/layer' elastic_stats
88 |
--------------------------------------------------------------------------------
/cmd/import.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e;
3 |
4 | # per-source imports
5 | function import_wof(){ compose_run 'whosonfirst' './bin/start'; }
6 | function import_oa(){ compose_run 'openaddresses' "./bin/parallel ${OPENADDRESSES_PARALLELISM:-1}"; }
7 | function import_osm(){ compose_run 'openstreetmap' './bin/start'; }
8 | function import_polylines(){ compose_run 'polylines' './bin/start'; }
9 | function import_geonames(){ compose_run 'geonames' './bin/start'; }
10 | function import_transit(){ compose_run 'transit' './bin/start'; }
11 | function import_csv(){ compose_run 'csv-importer' './bin/parallel' ${CSV_PARALLELISM:-1}; }
12 |
13 | register 'import' 'wof' '(re)import whosonfirst data' import_wof
14 | register 'import' 'oa' '(re)import openaddresses data' import_oa
15 | register 'import' 'osm' '(re)import openstreetmap data' import_osm
16 | register 'import' 'polylines' '(re)import polylines data' import_polylines
17 | register 'import' 'geonames' '(re)import geonames data' import_geonames
18 | register 'import' 'transit' '(re)import transit data' import_transit
19 | register 'import' 'csv' '(re)import csv data' import_csv
20 |
21 | # import all the data to be used by imports
22 | # note: running importers in parallel can cause issues due to high CPU & RAM requirements.
23 | function import_all(){
24 | import_wof
25 | import_oa
26 | import_osm
27 | import_polylines
28 |
29 | if [[ "$ENABLE_GEONAMES" == "true" ]]; then
30 | import_geonames
31 | fi
32 |
33 | import_transit
34 | import_csv
35 | }
36 |
37 | register 'import' 'all' '(re)import all data' import_all
38 |
--------------------------------------------------------------------------------
/cmd/prepare.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e;
3 |
4 | # per-source prepares
5 | function prepare_polylines(){ compose_run -T 'polylines' bash ./docker_extract.sh; }
6 | function prepare_interpolation(){ compose_run -T 'interpolation' bash ./docker_build.sh; }
7 | function prepare_placeholder(){
8 | compose_run -T 'placeholder' ./cmd/extract.sh;
9 | compose_run -T 'placeholder' ./cmd/build.sh;
10 | }
11 |
12 | register 'prepare' 'polylines' 'export road network from openstreetmap into polylines format' prepare_polylines
13 | register 'prepare' 'interpolation' 'build interpolation sqlite databases' prepare_interpolation
14 | register 'prepare' 'placeholder' 'build placeholder sqlite databases' prepare_placeholder
15 |
16 | # prepare all the data to be used by imports
17 | function prepare_all(){
18 | prepare_polylines &
19 | prepare_placeholder &
20 | wait
21 | prepare_interpolation
22 | }
23 |
24 | register 'prepare' 'all' 'build all services which have a prepare step' prepare_all
25 |
--------------------------------------------------------------------------------
/cmd/system.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e;
3 |
4 | function system_check(){ env_check; }
5 | register 'system' 'check' 'ensure the system is correctly configured' system_check
6 |
7 | function system_env(){ env; }
8 | register 'system' 'env' 'display environment variables' system_env
9 |
10 | function system_update(){ git -C $(dirname "${BASH_SOURCE[0]}") pull; }
11 | register 'system' 'update' 'update the pelias command by pulling the latest version' system_update
--------------------------------------------------------------------------------
/cmd/test.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e;
3 |
4 | # run acceptance tests
5 | function test_fuzzy(){ compose_run 'fuzzy-tester' -e 'docker' $@; }
6 |
7 | register 'test' 'run' 'run fuzzy-tester test cases' test_fuzzy
--------------------------------------------------------------------------------
/common/preview/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | pelias autocomplete demo
4 |
5 |
8 |
11 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/images/elasticsearch/2.4/Dockerfile:
--------------------------------------------------------------------------------
1 | # base image
2 | FROM elasticsearch:2.4
3 |
4 | # configure plugins
5 | RUN /usr/share/elasticsearch/bin/plugin install analysis-icu
6 | RUN /usr/share/elasticsearch/bin/plugin install cloud-aws
7 |
8 | # elasticsearch config
9 | ADD elasticsearch.yml /usr/share/elasticsearch/config/
10 | RUN chown elasticsearch:elasticsearch config/elasticsearch.yml
11 |
--------------------------------------------------------------------------------
/images/elasticsearch/2.4/elasticsearch.yml:
--------------------------------------------------------------------------------
1 | bootstrap.memory_lock: true
2 | network.host: 0.0.0.0
3 | http.port: 9200
4 | node.master: true
5 | node.data: true
6 | threadpool:
7 | bulk:
8 | queue_size: 1000
9 |
--------------------------------------------------------------------------------
/images/elasticsearch/5.6.12/Dockerfile:
--------------------------------------------------------------------------------
1 | # see: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
2 |
3 | # base image
4 | FROM docker.elastic.co/elasticsearch/elasticsearch:5.6.12
5 | USER root
6 |
7 | # environmental settings
8 | ENV ES_JAVA_OPTS '-Xms512m -Xmx512m'
9 | ENV cluster.name 'pelias-dev'
10 | ENV discovery.type 'single-node'
11 | ENV bootstrap.memory_lock 'true'
12 | RUN echo 'vm.max_map_count=262144' >> /etc/sysctl.conf
13 |
14 | # disable xpack
15 | RUN /usr/share/elasticsearch/bin/elasticsearch-plugin remove x-pack --purge
16 |
17 | # configure plugins
18 | RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-icu
19 | RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install repository-s3
20 |
21 | # elasticsearch config
22 | ADD elasticsearch.yml /usr/share/elasticsearch/config/
23 | RUN chown elasticsearch:elasticsearch config/elasticsearch.yml
24 |
25 | ## set permissions so any user can run elasticsearch
26 | # add read permissions to all files in dir
27 | RUN chmod go+r /usr/share/elasticsearch -R
28 | # add write permissions to config dir
29 | RUN chmod go+w /usr/share/elasticsearch \
30 | /usr/share/elasticsearch/config
31 | # add list permissions to directorys
32 | RUN chmod go+x /usr/share/elasticsearch \
33 | /usr/share/elasticsearch/config \
34 | /usr/share/elasticsearch/config/ingest-geoip \
35 | /usr/share/elasticsearch/config/repository-s3
36 | # add execute permissions to bins
37 | RUN chmod go+x /usr/share/elasticsearch/bin/*
38 |
39 | # run as elasticsearch user
40 | USER elasticsearch
41 |
--------------------------------------------------------------------------------
/images/elasticsearch/5.6.12/elasticsearch.yml:
--------------------------------------------------------------------------------
1 | bootstrap.memory_lock: true
2 | network.host: 0.0.0.0
3 | http.port: 9200
4 | node.master: true
5 | node.data: true
6 | thread_pool:
7 | bulk:
8 | queue_size: 1000
9 |
--------------------------------------------------------------------------------
/images/elasticsearch/6.8.5/Dockerfile:
--------------------------------------------------------------------------------
1 | # see: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
2 |
3 | # base image
4 | FROM docker.elastic.co/elasticsearch/elasticsearch:6.8.5
5 | USER root
6 |
7 | # environmental settings
8 | ENV ES_JAVA_OPTS '-Xms512m -Xmx512m'
9 | ENV cluster.name 'pelias-dev'
10 | ENV discovery.type 'single-node'
11 | ENV bootstrap.memory_lock 'true'
12 | RUN echo 'vm.max_map_count=262144' >> /etc/sysctl.conf
13 |
14 | # configure plugins
15 | RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-icu
16 | RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install repository-s3 --batch
17 |
18 | # elasticsearch config
19 | ADD elasticsearch.yml /usr/share/elasticsearch/config/
20 | RUN chown elasticsearch:elasticsearch config/elasticsearch.yml
21 |
22 | ## set permissions so any user can run elasticsearch
23 | # add read permissions to all files in dir
24 | RUN chmod go+r /usr/share/elasticsearch -R
25 |
26 | # add write permissions to config, log & data dirs
27 | RUN chmod go+w /usr/share/elasticsearch \
28 | /usr/share/elasticsearch/config \
29 | /usr/share/elasticsearch/logs \
30 | /usr/share/elasticsearch/data
31 |
32 | # add list permissions to directories
33 | RUN chmod go+x /usr/share/elasticsearch \
34 | /usr/share/elasticsearch/config \
35 | /usr/share/elasticsearch/config/repository-s3
36 |
37 | # add execute permissions to bins
38 | RUN chmod go+x /usr/share/elasticsearch/bin/*
39 |
40 | # run as elasticsearch user
41 | USER elasticsearch
42 |
--------------------------------------------------------------------------------
/images/elasticsearch/6.8.5/elasticsearch.yml:
--------------------------------------------------------------------------------
1 | bootstrap.memory_lock: true
2 | network.host: 0.0.0.0
3 | http.port: 9200
4 | node.master: true
5 | node.data: true
6 | thread_pool:
7 | bulk:
8 | queue_size: 1000
--------------------------------------------------------------------------------
/images/elasticsearch/7.17.15/Dockerfile:
--------------------------------------------------------------------------------
1 | # see: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
2 |
3 | # base image
4 | FROM docker.elastic.co/elasticsearch/elasticsearch:7.17.15
5 | USER root
6 |
7 | # environmental settings
8 | ENV ES_JAVA_OPTS '-Xms512m -Xmx512m'
9 | ENV cluster.name 'pelias-dev'
10 | ENV discovery.type 'single-node'
11 | ENV bootstrap.memory_lock 'true'
12 | RUN echo 'vm.max_map_count=262144' >> /etc/sysctl.conf
13 |
14 | # configure plugins
15 | RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-icu
16 | RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install repository-s3 --batch
17 |
18 | # elasticsearch config
19 | ADD elasticsearch.yml /usr/share/elasticsearch/config/
20 | RUN chown elasticsearch:elasticsearch config/elasticsearch.yml
21 |
22 | ## set permissions so any user can run elasticsearch
23 | # add read permissions to all files in dir
24 | RUN chmod go+r /usr/share/elasticsearch -R
25 |
26 | # add write permissions to config, log & data dirs
27 | RUN chmod go+w /usr/share/elasticsearch \
28 | /usr/share/elasticsearch/config \
29 | /usr/share/elasticsearch/logs \
30 | /usr/share/elasticsearch/data
31 |
32 | # add list permissions to directories
33 | RUN chmod go+x /usr/share/elasticsearch \
34 | /usr/share/elasticsearch/config \
35 | /usr/share/elasticsearch/config/repository-s3
36 |
37 | # add execute permissions to bins
38 | RUN chmod go+x /usr/share/elasticsearch/bin/*
39 |
40 | # run as elasticsearch user
41 | USER elasticsearch
42 |
--------------------------------------------------------------------------------
/images/elasticsearch/7.17.15/elasticsearch.yml:
--------------------------------------------------------------------------------
1 | bootstrap.memory_lock: true
2 | network.host: 0.0.0.0
3 | http.port: 9200
4 | node.master: true
5 | node.data: true
6 | thread_pool:
7 | write:
8 | queue_size: 1000
9 | indices.query.bool.max_clause_count: 4000
10 |
--------------------------------------------------------------------------------
/images/elasticsearch/7.5.1/Dockerfile:
--------------------------------------------------------------------------------
1 | # see: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
2 |
3 | # base image
4 | FROM docker.elastic.co/elasticsearch/elasticsearch:7.5.1
5 | USER root
6 |
7 | # environmental settings
8 | ENV ES_JAVA_OPTS '-Xms512m -Xmx512m'
9 | ENV cluster.name 'pelias-dev'
10 | ENV discovery.type 'single-node'
11 | ENV bootstrap.memory_lock 'true'
12 | RUN echo 'vm.max_map_count=262144' >> /etc/sysctl.conf
13 |
14 | # configure plugins
15 | RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-icu
16 | RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install repository-s3 --batch
17 |
18 | # elasticsearch config
19 | ADD elasticsearch.yml /usr/share/elasticsearch/config/
20 | RUN chown elasticsearch:elasticsearch config/elasticsearch.yml
21 |
22 | ## set permissions so any user can run elasticsearch
23 | # add read permissions to all files in dir
24 | RUN chmod go+r /usr/share/elasticsearch -R
25 |
26 | # add write permissions to config, log & data dirs
27 | RUN chmod go+w /usr/share/elasticsearch \
28 | /usr/share/elasticsearch/config \
29 | /usr/share/elasticsearch/logs \
30 | /usr/share/elasticsearch/data
31 |
32 | # add list permissions to directories
33 | RUN chmod go+x /usr/share/elasticsearch \
34 | /usr/share/elasticsearch/config \
35 | /usr/share/elasticsearch/config/repository-s3
36 |
37 | # add execute permissions to bins
38 | RUN chmod go+x /usr/share/elasticsearch/bin/*
39 |
40 | # run as elasticsearch user
41 | USER elasticsearch
42 |
--------------------------------------------------------------------------------
/images/elasticsearch/7.5.1/elasticsearch.yml:
--------------------------------------------------------------------------------
1 | bootstrap.memory_lock: true
2 | network.host: 0.0.0.0
3 | http.port: 9200
4 | node.master: true
5 | node.data: true
6 | thread_pool:
7 | write:
8 | queue_size: 1000
9 | indices.query.bool.max_clause_count: 4000
10 |
--------------------------------------------------------------------------------
/images/elasticsearch/8.12.2-beta/Dockerfile:
--------------------------------------------------------------------------------
1 | # see: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
2 |
3 | # base image
4 | FROM docker.elastic.co/elasticsearch/elasticsearch:8.12.2
5 | USER root
6 |
7 | # environmental settings
8 | ENV ES_JAVA_OPTS '-Xms512m -Xmx512m'
9 | ENV cluster.name 'pelias-dev'
10 | ENV discovery.type 'single-node'
11 | ENV bootstrap.memory_lock 'true'
12 | RUN echo 'vm.max_map_count=262144' >> /etc/sysctl.conf
13 |
14 | # configure plugins
15 | RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-icu
16 | RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install repository-s3 --batch
17 |
18 | # elasticsearch config
19 | ADD elasticsearch.yml /usr/share/elasticsearch/config/
20 | RUN chown elasticsearch:elasticsearch config/elasticsearch.yml
21 |
22 | ## set permissions so any user can run elasticsearch
23 | # add read permissions to all files in dir
24 | RUN chmod go+r /usr/share/elasticsearch -R
25 |
26 | # add write permissions to config, log & data dirs
27 | RUN chmod go+w /usr/share/elasticsearch \
28 | /usr/share/elasticsearch/config \
29 | /usr/share/elasticsearch/logs \
30 | /usr/share/elasticsearch/data
31 |
32 | # add execute permissions to bins
33 | RUN chmod go+x /usr/share/elasticsearch/bin/*
34 |
35 | # run as elasticsearch user
36 | USER elasticsearch
37 |
--------------------------------------------------------------------------------
/images/elasticsearch/8.12.2-beta/elasticsearch.yml:
--------------------------------------------------------------------------------
1 | bootstrap.memory_lock: true
2 | network.host: 0.0.0.0
3 | http.port: 9200
4 | node.roles: [ master, data ]
5 | thread_pool:
6 | write:
7 | queue_size: 1000
8 | indices.query.bool.max_clause_count: 4000
9 | xpack.security.enabled: false
10 |
--------------------------------------------------------------------------------
/images/valhalla/Dockerfile:
--------------------------------------------------------------------------------
1 | # base image
2 | FROM pelias/baseimage
3 |
4 | # grab all of the valhalla software from ppa
5 | RUN apt-get update && \
6 | apt-get install -y software-properties-common python-software-properties && \
7 | add-apt-repository -y ppa:kevinkreiser/prime-server && \
8 | add-apt-repository -y ppa:valhalla-routing/valhalla && \
9 | apt-get update && \
10 | apt-get install -y valhalla-bin && \
11 | rm -rf /var/lib/apt/lists/*;
12 |
13 | # change working dir
14 | RUN mkdir -p /code/valhalla
15 | WORKDIR /code/valhalla
16 |
17 | # generate config
18 | RUN valhalla_build_config \
19 | --mjolnir-tile-dir '/data/valhalla' \
20 | --mjolnir-tile-extract '/data/valhalla.tar' \
21 | --mjolnir-timezone '/data/valhalla/timezones.sqlite' \
22 | --mjolnir-admin '/data/valhalla/admins.sqlite' > valhalla.json
23 |
24 | # build script
25 | RUN echo 'valhalla_build_tiles -c valhalla.json /data/openstreetmap/*.osm.pbf; valhalla_export_edges --config valhalla.json > /data/polylines/pbf_extract.polyline;' > ./docker_build.sh
26 |
--------------------------------------------------------------------------------
/lib/cli.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e;
3 |
4 | declare -a commands
5 | declare -a actions
6 | declare -a hints
7 | declare -a functions
8 |
9 | function register(){
10 | commands+=("$1")
11 | actions+=("$2")
12 | hints+=("$3")
13 | functions+=("$4")
14 | }
15 |
16 | function help(){
17 | printf 'Usage: %s [command] [action] [options]\n\n' ${0}
18 |
19 | for (( i = 0; i < ${#commands[@]}; ++i )); do
20 | echo -e " ${commands[$i]}\t${actions[$i]}\t ${hints[$i]}"
21 | done | column -ts $'\t'
22 |
23 | echo
24 | }
25 |
26 | function cli(){
27 | cmd="${1}"; shift || true
28 | action="${1}"; shift || true
29 | valid_command=false
30 | valid_action=false
31 |
32 | for (( i = 0; i < ${#commands[@]}; ++i )); do
33 | if [ "${cmd}" = "${commands[$i]}" ]; then
34 | valid_command=true
35 | if [ "${action}" = "${actions[$i]}" ]; then
36 | valid_action=true
37 | "${functions[$i]}" "$@"
38 | exit $?
39 | fi
40 | fi
41 | done
42 | echo
43 |
44 | [ -z "${cmd}" ] || [ "$valid_command" = true ] || printf 'invalid command "%s"\n\n' "${cmd}"
45 | [ -z "${action}" ] || [ "$valid_action" = true ] || printf 'invalid action "%s"\n\n' "${action}"
46 | help
47 |
48 | exit 1
49 | }
50 |
--------------------------------------------------------------------------------
/lib/env.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e;
3 |
4 | # disable verbose logging
5 | ENV_DISPLAY_WARNINGS=false
6 |
7 | # ensure docker runs containers as the current user (even when running with sudo)
8 | # note: SUDO_USER is not portable to all systems but its the best we've got.
9 | function set_docker_user(){
10 | CURRENT_USER=$(id -u ${SUDO_USER-${USER}}):$(id -g ${SUDO_USER-${USER}})
11 | if [ ! -z "${DOCKER_USER}" ] && [ "${DOCKER_USER}" != "${CURRENT_USER}" ]; then
12 | 2>&1 printf "WARNING: The DOCKER_USER env var is deprecated, using %s.\n" ${CURRENT_USER}
13 | 2>&1 echo "Remove the DOCKER_USER line from your .env file to silence this message."
14 | fi
15 | export DOCKER_USER="${CURRENT_USER}";
16 | }
17 |
18 | # ensure the user environment is correctly set up
19 | function env_check(){
20 | if [ "${DOCKER_USER}" = "0:0" ]; then
21 | echo "You are running as root"
22 | echo "This is insecure and not supported by Pelias."
23 | echo "Please try again as a non-root user."
24 | exit 1
25 | fi
26 |
27 | if [ -z "${DATA_DIR}" ]; then
28 | echo "You must set the DATA_DIR env var to a valid directory on your local machine."
29 | echo
30 | echo "Edit the '.env' file in this repository, update the DATA_DIR to a valid path and try again."
31 | echo "Alternatively, you can set the variable in your environment using a command such as 'export DATA_DIR=/tmp'."
32 | exit 1
33 | elif [ ! -d "${DATA_DIR}" ]; then
34 | printf "The directory specified by DATA_DIR does not exist: %s\n" ${DATA_DIR}
35 | echo
36 | echo "Edit the '.env' file in this repository, update the DATA_DIR to a valid path and try again."
37 | echo "Alternatively, you can set the variable in your environment using a command such as 'export DATA_DIR=/tmp'."
38 | exit 1
39 | fi
40 | }
41 |
42 | # loads environment vars from a stream (such as a file)
43 | # example: env_load_stream < .env
44 | function env_load_stream(){
45 | [[ -n $DATA_DIR ]] && printf "DATA_DIR is already set to '$DATA_DIR' - this may cause the DATA_DIR specified in the .env to be ignored\n"
46 | while IFS='=' read -r key value; do
47 | ([ -z $key ] || [ -z $value ]) && printf 'Invalid environment var "%s=%s"\n' $key $value && exit 1
48 | if [ -z ${!key} ]; then
49 | export "${key}=${value}"
50 | elif $ENV_DISPLAY_WARNINGS; then
51 | printf '[warn] skip setting environment var "%s=%s", already set "%s=%s"\n' $key $value $key ${!key}
52 | fi
53 | done
54 | }
55 |
56 | # ensure locale is correctly set?
57 | # export LC_ALL=en_US.UTF-8
58 |
59 | # load DATA_DIR and other vars from docker compose .env file
60 | # note: strips comments and empty lines
61 | [ -f .env ] && env_load_stream < <(grep -v '^$\|^\s*$\#' .env)
62 |
63 | # use the default compose file unless one was specified
64 | # if [ -z "${COMPOSE_FILE}" ]; then
65 | # if [ ! -f "docker-compose.yml" ]; then
66 | # export COMPOSE_FILE="${BASEDIR}/docker-compose.yml"
67 | # fi
68 | # fi
69 |
70 | set_docker_user
71 |
72 | # ensure the user env is correctly set up
73 | env_check
74 |
--------------------------------------------------------------------------------
/pelias:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e
3 |
4 | # OSX comes bundled with versions of readlink, sed, parallel etc which are not
5 | # compatible with the linux tools. Force OSX users to install the GNU
6 | # compatible versions (prefixed with 'g', such as 'greadlink', 'gsed' etc.).
7 | export CMD_READLINK='readlink'
8 | if [[ "$OSTYPE" == "darwin"* ]]; then
9 | if [ -x "$(command -v greadlink)" ]; then
10 | CMD_READLINK='greadlink';
11 | else
12 | 2>&1 echo 'OSX: you must install the gnu standard tooling using:'
13 | 2>&1 echo 'brew install coreutils'
14 | fi
15 | fi
16 |
17 | # resolve path to this file (following symlinks) and load libs
18 | BASEDIR=$( dirname $( ${CMD_READLINK} -f "${BASH_SOURCE[0]}" ) )
19 | for f in ${BASEDIR}/lib/* ${BASEDIR}/cmd/*; do source $f; done
20 |
21 | # cli runner
22 | cli "$@"
23 |
--------------------------------------------------------------------------------
/projects/australia/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=/tmp/pelias/australia
3 |
--------------------------------------------------------------------------------
/projects/australia/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Australia
3 |
4 | This project is configured to download/prepare/build a complete Pelias installation for the country of Australia.
5 |
6 | It's designed to be a larger example of using Pelias.
7 |
8 | # Setup
9 |
10 | Please refer to the instructions at https://github.com/pelias/docker in order to install and configure your docker environment.
11 |
12 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
13 |
14 | Please ensure that's all working fine before continuing.
15 |
16 | # Run a Build
17 |
18 | To run a complete build, execute the following commands:
19 |
20 | ```bash
21 | pelias compose pull
22 | pelias elastic start
23 | pelias elastic wait
24 | pelias elastic create
25 | pelias download all
26 | pelias prepare all
27 | pelias import all
28 | pelias compose up
29 | pelias test run
30 | ```
31 |
32 | # Make an Example Query
33 |
34 | You can now make queries against your new Pelias build:
35 |
36 | http://localhost:4000/v1/search?text=melbourne
37 |
--------------------------------------------------------------------------------
/projects/australia/blacklist/osm.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pelias/docker/6f680540ecef1f5a890c2bd6cc23faeb78b367b6/projects/australia/blacklist/osm.txt
--------------------------------------------------------------------------------
/projects/australia/pelias.json:
--------------------------------------------------------------------------------
1 | {
2 | "logger": {
3 | "level": "info",
4 | "timestamp": false
5 | },
6 | "esclient": {
7 | "apiVersion": "7.5",
8 | "hosts": [
9 | { "host": "elasticsearch" }
10 | ]
11 | },
12 | "elasticsearch": {
13 | "settings": {
14 | "index": {
15 | "refresh_interval": "10s",
16 | "number_of_replicas": "0",
17 | "number_of_shards": "3"
18 | }
19 | }
20 | },
21 | "acceptance-tests": {
22 | "endpoints": {
23 | "docker": "http://api:4000/v1/"
24 | }
25 | },
26 | "api": {
27 | "services": {
28 | "placeholder": { "url": "http://placeholder:4100" },
29 | "pip": { "url": "http://pip:4200" },
30 | "interpolation": { "url": "http://interpolation:4300" },
31 | "libpostal": { "url": "http://libpostal:4400" }
32 | }
33 | },
34 | "imports": {
35 | "adminLookup": {
36 | "enabled": true
37 | },
38 | "geonames": {
39 | "datapath": "/data/geonames",
40 | "countryCode": "AU"
41 | },
42 | "openstreetmap": {
43 | "download": [
44 | { "sourceURL": "http://download.geofabrik.de/australia-oceania/australia-latest.osm.pbf" }
45 | ],
46 | "leveldbpath": "/tmp",
47 | "datapath": "/data/openstreetmap",
48 | "import": [{
49 | "filename": "australia-latest.osm.pbf"
50 | }]
51 | },
52 | "openaddresses": {
53 | "datapath": "/data/openaddresses",
54 | "files": [
55 | "au/countrywide.csv"
56 | ]
57 | },
58 | "polyline": {
59 | "datapath": "/data/polylines",
60 | "files": [ "extract.0sv" ]
61 | },
62 | "whosonfirst": {
63 | "datapath": "/data/whosonfirst",
64 | "countryCode": "AU",
65 | "importPostalcodes": true,
66 | "importPlace": [
67 | "85632793"
68 | ]
69 | },
70 | "interpolation": {
71 | "download": {
72 | "tiger": {
73 | "datapath": "/data/tiger",
74 | "states": [
75 | { "state_code": 53, "county_code": 11, "name": "Clark County, WA" }
76 | ]
77 | }
78 | }
79 | }
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/projects/australia/test_cases/search_address.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "/v1/search address",
3 | "description": "addresses in Portland, OR",
4 | "priorityThresh": 1,
5 | "normalizers": {
6 | "name": [
7 | "toUpperCase",
8 | "removeOrdinals",
9 | "stripPunctuation",
10 | "abbreviateDirectionals",
11 | "abbreviateStreetSuffixes"
12 | ]
13 | },
14 | "tests": [
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/projects/australia/test_cases/search_venue.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "/v1/search venues",
3 | "priorityThresh": 1,
4 | "endpoint": "search",
5 | "tests": [
6 | {
7 | "id": 1,
8 | "status": "pass",
9 | "notes": "portland international should come up for PDX",
10 | "in": {
11 | "text": "pdx"
12 | },
13 | "expected": {
14 | "properties": [
15 | {
16 | "layer": "venue",
17 | "name": "Portland International Airport",
18 | "country_a": "USA",
19 | "country": "United States",
20 | "region": "Oregon",
21 | "region_a": "OR",
22 | "locality": "Portland"
23 | }
24 | ]
25 | }
26 | },
27 | {
28 | "id": 2,
29 | "status": "pass",
30 | "notes": "portland international should come up for PDX",
31 | "in": {
32 | "text": "pdx airport"
33 | },
34 | "expected": {
35 | "properties": [
36 | {
37 | "layer": "venue",
38 | "name": "Portland International Airport",
39 | "country_a": "USA",
40 | "country": "United States",
41 | "region": "Oregon",
42 | "region_a": "OR",
43 | "locality": "Portland"
44 | }
45 | ]
46 | }
47 | }
48 | ]
49 | }
50 |
--------------------------------------------------------------------------------
/projects/austria/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=/tmp/pelias/austria
3 |
--------------------------------------------------------------------------------
/projects/austria/README.md:
--------------------------------------------------------------------------------
1 | # Austrian area
2 |
3 | This project is configured to download/prepare/build a complete Pelias installation for Austria.
4 |
5 | # Setup
6 |
7 | Please refer to the instructions at in order to install and configure your docker environment.
8 |
9 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
10 |
11 | Please ensure that's all working fine before continuing.
12 |
13 | # Run a Build
14 |
15 | To run a complete build, execute the following commands:
16 |
17 | ```bash
18 | pelias compose pull
19 | pelias elastic start
20 | pelias elastic wait
21 | pelias elastic create
22 | pelias download all
23 | pelias prepare all
24 | pelias import all
25 | pelias compose up
26 | ```
27 |
28 | # Make an Example Query
29 |
30 | You can now make queries against your new Pelias build:
31 |
32 |
33 |
--------------------------------------------------------------------------------
/projects/austria/elasticsearch.yml:
--------------------------------------------------------------------------------
1 | network.host: 0.0.0.0
2 | bootstrap.memory_lock: true
3 | indices.breaker.fielddata.limit: 85%
4 | indices.fielddata.cache.size: 75%
--------------------------------------------------------------------------------
/projects/austria/pelias.json:
--------------------------------------------------------------------------------
1 | {
2 | "logger": {
3 | "level": "debug",
4 | "timestamp": false
5 | },
6 | "esclient": {
7 | "apiVersion": "7.5",
8 | "hosts": [
9 | { "host": "elasticsearch" }
10 | ]
11 | },
12 | "elasticsearch": {
13 | "settings": {
14 | "index": {
15 | "refresh_interval": "10s",
16 | "number_of_replicas": "0",
17 | "number_of_shards": "1"
18 | }
19 | }
20 | },
21 | "api": {
22 | "services": {
23 | "pip": { "url": "http://pip:4200" },
24 | "libpostal": { "url": "http://libpostal:4400" },
25 | "placeholder": { "url": "http://placeholder:4100" },
26 | "interpolation": { "url": "http://interpolation:4300" }
27 | },
28 | "defaultParameters": {
29 | "focus.point.lat": 50.85,
30 | "focus.point.lon": 4.35
31 | }
32 | },
33 | "imports": {
34 | "adminLookup": {
35 | "enabled": true
36 | },
37 | "geonames": {
38 | "datapath": "/data/geonames",
39 | "countryCode": "AT"
40 | },
41 | "openstreetmap": {
42 | "download": [
43 | { "sourceURL": "http://download.geofabrik.de/europe/austria-latest.osm.pbf" }
44 | ],
45 | "leveldbpath": "/tmp",
46 | "datapath": "/data/openstreetmap",
47 | "import": [{
48 | "filename": "austria-latest.osm.pbf"
49 | }]
50 | },
51 | "openaddresses": {
52 | "datapath": "/data/openaddresses",
53 | "files": ["at/31254.csv", "at/31255.csv", "at/31256.csv", "at/city_of_vienna.csv", "at/tirol.csv"]
54 | },
55 | "polyline": {
56 | "datapath": "/data/polylines",
57 | "files": [ "extract.0sv" ]
58 | },
59 | "whosonfirst": {
60 | "datapath": "/data/whosonfirst",
61 | "countryCode": "AT",
62 | "importPostalcodes": true,
63 | "importPlace": [ "85632785" ]
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/projects/belgium/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=/tmp/pelias/belgium
3 |
--------------------------------------------------------------------------------
/projects/belgium/README.md:
--------------------------------------------------------------------------------
1 | # Belgium area
2 |
3 | This project is configured to download/prepare/build a complete Pelias installation for Belgium.
4 |
5 | # Setup
6 |
7 | Please refer to the instructions at in order to install and configure your docker environment.
8 |
9 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
10 |
11 | Please ensure that's all working fine before continuing.
12 |
13 | # Run a Build
14 |
15 | To run a complete build, execute the following commands:
16 |
17 | ```bash
18 | pelias compose pull
19 | pelias elastic start
20 | pelias elastic wait
21 | pelias elastic create
22 | pelias download all
23 | pelias prepare all
24 | pelias import all
25 | pelias compose up
26 | ```
27 |
28 | # Make an Example Query
29 |
30 | You can now make queries against your new Pelias build:
31 |
32 |
33 |
--------------------------------------------------------------------------------
/projects/belgium/elasticsearch.yml:
--------------------------------------------------------------------------------
1 | network.host: 0.0.0.0
2 | bootstrap.memory_lock: true
3 | indices.breaker.fielddata.limit: 85%
4 | indices.fielddata.cache.size: 75%
--------------------------------------------------------------------------------
/projects/belgium/pelias.json:
--------------------------------------------------------------------------------
1 | {
2 | "logger": {
3 | "level": "debug",
4 | "timestamp": false
5 | },
6 | "esclient": {
7 | "apiVersion": "7.5",
8 | "hosts": [
9 | { "host": "elasticsearch" }
10 | ]
11 | },
12 | "elasticsearch": {
13 | "settings": {
14 | "index": {
15 | "refresh_interval": "10s",
16 | "number_of_replicas": "0",
17 | "number_of_shards": "1"
18 | }
19 | }
20 | },
21 | "api": {
22 | "services": {
23 | "pip": { "url": "http://pip:4200" },
24 | "libpostal": { "url": "http://libpostal:4400" },
25 | "placeholder": { "url": "http://placeholder:4100" },
26 | "interpolation": { "url": "http://interpolation:4300" }
27 | },
28 | "defaultParameters": {
29 | "focus.point.lat": 50.85,
30 | "focus.point.lon": 4.35
31 | }
32 | },
33 | "imports": {
34 | "adminLookup": {
35 | "enabled": true
36 | },
37 | "geonames": {
38 | "datapath": "/data/geonames",
39 | "countryCode": "BE"
40 | },
41 | "openstreetmap": {
42 | "download": [
43 | { "sourceURL": "http://download.geofabrik.de/europe/belgium-latest.osm.pbf" }
44 | ],
45 | "leveldbpath": "/tmp",
46 | "datapath": "/data/openstreetmap",
47 | "import": [{
48 | "filename": "belgium-latest.osm.pbf"
49 | }]
50 | },
51 | "openaddresses": {
52 | "datapath": "/data/openaddresses",
53 | "files": ["be/bru/bosa-region-brussels-nl.csv", "be/bru/bosa-region-brussels-fr.csv", "be/vlg/bosa-region-flanders-nl.csv", "be/wal/bosa-region-wallonia-fr.csv"]
54 | },
55 | "polyline": {
56 | "datapath": "/data/polylines",
57 | "files": [ "extract.0sv" ]
58 | },
59 | "whosonfirst": {
60 | "datapath": "/data/whosonfirst",
61 | "countryCode": "BE",
62 | "importPostalcodes": true,
63 | "importPlace": [ "85632997" ]
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/projects/brazil/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=/tmp/pelias/brazil
3 |
--------------------------------------------------------------------------------
/projects/brazil/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Brazil
3 |
4 | This project is configured to download/prepare/build a complete Pelias installation for the country of Brazil.
5 |
6 | # Setup
7 |
8 | Please refer to the instructions at https://github.com/pelias/docker in order to install and configure your docker environment.
9 |
10 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
11 |
12 | Please ensure that's all working fine before continuing.
13 |
14 | # Run a Build
15 |
16 | To run a complete build, execute the following commands:
17 |
18 | ```bash
19 | pelias compose pull
20 | pelias elastic start
21 | pelias elastic wait
22 | pelias elastic create
23 | pelias download all
24 | pelias prepare all
25 | pelias import all
26 | pelias compose up
27 | pelias test run
28 | ```
29 |
30 | # Make an Example Query
31 |
32 | You can now make queries against your new Pelias build:
33 |
34 | http://localhost:4000/v1/search?text=Flores da Cunha
35 |
--------------------------------------------------------------------------------
/projects/brazil/blacklist/osm.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pelias/docker/6f680540ecef1f5a890c2bd6cc23faeb78b367b6/projects/brazil/blacklist/osm.txt
--------------------------------------------------------------------------------
/projects/brazil/pelias.json:
--------------------------------------------------------------------------------
1 | {
2 | "logger": {
3 | "level": "info",
4 | "timestamp": false
5 | },
6 | "esclient": {
7 | "apiVersion": "7.5",
8 | "hosts": [
9 | { "host": "elasticsearch" }
10 | ]
11 | },
12 | "elasticsearch": {
13 | "settings": {
14 | "index": {
15 | "refresh_interval": "10s",
16 | "number_of_replicas": "0",
17 | "number_of_shards": "3"
18 | }
19 | }
20 | },
21 | "acceptance-tests": {
22 | "endpoints": {
23 | "docker": "http://api:4000/v1/"
24 | }
25 | },
26 | "api": {
27 | "services": {
28 | "placeholder": { "url": "http://placeholder:4100" },
29 | "pip": { "url": "http://pip:4200" },
30 | "interpolation": { "url": "http://interpolation:4300" },
31 | "libpostal": { "url": "http://libpostal:4400" }
32 | }
33 | },
34 | "imports": {
35 | "adminLookup": {
36 | "enabled": true
37 | },
38 | "geonames": {
39 | "datapath": "/data/geonames",
40 | "countryCode": "BR"
41 | },
42 | "openstreetmap": {
43 | "download": [
44 | { "sourceURL": "http://download.geofabrik.de/south-america/brazil-latest.osm.pbf" }
45 | ],
46 | "leveldbpath": "/tmp",
47 | "datapath": "/data/openstreetmap",
48 | "import": [{
49 | "filename": "brazil-latest.osm.pbf"
50 | }]
51 | },
52 | "openaddresses": {
53 | "datapath": "/data/openaddresses",
54 | "files": [
55 | "br/ac/statewide.csv",
56 | "br/al/statewide.csv",
57 | "br/am/statewide.csv",
58 | "br/ap/statewide.csv",
59 | "br/ba/statewide.csv",
60 | "br/ce/statewide.csv",
61 | "br/df/statewide.csv",
62 | "br/es/statewide.csv",
63 | "br/go/statewide.csv",
64 | "br/ma/statewide.csv",
65 | "br/mg/statewide.csv",
66 | "br/ms/statewide.csv",
67 | "br/mt/statewide.csv",
68 | "br/pa/statewide.csv",
69 | "br/pb/statewide.csv",
70 | "br/pe/statewide.csv",
71 | "br/pi/statewide.csv",
72 | "br/pr/statewide.csv",
73 | "br/rj/statewide.csv",
74 | "br/rn/statewide.csv",
75 | "br/ro/statewide.csv",
76 | "br/rr/statewide.csv",
77 | "br/rs/statewide.csv",
78 | "br/sc/statewide.csv",
79 | "br/se/statewide.csv",
80 | "br/sp/statewide.csv",
81 | "br/to/statewide.csv"
82 | ]
83 | },
84 | "polyline": {
85 | "datapath": "/data/polylines",
86 | "files": [ "extract.0sv" ]
87 | },
88 | "whosonfirst": {
89 | "datapath": "/data/whosonfirst",
90 | "countryCode": "BR",
91 | "importPostalcodes": true,
92 | "importPlace": [
93 | "85633009"
94 | ]
95 | }
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/projects/denmark/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=./data
3 |
--------------------------------------------------------------------------------
/projects/denmark/README.md:
--------------------------------------------------------------------------------
1 | # Norway area
2 |
3 | This project is configured to download/prepare/build a complete Pelias installation for Norway.
4 |
5 | # Setup
6 |
7 | Please refer to the instructions at in order to install and configure your docker environment.
8 |
9 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
10 |
11 | Please ensure that's all working fine before continuing.
12 |
13 | # Run a Build
14 |
15 | To run a complete build, execute the following commands:
16 |
17 | ```bash
18 | pelias compose pull
19 | pelias elastic start
20 | pelias elastic wait
21 | pelias elastic create
22 | pelias download all
23 | pelias prepare all
24 | pelias import all
25 | pelias compose up
26 | ```
27 |
28 | # Make an Example Query
29 |
30 | You can now make queries against your new Pelias build:
31 |
32 |
33 |
--------------------------------------------------------------------------------
/projects/denmark/elasticsearch.yml:
--------------------------------------------------------------------------------
1 | network.host: 0.0.0.0
2 | bootstrap.memory_lock: true
3 | indices.breaker.fielddata.limit: 85%
4 | indices.fielddata.cache.size: 75%
--------------------------------------------------------------------------------
/projects/denmark/pelias.json:
--------------------------------------------------------------------------------
1 | {
2 | "logger": {
3 | "level": "debug",
4 | "timestamp": false
5 | },
6 | "esclient": {
7 | "apiVersion": "7.5",
8 | "hosts": [
9 | { "host": "elasticsearch" }
10 | ]
11 | },
12 | "elasticsearch": {
13 | "settings": {
14 | "index": {
15 | "refresh_interval": "10s",
16 | "number_of_replicas": "0",
17 | "number_of_shards": "1"
18 | }
19 | }
20 | },
21 | "api": {
22 | "services": {
23 | "pip": { "url": "http://pip:4200" },
24 | "libpostal": { "url": "http://libpostal:4400" },
25 | "placeholder": { "url": "http://placeholder:4100" },
26 | "interpolation": { "url": "http://interpolation:4300" }
27 | }
28 | },
29 | "imports": {
30 | "adminLookup": {
31 | "enabled": true
32 | },
33 | "geonames": {
34 | "datapath": "/data/geonames",
35 | "countryCode": "DK"
36 | },
37 | "openstreetmap": {
38 | "download": [
39 | { "sourceURL": "http://download.geofabrik.de/europe/denmark-latest.osm.pbf" }
40 | ],
41 | "leveldbpath": "/tmp",
42 | "datapath": "/data/openstreetmap",
43 | "import": [{
44 | "filename": "denmark-latest.osm.pbf"
45 | }]
46 | },
47 | "openaddresses": {
48 | "datapath": "/data/openaddresses",
49 | "files": ["dk/countrywide.csv"]
50 | },
51 | "polyline": {
52 | "datapath": "/data/polylines",
53 | "files": [ "extract.0sv" ]
54 | },
55 | "whosonfirst": {
56 | "datapath": "/data/whosonfirst",
57 | "countryCode": "DK",
58 | "importPostalcodes": true,
59 | "importPlace": [ "85633121" ]
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/projects/france/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=/tmp/pelias/france
3 |
--------------------------------------------------------------------------------
/projects/france/README.md:
--------------------------------------------------------------------------------
1 | # France area
2 |
3 | This project is configured to download/prepare/build a complete Pelias installation for France.
4 |
5 | # Setup
6 |
7 | Please refer to the instructions at in order to install and configure your docker environment.
8 |
9 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
10 |
11 | Please ensure that's all working fine before continuing.
12 |
13 | # Run a Build
14 |
15 | To run a complete build, execute the following commands:
16 |
17 | ```bash
18 | pelias compose pull
19 | pelias elastic start
20 | pelias elastic wait
21 | pelias elastic create
22 | pelias download all
23 | pelias prepare all
24 | pelias import all
25 | pelias compose up
26 | ```
27 |
28 | # Make an Example Query
29 |
30 | You can now make queries against your new Pelias build:
31 |
32 |
33 |
--------------------------------------------------------------------------------
/projects/france/elasticsearch.yml:
--------------------------------------------------------------------------------
1 | network.host: 0.0.0.0
2 | bootstrap.memory_lock: true
3 | indices.breaker.fielddata.limit: 85%
4 | indices.fielddata.cache.size: 75%
--------------------------------------------------------------------------------
/projects/france/pelias.json:
--------------------------------------------------------------------------------
1 | {
2 | "logger": {
3 | "level": "debug",
4 | "timestamp": false
5 | },
6 | "esclient": {
7 | "apiVersion": "7.5",
8 | "hosts": [
9 | { "host": "elasticsearch" }
10 | ]
11 | },
12 | "elasticsearch": {
13 | "settings": {
14 | "index": {
15 | "refresh_interval": "10s",
16 | "number_of_replicas": "0",
17 | "number_of_shards": "1"
18 | }
19 | }
20 | },
21 | "api": {
22 | "services": {
23 | "pip": { "url": "http://pip:4200" },
24 | "libpostal": { "url": "http://libpostal:4400" },
25 | "placeholder": { "url": "http://placeholder:4100" },
26 | "interpolation": { "url": "http://interpolation:4300" }
27 | },
28 | "defaultParameters": {
29 | "focus.point.lat": 46.61,
30 | "focus.point.lon": 2.45
31 | }
32 | },
33 | "imports": {
34 | "adminLookup": {
35 | "enabled": true
36 | },
37 | "geonames": {
38 | "datapath": "/data/geonames",
39 | "countryCode": "FR"
40 | },
41 | "openstreetmap": {
42 | "download": [
43 | { "sourceURL": "http://download.geofabrik.de/europe/france-latest.osm.pbf" }
44 | ],
45 | "leveldbpath": "/tmp",
46 | "datapath": "/data/openstreetmap",
47 | "import": [{
48 | "filename": "france-latest.osm.pbf"
49 | }]
50 | },
51 | "openaddresses": {
52 | "datapath": "/data/openaddresses",
53 | "files": ["fr/countrywide.csv"]
54 | },
55 | "polyline": {
56 | "datapath": "/data/polylines",
57 | "files": [ "extract.0sv" ]
58 | },
59 | "whosonfirst": {
60 | "datapath": "/data/whosonfirst",
61 | "importPostalcodes": true,
62 | "countryCode": "FR",
63 | "importPlace": [ "136253037", "85633147" ]
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/projects/germany/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=./data
3 |
--------------------------------------------------------------------------------
/projects/germany/README.md:
--------------------------------------------------------------------------------
1 | # Germany
2 |
3 | This project is configured to download/prepare/build a complete Pelias installation for Germany.
4 |
5 | # Setup
6 |
7 | Please refer to the instructions at in order to install and configure your docker environment.
8 |
9 | Given the coverage provided by OpenAddresses is somewhat sparse, it's worth examining the configuration and the OpenAddresses coverage to understand your queries.
10 |
11 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
12 |
13 | Please ensure that's all working fine before continuing.
14 |
15 | # Run a Build
16 |
17 | To run a complete build, execute the following commands:
18 |
19 | ```bash
20 | pelias compose pull
21 | pelias elastic start
22 | pelias elastic wait
23 | pelias elastic create
24 | pelias download all
25 | pelias prepare all
26 | pelias import all
27 | pelias compose up
28 | ```
29 |
30 | # Make an Example Query
31 |
32 | You can now make queries against your new Pelias build:
33 |
34 |
35 |
--------------------------------------------------------------------------------
/projects/germany/elasticsearch.yml:
--------------------------------------------------------------------------------
1 | network.host: 0.0.0.0
2 | bootstrap.memory_lock: true
3 | indices.breaker.fielddata.limit: 85%
4 | indices.fielddata.cache.size: 75%
--------------------------------------------------------------------------------
/projects/germany/pelias.json:
--------------------------------------------------------------------------------
1 | {
2 | "logger": {
3 | "level": "debug",
4 | "timestamp": false
5 | },
6 | "esclient": {
7 | "apiVersion": "7.5",
8 | "hosts": [
9 | { "host": "elasticsearch" }
10 | ]
11 | },
12 | "elasticsearch": {
13 | "settings": {
14 | "index": {
15 | "refresh_interval": "10s",
16 | "number_of_replicas": "0",
17 | "number_of_shards": "1"
18 | }
19 | }
20 | },
21 | "api": {
22 | "services": {
23 | "pip": { "url": "http://pip:4200" },
24 | "libpostal": { "url": "http://libpostal:4400" },
25 | "placeholder": { "url": "http://placeholder:4100" },
26 | "interpolation": { "url": "http://interpolation:4300" }
27 | }
28 | },
29 | "imports": {
30 | "geonames": {
31 | "datapath": "/data/geonames",
32 | "countryCode": "DE"
33 | },
34 | "openstreetmap": {
35 | "download": [
36 | { "sourceURL": "http://download.geofabrik.de/europe/germany-latest.osm.pbf" }
37 | ],
38 | "leveldbpath": "/tmp",
39 | "datapath": "/data/openstreetmap",
40 | "import": [{
41 | "filename": "germany-latest.osm.pbf"
42 | }]
43 | },
44 | "openaddresses": {
45 | "datapath": "/data/openaddresses",
46 | "files": ["de/berlin.csv", "de/he/city_of_frankfurtammain.csv", "de/he/city_of_kassel.csv", "de/hh/statewide.csv", "de/ni/bentheim.csv", "de/nw/city_of_cologne.csv", "de/nw/city_of_wesel.csv", "de/nw/city_of_wuppertal.csv", "de/nw/kreis_viersen.csv", "de/nw/statewide.csv", "de/sn/statewide.csv", "de/th/statewide.csv"]
47 | },
48 | "polyline": {
49 | "datapath": "/data/polylines",
50 | "files": [ "extract.0sv" ]
51 | },
52 | "whosonfirst": {
53 | "datapath": "/data/whosonfirst",
54 | "countryCode": "DE",
55 | "importPostalcodes": false,
56 | "importPlace": [ "85633111" ]
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/projects/israel/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=/tmp/pelias/israel
3 |
--------------------------------------------------------------------------------
/projects/israel/README.md:
--------------------------------------------------------------------------------
1 | # Israel area
2 |
3 | This project is configured to download/prepare/build a complete Pelias installation for Israel.
4 |
5 | # Setup
6 |
7 | Please refer to the instructions at in order to install and configure your docker environment.
8 |
9 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
10 |
11 | Please ensure that's all working fine before continuing.
12 |
13 | # Run a Build
14 |
15 | To run a complete build, execute the following commands:
16 |
17 | ```bash
18 | pelias compose pull
19 | pelias elastic start
20 | pelias elastic wait
21 | pelias elastic create
22 | pelias download all
23 | pelias prepare all
24 | pelias import all
25 | pelias compose up
26 | ```
27 |
28 | # Make an Example Query
29 |
30 | You can now make queries against your new Pelias build:
31 |
32 |
33 |
--------------------------------------------------------------------------------
/projects/israel/blacklist/osm.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pelias/docker/6f680540ecef1f5a890c2bd6cc23faeb78b367b6/projects/israel/blacklist/osm.txt
--------------------------------------------------------------------------------
/projects/israel/elasticsearch.yml:
--------------------------------------------------------------------------------
1 | network.host: 0.0.0.0
2 | bootstrap.memory_lock: true
3 | indices.breaker.fielddata.limit: 85%
4 | indices.fielddata.cache.size: 75%
--------------------------------------------------------------------------------
/projects/israel/pelias.json:
--------------------------------------------------------------------------------
1 | {
2 | "logger": {
3 | "level": "debug",
4 | "timestamp": false
5 | },
6 | "esclient": {
7 | "apiVersion": "7.5",
8 | "hosts": [
9 | {
10 | "host": "elasticsearch"
11 | }
12 | ]
13 | },
14 | "elasticsearch": {
15 | "settings": {
16 | "index": {
17 | "refresh_interval": "10s",
18 | "number_of_replicas": "0",
19 | "number_of_shards": "1"
20 | }
21 | }
22 | },
23 | "api": {
24 | "services": {
25 | "pip": {
26 | "url": "http://pip:4200"
27 | },
28 | "libpostal": {
29 | "url": "http://libpostal:4400"
30 | },
31 | "placeholder": {
32 | "url": "http://placeholder:4100"
33 | },
34 | "interpolation": {
35 | "url": "http://interpolation:4300"
36 | }
37 | }
38 | },
39 | "imports": {
40 | "adminLookup": {
41 | "enabled": true
42 | },
43 | "geonames": {
44 | "datapath": "/data/geonames",
45 | "countryCode": "IL"
46 | },
47 | "openstreetmap": {
48 | "download": [
49 | {
50 | "sourceURL": "http://download.geofabrik.de/asia/israel-and-palestine-latest.osm.pbf"
51 | }
52 | ],
53 | "leveldbpath": "/tmp",
54 | "datapath": "/data/openstreetmap",
55 | "import": [
56 | {
57 | "filename": "israel-and-palestine-latest.osm.pbf"
58 | }
59 | ]
60 | },
61 | "openaddresses": {
62 | "datapath": "/data/openaddresses",
63 | "files": [
64 | "il/city_of_tel_aviv.csv"
65 | ]
66 | },
67 | "polyline": {
68 | "datapath": "/data/polylines",
69 | "files": [
70 | "extract.0sv"
71 | ]
72 | },
73 | "whosonfirst": {
74 | "datapath": "/data/whosonfirst",
75 | "countryCode": "IL",
76 | "importPostalcodes": true,
77 | "importPlace": [
78 | "85632315"
79 | ]
80 | }
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/projects/italy/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=/tmp/pelias/italy
3 |
--------------------------------------------------------------------------------
/projects/italy/README.md:
--------------------------------------------------------------------------------
1 | # Italian area
2 |
3 | This project is configured to download/prepare/build a complete Pelias installation for Italy.
4 |
5 | # Setup
6 |
7 | Please refer to the instructions at in order to install and configure your docker environment.
8 |
9 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
10 |
11 | Please ensure that's all working fine before continuing.
12 |
13 | # Run a Build
14 |
15 | To run a complete build, execute the following commands:
16 |
17 | ```bash
18 | pelias compose pull
19 | pelias elastic start
20 | pelias elastic wait
21 | pelias elastic create
22 | pelias download all
23 | pelias prepare all
24 | pelias import all
25 | pelias compose up
26 | ```
27 |
28 | # Make an Example Query
29 |
30 | You can now make queries against your new Pelias build:
31 |
32 |
33 |
--------------------------------------------------------------------------------
/projects/italy/elasticsearch.yml:
--------------------------------------------------------------------------------
1 | network.host: 0.0.0.0
2 | bootstrap.memory_lock: true
3 | indices.breaker.fielddata.limit: 85%
4 | indices.fielddata.cache.size: 75%
--------------------------------------------------------------------------------
/projects/italy/pelias.json:
--------------------------------------------------------------------------------
1 | {
2 | "logger": {
3 | "level": "debug",
4 | "timestamp": false
5 | },
6 | "esclient": {
7 | "apiVersion": "7.5",
8 | "hosts": [
9 | { "host": "elasticsearch" }
10 | ]
11 | },
12 | "elasticsearch": {
13 | "settings": {
14 | "index": {
15 | "refresh_interval": "10s",
16 | "number_of_replicas": "0",
17 | "number_of_shards": "1"
18 | }
19 | }
20 | },
21 | "api": {
22 | "services": {
23 | "pip": { "url": "http://pip:4200" },
24 | "libpostal": { "url": "http://libpostal:4400" },
25 | "placeholder": { "url": "http://placeholder:4100" },
26 | "interpolation": { "url": "http://interpolation:4300" }
27 | },
28 | "defaultParameters": {
29 | "focus.point.lat": 45.99,
30 | "focus.point.lon": 12.63
31 | }
32 | },
33 | "imports": {
34 | "adminLookup": {
35 | "enabled": true
36 | },
37 | "geonames": {
38 | "datapath": "/data/geonames",
39 | "countryCode": "IT"
40 | },
41 | "openstreetmap": {
42 | "download": [
43 | { "sourceURL": "http://download.geofabrik.de/europe/italy-latest.osm.pbf" }
44 | ],
45 | "leveldbpath": "/tmp",
46 | "datapath": "/data/openstreetmap",
47 | "import": [{
48 | "filename": "italy-latest.osm.pbf"
49 | }]
50 | },
51 | "openaddresses": {
52 | "datapath": "/data/openaddresses",
53 | "files": ["it/countrywide.csv"]
54 | },
55 | "polyline": {
56 | "datapath": "/data/polylines",
57 | "files": [ "extract.0sv" ]
58 | },
59 | "whosonfirst": {
60 | "datapath": "/data/whosonfirst",
61 | "countryCode": "IT",
62 | "importPostalcodes": true,
63 | "importPlace": [ "85633253" ]
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/projects/jamaica/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=/tmp/pelias/jamaica
3 |
--------------------------------------------------------------------------------
/projects/jamaica/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Jamaica
3 |
4 | This project is configured to download/prepare/build a complete Pelias installation for the country of Jamaica.
5 |
6 |
7 | # Setup
8 |
9 | Please refer to the instructions at https://github.com/pelias/docker in order to install and configure your docker environment.
10 |
11 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
12 |
13 | Please ensure that's all working fine before continuing.
14 |
15 | # Run a Build
16 |
17 | To run a complete build, execute the following commands:
18 |
19 | ```bash
20 | pelias compose pull
21 | pelias elastic start
22 | pelias elastic wait
23 | pelias elastic create
24 | pelias download all
25 | pelias prepare all
26 | pelias import all
27 | pelias compose up
28 | pelias test run
29 | ```
30 |
31 | # Make an Example Query
32 |
33 | You can now make queries against your new Pelias build:
34 |
35 | http://localhost:4000/v1/search?text=kingston
36 |
--------------------------------------------------------------------------------
/projects/jamaica/blacklist/osm.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pelias/docker/6f680540ecef1f5a890c2bd6cc23faeb78b367b6/projects/jamaica/blacklist/osm.txt
--------------------------------------------------------------------------------
/projects/jamaica/pelias.json:
--------------------------------------------------------------------------------
1 | {
2 | "logger": {
3 | "level": "info",
4 | "timestamp": false
5 | },
6 | "esclient": {
7 | "apiVersion": "7.5",
8 | "hosts": [
9 | { "host": "elasticsearch" }
10 | ]
11 | },
12 | "elasticsearch": {
13 | "settings": {
14 | "index": {
15 | "refresh_interval": "10s",
16 | "number_of_replicas": "0",
17 | "number_of_shards": "3"
18 | }
19 | }
20 | },
21 | "acceptance-tests": {
22 | "endpoints": {
23 | "docker": "http://api:4000/v1/"
24 | }
25 | },
26 | "api": {
27 | "services": {
28 | "placeholder": { "url": "http://placeholder:4100" },
29 | "pip": { "url": "http://pip:4200" },
30 | "interpolation": { "url": "http://interpolation:4300" },
31 | "libpostal": { "url": "http://libpostal:4400" }
32 | }
33 | },
34 | "imports": {
35 | "adminLookup": {
36 | "enabled": true
37 | },
38 | "geonames": {
39 | "datapath": "/data/geonames",
40 | "countryCode": "JM"
41 | },
42 | "openstreetmap": {
43 | "download": [
44 | { "sourceURL": "http://download.geofabrik.de/central-america/jamaica-latest.osm.pbf" }
45 | ],
46 | "leveldbpath": "/tmp",
47 | "datapath": "/data/openstreetmap",
48 | "import": [{
49 | "filename": "jamaica-latest.osm.pbf"
50 | }]
51 | },
52 | "openaddresses": {
53 | "datapath": "/data/openaddresses",
54 | "files": [
55 | "jm/countrywide.csv"
56 | ]
57 | },
58 | "polyline": {
59 | "datapath": "/data/polylines",
60 | "files": [ "extract.0sv" ]
61 | },
62 | "whosonfirst": {
63 | "datapath": "/data/whosonfirst",
64 | "countryCode": "JM",
65 | "importPostalcodes": true,
66 | "importPlace": [
67 | "85632215"
68 | ]
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/projects/jamaica/test_cases/search_address.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "/v1/search address",
3 | "description": "addresses in Jamaica",
4 | "priorityThresh": 1,
5 | "normalizers": {
6 | "name": [
7 | "toUpperCase",
8 | "removeOrdinals",
9 | "stripPunctuation",
10 | "abbreviateDirectionals",
11 | "abbreviateStreetSuffixes"
12 | ]
13 | },
14 | "tests": [
15 | {
16 | "id": 1,
17 | "status": "pass",
18 | "in": {
19 | "text": "12 Ocean Blvd, kingston"
20 | },
21 | "expected": {
22 | "properties": [
23 | {
24 | "street": "Ocean Boulevard",
25 | "housenumber": "12",
26 | "region": "Kingston St. John"
27 | }
28 | ]
29 | }
30 | },
31 | {
32 | "id": 2,
33 | "status": "pass",
34 | "in": {
35 | "text": "237 Old Hope Road"
36 | },
37 | "expected": {
38 | "properties": [
39 | {
40 | "name": "237 Old Hope Road",
41 | "housenumber": "237",
42 | "region": "Saint Andrew",
43 | "country": "Jamaica"
44 | }
45 | ]
46 | }
47 | },
48 | {
49 | "id": 3,
50 | "status": "pass",
51 | "in": {
52 | "text": "237 Old Hope Road"
53 | },
54 | "expected": {
55 | "properties": [
56 | {
57 | "name": "237 Old Hope Road",
58 | "housenumber": "237",
59 | "region": "Saint Andrew"
60 | }
61 | ]
62 | }
63 | },
64 | {
65 | "id": 4,
66 | "status": "pass",
67 | "in": {
68 | "text": "Arthur Wint Drive"
69 | },
70 | "expected": {
71 | "properties": [
72 | {
73 | "street": "Arthur Wint Drive",
74 | "region": "Saint Andrew"
75 | }
76 | ]
77 | }
78 | },
79 | {
80 | "id": 5,
81 | "status": "fail",
82 | "in": {
83 | "text": "16 1/2 Windward Road"
84 | },
85 | "expected": {
86 | "properties": [
87 | {
88 | "housenumber": "16 1/2",
89 | "street": "Windward Road",
90 | "region": "Kingston St. John"
91 | }
92 | ]
93 | }
94 | },
95 |
96 |
97 | {
98 | "id": 6,
99 | "status": "pass",
100 | "in": {
101 | "text": "14a Shenstone Drive"
102 | },
103 | "expected": {
104 | "properties": [
105 | {
106 | "name": "14 Shenstone Drive",
107 | "street": "Shenstone Drive",
108 | "housenumber": "14",
109 | "region": "Saint Andrew"
110 | }
111 | ]
112 | }
113 | },
114 | {
115 | "id": 7,
116 | "status": "fail",
117 | "in": {
118 | "text": "54 Lyssons Road"
119 | },
120 | "expected": {
121 | "properties": [
122 | {
123 | "name": "54 Lyssons Road",
124 | "street": "Lyssons Road",
125 | "housenumber": "54",
126 | "city": "Morant Bay",
127 | "region": "Saint Thomas"
128 | }
129 | ]
130 | }
131 | }
132 |
133 |
134 | ]
135 | }
136 |
--------------------------------------------------------------------------------
/projects/jamaica/test_cases/search_venue.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "/v1/search venues",
3 | "priorityThresh": 1,
4 | "endpoint": "search",
5 | "tests": [
6 | {
7 | "id": 1,
8 | "status": "pass",
9 | "notes": "norman manley international should come up for KIN",
10 | "in": {
11 | "text": "kin"
12 | },
13 | "expected": {
14 | "properties": [
15 | {
16 | "layer": "venue",
17 | "name": "Norman Manley International Airport",
18 | "country_a": "JAM",
19 | "country": "Jamaica",
20 | "region": "Kingston St. John",
21 | "region_a": "KI"
22 | }
23 | ]
24 | }
25 | },
26 | {
27 | "id": 2,
28 | "status": "pass",
29 | "notes": "norman manley international should come up for KIN",
30 | "in": {
31 | "text": "kin airport"
32 | },
33 | "expected": {
34 | "properties": [
35 | {
36 | "layer": "venue",
37 | "name": "Norman Manley International Airport",
38 | "country_a": "JAM",
39 | "country": "Jamaica",
40 | "region": "Kingston St. John",
41 | "region_a": "KI"
42 | }
43 | ]
44 | }
45 | }
46 | ]
47 | }
48 |
--------------------------------------------------------------------------------
/projects/kyrgyzstan/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=/tmp/pelias/kyrgyzstan
3 |
--------------------------------------------------------------------------------
/projects/kyrgyzstan/README.md:
--------------------------------------------------------------------------------
1 | # Kyrgyzstan country
2 |
3 | This project is configured to download/prepare/build a complete Pelias installation for Kyrgyzstan.
4 |
5 | # Setup
6 |
7 | Please refer to the instructions at in order to install and configure your docker environment.
8 |
9 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
10 |
11 | Please ensure that's all working fine before continuing.
12 |
13 | # Run a Build
14 |
15 | To run a complete build, execute the following commands:
16 |
17 | ```bash
18 | pelias compose pull
19 | pelias elastic start
20 | pelias elastic wait
21 | pelias elastic create
22 | pelias download all
23 | pelias prepare all
24 | pelias import all
25 | pelias compose up
26 | ```
27 |
28 | # Make an Example Query
29 |
30 | You can now make queries against your new Pelias build:
31 |
32 |
33 |
--------------------------------------------------------------------------------
/projects/kyrgyzstan/elasticsearch.yml:
--------------------------------------------------------------------------------
1 | network.host: 0.0.0.0
2 | bootstrap.memory_lock: true
3 | indices.breaker.fielddata.limit: 85%
4 | indices.fielddata.cache.size: 75%
--------------------------------------------------------------------------------
/projects/kyrgyzstan/pelias.json:
--------------------------------------------------------------------------------
1 | {
2 | "logger": {
3 | "level": "debug",
4 | "timestamp": false
5 | },
6 | "esclient": {
7 | "apiVersion": "7.5",
8 | "hosts": [
9 | { "host": "elasticsearch" }
10 | ]
11 | },
12 | "elasticsearch": {
13 | "settings": {
14 | "index": {
15 | "refresh_interval": "10s",
16 | "number_of_replicas": "0",
17 | "number_of_shards": "1"
18 | }
19 | }
20 | },
21 | "api": {
22 | "services": {
23 | "pip": { "url": "http://pip:4200" },
24 | "libpostal": { "url": "http://libpostal:4400" },
25 | "placeholder": { "url": "http://placeholder:4100" },
26 | "interpolation": { "url": "http://interpolation:4300" }
27 | }
28 | },
29 | "imports": {
30 | "adminLookup": {
31 | "enabled": true
32 | },
33 | "geonames": {
34 | "datapath": "/data/geonames",
35 | "countryCode": "KG"
36 | },
37 | "openstreetmap": {
38 | "download": [
39 | { "sourceURL": "https://download.geofabrik.de/asia/kyrgyzstan-latest.osm.pbf" }
40 | ],
41 | "leveldbpath": "/tmp",
42 | "datapath": "/data/openstreetmap",
43 | "import": [{
44 | "filename": "kyrgyzstan-latest.osm.pbf"
45 | }]
46 | },
47 | "openaddresses": {
48 | "datapath": "/data/openaddresses",
49 | "files": ["kg/countrywide.csv"]
50 | },
51 | "polyline": {
52 | "datapath": "/data/polylines",
53 | "files": [ "extract.0sv" ]
54 | },
55 | "whosonfirst": {
56 | "datapath": "/data/whosonfirst",
57 | "countryCode": "KG",
58 | "importPostalcodes": true,
59 | "importPlace": [ "85632761" ]
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/projects/las-vegas-metro/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=/tmp/pelias/portland-metro
3 |
--------------------------------------------------------------------------------
/projects/las-vegas-metro/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Las Vegas Metro Area
3 |
4 | This project is configured to download/prepare/build a complete Pelias installation for Las Vegas, Nevada (and indeed Clark County as a whole).
5 |
6 | # Setup
7 |
8 | Please refer to the instructions at https://github.com/pelias/docker in order to install and configure your docker environment.
9 |
10 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
11 |
12 | Please ensure that's all working fine before continuing.
13 |
14 | This project requires about 7 GB of disk space.
15 |
16 | # Run a Build
17 |
18 | To run a complete build, execute the following commands:
19 |
20 | ```bash
21 | pelias compose pull
22 | pelias elastic start
23 | pelias elastic wait
24 | pelias elastic create
25 | pelias download all
26 | pelias prepare all
27 | pelias import all
28 | pelias compose up
29 | pelias test run
30 | ```
31 |
32 | # Make an Example Query
33 |
34 | You can now make queries against your new Pelias build:
35 |
36 | http://localhost:4000/v1/search?text=Las%20Vegas
37 |
--------------------------------------------------------------------------------
/projects/las-vegas-metro/pelias.json:
--------------------------------------------------------------------------------
1 | {
2 | "logger": {
3 | "level": "info",
4 | "timestamp": false
5 | },
6 | "esclient": {
7 | "apiVersion": "7.5",
8 | "hosts": [
9 | { "host": "elasticsearch" }
10 | ]
11 | },
12 | "elasticsearch": {
13 | "settings": {
14 | "index": {
15 | "refresh_interval": "10s",
16 | "number_of_replicas": "0",
17 | "number_of_shards": "1"
18 | }
19 | }
20 | },
21 | "acceptance-tests": {
22 | "endpoints": {
23 | "docker": "http://api:4000/v1/"
24 | }
25 | },
26 | "api": {
27 | "services": {
28 | "placeholder": { "url": "http://placeholder:4100" },
29 | "pip": { "url": "http://pip:4200" },
30 | "interpolation": { "url": "http://interpolation:4300" },
31 | "libpostal": { "url": "http://libpostal:4400" }
32 | },
33 | "defaultParameters": {
34 | "focus.point.lat": 36.14737,
35 | "focus.point.lon": -115.15546
36 | }
37 | },
38 | "imports": {
39 | "adminLookup": {
40 | "enabled": true
41 | },
42 | "csv": {
43 | "datapath": "/data/csv",
44 | "files": [],
45 | "download": [
46 | "https://raw.githubusercontent.com/pelias/csv-importer/master/data/example.csv"
47 | ]
48 | },
49 | "geonames": {
50 | "datapath": "/data/geonames",
51 | "countryCode": "ALL"
52 | },
53 | "openstreetmap": {
54 | "download": [
55 | { "sourceURL": "https://download.geofabrik.de/north-america/us/nevada-240702.osm.pbf" }
56 | ],
57 | "leveldbpath": "/tmp",
58 | "datapath": "/data/openstreetmap",
59 | "import": [{
60 | "filename": "nevada-240702.osm.pbf"
61 | }]
62 | },
63 | "openaddresses": {
64 | "datapath": "/data/openaddresses",
65 | "files": [
66 | "us/nv/clark.csv",
67 | "us/nv/henderson.csv",
68 | "us/nv/las_vegas.csv"
69 | ]
70 | },
71 | "polyline": {
72 | "datapath": "/data/polylines",
73 | "files": [ "extract.0sv" ]
74 | },
75 | "whosonfirst": {
76 | "datapath": "/data/whosonfirst",
77 | "importPostalcodes": true,
78 | "countryCode": "US",
79 | "importPlace": [
80 | "85688531"
81 | ]
82 | },
83 | "transit": {
84 | "datapath": "/data/transit",
85 | "feeds": [
86 | {
87 | "layerId": "stops",
88 | "url": "https://developer.rtcsnv.com/transitData/google_transit.zip",
89 | "filename": "stops.txt",
90 | "agencyId": "RTCSNV",
91 | "agencyName": "RTC Transit",
92 | "layerName": "Stop"
93 | }
94 | ]
95 | },
96 | "interpolation": {
97 | "download": {
98 | "tiger": {
99 | "datapath": "/data/tiger",
100 | "states": [
101 | { "state_code": 32, "county_code": 3, "name": "Clark County, NV" }
102 | ]
103 | }
104 | }
105 | }
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/projects/las-vegas-metro/synonyms/custom_name.txt:
--------------------------------------------------------------------------------
1 |
2 | shopping,store,shop,retail,grocery,mall
3 |
4 | # Transit Centers
5 | # Rail Stations
6 | # Misc Landmarks
7 |
8 | north, N
9 | south, S
10 | east, E
11 | west, W
12 | north west => northwest
13 | north east => northeast
14 | south west => southwest
15 | south east => southeast
16 | northwest, NW
17 | northeast, NE
18 | southwest, SW
19 | southeast, SE
20 |
21 | Int'l, international
22 |
23 | # street names
24 | MLK,M L King,Martin Luther King
25 | LV,Las Vegas
26 |
--------------------------------------------------------------------------------
/projects/las-vegas-metro/synonyms/custom_street.txt:
--------------------------------------------------------------------------------
1 | first,1st
2 | second,2nd
3 | third,3rd
4 | fourth,4th
5 | fifth,5th
6 | sixth,6th
7 | seventh,7th
8 | eighth,8th
9 | nineth,9th
10 | tenth,10th
11 | eleventh,11th
12 | twelfth,12th
13 | thirteenth,13th
14 | fourteenth,14th
15 | fifteenth,15th
16 | sixteenth,16th
17 | seventeenth,17th
18 | eighteenth,18th
19 | nineteenth,19th
20 | twentyth,20th
21 | twentyfirst,21st
22 | twentysecond,22nd
23 | twentythrid,23rd
24 |
25 | # USPS Suffix Abbreviations
26 | # http://www.usps.com/ncsc/lookups/abbreviations.html#suffix
27 | st,st.,street,str
28 | ave,ave.,av,av.,avenue,AVNUE,AVENUE,AVENU
29 | dr,drive,dr.,drv,driv,drives
30 | BOULEVARD,BLVD,BOULEVARD,BOUL,BOULEVARD,BOULEVARD,BOULV
31 | BRIDGE,BRDGE,BRG
32 | BYPASS,BYP,BYPA,BYPAS,BYPS
33 | CLIFF,CLF,CLIFFS,CLFS
34 | CLUB,CLB
35 | COMMON,CMN
36 | CORNER,COR,CORNERS,CORS
37 | CENTER,CEN,CENT,CENTER,CENTR,CENTRE,CNTER,CNTR,CTR,CENTERS,CTRS
38 | CIR,CIRC,CIRCL,CIRCLE,CRCL,CIRCLE,CRCLE
39 | COURT,CRT,CT,COURTS
40 | CTSCK,CR,CREEK,CRK
41 | CROSSING,CRSSING,CRSSNG,XING
42 | CRECENT,CRES,CRESCENT,CRESENT,CRSCNT,CRSENT,CRSNT
43 | EXP,EXPR,EXPRESS,EXPRESSWAY,EXPW,EXPY
44 | FALL,FALLS,FLS
45 | FERRY,FRRY,FRY
46 | FIELD,FLD,FIELDS,FLDS
47 | FREEWAY,FREEWY,FRWAY,FRWY,FWY
48 | GARDEN,GARDN,GDN,GRDEN,GRDN,GARDENS,GDNS,GRDNS
49 | GATEWAY,GATEWY,GATWAY,GTWAY,GTWY
50 | GROV,GROVE,GRV,GROVES
51 | HARB,HARBOR,HARBR,HBR,HRBOR,HARBORS
52 | HEIGHT,HEIGHTS,HGTS,HT,HTS
53 | HIGHWAY,HIGHWY,HIWAY,HIWY,HWAY,HWY
54 | HILL,HL,HILLS,HLS
55 | IS,ISLAND,ISLND,ISLANDS,ISLNDS,ISS,ISLE,ISLES
56 | JCT,JCTION,JCTN,JUNCTION,JUNCTN,JUNCTON,JCTNS,JCTS,JUNCTIONS
57 | LAKE,LK,LAKES,LKS
58 | LANDING,LNDG,LNDNG
59 | LA,LANE,LANES,LN
60 | LOOP,LOOPS,LP
61 | MANOR,MNR,MANORS,MNRS
62 | MDW,MEADOW,MDWS,MEADOWS,MEDOWS
63 | MILL,ML,MILLS,MLS
64 | MNT,MOUNT,MT
65 | MNTAIN,MNTN,MOUNTAIN,MOUNTIN,MTIN,MTN,MNTNS,MOUNTAINS
66 | ORCH,ORCHARD,ORCHRD
67 | PARK,PK,PRK,PARKS
68 | PARKWAY,PARKWY,PKWAY,PKWY,PKY,PARKWAYS,PKWYS
69 | PLAZA,PLZ,PLZA
70 | PLACE,PL
71 | PR,PRAIRIE,PRARIE,PRR
72 | RANCH,RANCHES,RNCH,RNCHS
73 | RDG,RDGE,RIDGE,RDGS,RIDGES
74 | RIV,RIVER,RIVR,RVR
75 | RD,ROAD,RDS,ROADS
76 | RTESHLS,SHOALS
77 | SHOAR,SHORE,SHR,SHOARS,SHORES,SHRS
78 | SPG,SPNG,SPRING,SPRNG,SPGS,SPNGS,SPRINGS,SPRNGS
79 | SQ,SQR,SQRE,SQU,SQUARE,SQRS,SQUARES
80 | STA,STATION,STATN,STN
81 | STREAM,STREME,STRM
82 | ST,STR,STREET,STRT,STREETS
83 | SMT,SUMIT,SUMITT,SUMMIT
84 | TER,TERR,TERRACE
85 | TR,TRAIL,TRAILS,TRL,TRLS
86 | TUNEL,TUNL,TUNLS,TUNNEL,TUNNELS,TUNNL
87 | UN,UNION,UNIONS
88 | VALLEY,VALLY,VLLY,VLY,VALLEYS,VLYS
89 | VDCT,VIA,VIADCT,VIADUCT
90 | VIEW,VW,VIEWS,VWS
91 | VILL,VILLAG,VILLAGE,VILLG,VILLIAGE,VLG,VILLAGES,VLGS
92 | VILLE,VL
93 | VIS,VIST,VISTA,VST,VSTA
94 | WAY,WY,WAYS
95 |
96 | north, N
97 | south, S
98 | east, E
99 | west, W
100 | north west => northwest
101 | north east => northeast
102 | south west => southwest
103 | south east => southeast
104 | northwest, NW
105 | northeast, NE
106 | southwest, SW
107 | southeast, SE
108 |
--------------------------------------------------------------------------------
/projects/las-vegas-metro/test_cases/search_venue.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "/v1/search venues",
3 | "priorityThresh": 1,
4 | "endpoint": "search",
5 | "tests": [
6 | {
7 | "id": 1,
8 | "status": "pass",
9 | "notes": "Stratosphere Tower should come up for Stratosphere",
10 | "in": {
11 | "text": "Stratosphere"
12 | },
13 | "expected": {
14 | "properties": [
15 | {
16 | "layer": "venue",
17 | "name": "Stratosphere Tower",
18 | "country_a": "USA",
19 | "country": "United States",
20 | "region": "Nevada",
21 | "region_a": "NV",
22 | "locality": "Las Vegas"
23 | }
24 | ]
25 | }
26 | },
27 | {
28 | "id": 2,
29 | "status": "pass",
30 | "notes": "Stratosphere Tower should come up for Stratosphere Hotel",
31 | "in": {
32 | "text": "Stratosphere Tower"
33 | },
34 | "expected": {
35 | "properties": [
36 | {
37 | "layer": "venue",
38 | "name": "Stratosphere Tower",
39 | "country_a": "USA",
40 | "country": "United States",
41 | "region": "Nevada",
42 | "region_a": "NV",
43 | "locality": "Las Vegas"
44 | }
45 | ]
46 | }
47 | },
48 | {
49 | "id": 2,
50 | "status": "pass",
51 | "notes": "Stratosphere Tower should come up for Stratosphere Tower",
52 | "in": {
53 | "text": "Stratosphere Hotel"
54 | },
55 | "expected": {
56 | "properties": [
57 | {
58 | "layer": "venue",
59 | "name": "Stratosphere Tower",
60 | "country_a": "USA",
61 | "country": "United States",
62 | "region": "Nevada",
63 | "region_a": "NV",
64 | "locality": "Las Vegas"
65 | }
66 | ]
67 | }
68 | }
69 | ]
70 | }
71 |
--------------------------------------------------------------------------------
/projects/lithuania/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=./data
3 |
--------------------------------------------------------------------------------
/projects/lithuania/README.md:
--------------------------------------------------------------------------------
1 | # Lithuania
2 |
3 | This project is configured to download/prepare/build a complete Pelias installation for Lithuania.
4 |
5 | # Setup
6 |
7 | Please refer to the instructions at in order to install and configure your docker environment.
8 |
9 | Given the coverage provided by OpenAddresses is somewhat sparse, it's worth examining the configuration and the OpenAddresses coverage to understand your queries.
10 |
11 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
12 |
13 | Please ensure that's all working fine before continuing.
14 |
15 | # Run a Build
16 |
17 | To run a complete build, execute the following commands:
18 |
19 | ```bash
20 | pelias compose pull
21 | pelias elastic start
22 | pelias elastic wait
23 | pelias elastic create
24 | pelias download all
25 | pelias prepare all
26 | pelias import all
27 | pelias compose up
28 | ```
29 |
30 | # Make an Example Query
31 |
32 | You can now make queries against your new Pelias build:
33 |
34 |
35 |
--------------------------------------------------------------------------------
/projects/lithuania/elasticsearch.yml:
--------------------------------------------------------------------------------
1 | network.host: 0.0.0.0
2 | bootstrap.memory_lock: true
3 | indices.breaker.fielddata.limit: 85%
4 | indices.fielddata.cache.size: 75%
--------------------------------------------------------------------------------
/projects/lithuania/pelias.json:
--------------------------------------------------------------------------------
1 | {
2 | "logger": {
3 | "level": "debug",
4 | "timestamp": false
5 | },
6 | "esclient": {
7 | "apiVersion": "7.5",
8 | "hosts": [
9 | { "host": "elasticsearch" }
10 | ]
11 | },
12 | "elasticsearch": {
13 | "settings": {
14 | "index": {
15 | "refresh_interval": "10s",
16 | "number_of_replicas": "0",
17 | "number_of_shards": "1"
18 | }
19 | }
20 | },
21 | "api": {
22 | "services": {
23 | "pip": { "url": "http://pip:4200" },
24 | "libpostal": { "url": "http://libpostal:4400" },
25 | "placeholder": { "url": "http://placeholder:4100" },
26 | "interpolation": { "url": "http://interpolation:4300" }
27 | }
28 | },
29 | "imports": {
30 | "geonames": {
31 | "datapath": "/data/geonames",
32 | "countryCode": "LT"
33 | },
34 | "openstreetmap": {
35 | "download": [
36 | { "sourceURL": "http://download.geofabrik.de/europe/lithuania-latest.osm.pbf" }
37 | ],
38 | "leveldbpath": "/tmp",
39 | "datapath": "/data/openstreetmap",
40 | "import": [{
41 | "filename": "lithuania-latest.osm.pbf"
42 | }]
43 | },
44 | "openaddresses": {
45 | "datapath": "/data/openaddresses",
46 | "files": ["lt/countrywide.csv", "lt/city_of_vilnius.csv"]
47 | },
48 | "polyline": {
49 | "datapath": "/data/polylines",
50 | "files": [ "extract.0sv" ]
51 | },
52 | "whosonfirst": {
53 | "datapath": "/data/whosonfirst",
54 | "countryCode": "LT",
55 | "importPostalcodes": false,
56 | "importPlace": [ "85633269" ]
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/projects/los-angeles-metro/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=/tmp/pelias/los-angeles-metro
3 |
--------------------------------------------------------------------------------
/projects/los-angeles-metro/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Los Angeles Metro Area
3 |
4 | This project is configured to download/prepare/build a complete Pelias installation for Los Angeles, California.
5 |
6 | # Setup
7 |
8 | Please refer to the instructions at https://github.com/pelias/docker in order to install and configure your docker environment.
9 |
10 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
11 |
12 | Please ensure that's all working fine before continuing.
13 |
14 | This project requires about 30 GB of disk space.
15 |
16 | # Run a Build
17 |
18 | To run a complete build, execute the following commands:
19 |
20 | ```bash
21 | pelias compose pull
22 | pelias elastic start
23 | pelias elastic wait
24 | pelias elastic create
25 | pelias download all
26 | pelias prepare all
27 | pelias import all
28 | pelias compose up
29 | pelias test run
30 | ```
31 |
32 | # Make an Example Query
33 |
34 | You can now make queries against your new Pelias build:
35 |
36 | http://localhost:4000/v1/search?text=LAX
37 |
--------------------------------------------------------------------------------
/projects/los-angeles-metro/synonyms/custom_name.txt:
--------------------------------------------------------------------------------
1 |
2 | shopping,store,shop,retail,grocery,mall
3 |
4 | north, N
5 | south, S
6 | east, E
7 | west, W
8 | north west => northwest
9 | north east => northeast
10 | south west => southwest
11 | south east => southeast
12 | northwest, NW
13 | northeast, NE
14 | southwest, SW
15 | southeast, SE
16 |
17 | Int'l, international
--------------------------------------------------------------------------------
/projects/los-angeles-metro/test_cases/search_venue.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "/v1/search venues",
3 | "priorityThresh": 1,
4 | "endpoint": "search",
5 | "tests": [
6 | {
7 | "id": 1,
8 | "status": "pass",
9 | "notes": "los angeles international airport should come up for LAX",
10 | "in": {
11 | "text": "lax"
12 | },
13 | "expected": {
14 | "properties": [
15 | {
16 | "layer": "venue",
17 | "name": "Los Angeles International Airport",
18 | "country_a": "USA",
19 | "country": "United States",
20 | "region": "California",
21 | "region_a": "CA",
22 | "locality": "Los Angeles"
23 | }
24 | ]
25 | }
26 | },
27 | {
28 | "id": 2,
29 | "status": "pass",
30 | "notes": "los angeles international airport should come up for LAX",
31 | "in": {
32 | "text": "lax airport"
33 | },
34 | "expected": {
35 | "properties": [
36 | {
37 | "layer": "venue",
38 | "name": "Los Angeles International Airport",
39 | "country_a": "USA",
40 | "country": "United States",
41 | "region": "California",
42 | "region_a": "CA",
43 | "locality": "Los Angeles"
44 | }
45 | ]
46 | }
47 | }
48 | ]
49 | }
50 |
--------------------------------------------------------------------------------
/projects/netherlands/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=/tmp/pelias/netherlands
3 |
--------------------------------------------------------------------------------
/projects/netherlands/README.md:
--------------------------------------------------------------------------------
1 | # Netherlands area
2 |
3 | This project is configured to download/prepare/build a complete Pelias installation for the Netherlands.
4 |
5 | # Setup
6 |
7 | Please refer to the instructions at in order to install and configure your docker environment.
8 |
9 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
10 |
11 | Please ensure that's all working fine before continuing.
12 |
13 | # Run a Build
14 |
15 | To run a complete build, execute the following commands:
16 |
17 | ```bash
18 | pelias compose pull
19 | pelias elastic start
20 | pelias elastic wait
21 | pelias elastic create
22 | pelias download all
23 | pelias prepare all
24 | pelias import all
25 | pelias compose up
26 | ```
27 |
28 | # Make an Example Query
29 |
30 | You can now make queries against your new Pelias build:
31 |
32 |
33 |
--------------------------------------------------------------------------------
/projects/netherlands/elasticsearch.yml:
--------------------------------------------------------------------------------
1 | network.host: 0.0.0.0
2 | bootstrap.memory_lock: true
3 | indices.breaker.fielddata.limit: 85%
4 | indices.fielddata.cache.size: 75%
--------------------------------------------------------------------------------
/projects/netherlands/pelias.json:
--------------------------------------------------------------------------------
1 | {
2 | "logger": {
3 | "level": "debug",
4 | "timestamp": false
5 | },
6 | "esclient": {
7 | "apiVersion": "7.5",
8 | "hosts": [
9 | { "host": "elasticsearch" }
10 | ]
11 | },
12 | "elasticsearch": {
13 | "settings": {
14 | "index": {
15 | "refresh_interval": "10s",
16 | "number_of_replicas": "0",
17 | "number_of_shards": "1"
18 | }
19 | }
20 | },
21 | "api": {
22 | "services": {
23 | "pip": { "url": "http://pip:4200" },
24 | "libpostal": { "url": "http://libpostal:4400" },
25 | "placeholder": { "url": "http://placeholder:4100" },
26 | "interpolation": { "url": "http://interpolation:4300" }
27 | },
28 | "defaultParameters": {
29 | "focus.point.lat": 52.37,
30 | "focus.point.lon": 4.89
31 | }
32 | },
33 | "imports": {
34 | "adminLookup": {
35 | "enabled": true
36 | },
37 | "geonames": {
38 | "datapath": "/data/geonames",
39 | "countryCode": "NL"
40 | },
41 | "openstreetmap": {
42 | "download": [
43 | { "sourceURL": "http://download.geofabrik.de/europe/netherlands-latest.osm.pbf" }
44 | ],
45 | "leveldbpath": "/tmp",
46 | "datapath": "/data/openstreetmap",
47 | "import": [{
48 | "filename": "netherlands-latest.osm.pbf"
49 | }]
50 | },
51 | "openaddresses": {
52 | "datapath": "/data/openaddresses",
53 | "files": ["nl/countrywide.csv"]
54 | },
55 | "polyline": {
56 | "datapath": "/data/polylines",
57 | "files": [ "extract.0sv" ]
58 | },
59 | "whosonfirst": {
60 | "datapath": "/data/whosonfirst",
61 | "countryCode": "NL",
62 | "importPostalcodes": true,
63 | "importPlace": [ "85633337" ]
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/projects/new-york-city/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=/tmp/pelias/new-york-city
3 |
--------------------------------------------------------------------------------
/projects/new-york-city/README.md:
--------------------------------------------------------------------------------
1 |
2 | # New York City
3 |
4 | This project is configured to download/prepare/build a complete Pelias installation for New York City, New York.
5 |
6 | # Setup
7 |
8 | Please refer to the instructions at https://github.com/pelias/docker in order to install and configure your docker environment.
9 |
10 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
11 |
12 | Please ensure that's all working fine before continuing.
13 |
14 | # Run a Build
15 |
16 | To run a complete build, execute the following commands:
17 |
18 | ```bash
19 | pelias compose pull
20 | pelias elastic start
21 | pelias elastic wait
22 | pelias elastic create
23 | pelias download all
24 | pelias prepare all
25 | pelias import all
26 | pelias compose up
27 | pelias test run
28 | ```
29 |
30 | # Make an Example Query
31 |
32 | You can now make queries against your new Pelias build:
33 |
34 | http://localhost:4000/v1/search?text=111+8th+ave+nyc
35 |
--------------------------------------------------------------------------------
/projects/new-york-city/blacklist/osm.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pelias/docker/6f680540ecef1f5a890c2bd6cc23faeb78b367b6/projects/new-york-city/blacklist/osm.txt
--------------------------------------------------------------------------------
/projects/new-york-city/pelias.json:
--------------------------------------------------------------------------------
1 | {
2 | "logger": {
3 | "level": "info",
4 | "timestamp": false
5 | },
6 | "esclient": {
7 | "apiVersion": "7.5",
8 | "hosts": [
9 | { "host": "elasticsearch" }
10 | ]
11 | },
12 | "elasticsearch": {
13 | "settings": {
14 | "index": {
15 | "refresh_interval": "10s",
16 | "number_of_replicas": "0",
17 | "number_of_shards": "1"
18 | }
19 | }
20 | },
21 | "acceptance-tests": {
22 | "endpoints": {
23 | "docker": "http://api:4000/v1/"
24 | }
25 | },
26 | "api": {
27 | "services": {
28 | "placeholder": { "url": "http://placeholder:4100" },
29 | "pip": { "url": "http://pip:4200" },
30 | "interpolation": { "url": "http://interpolation:4300" },
31 | "libpostal": { "url": "http://libpostal:4400" }
32 | },
33 | "defaultParameters": {
34 | "focus.point.lat": 45.52,
35 | "focus.point.lon": -122.67
36 | }
37 | },
38 | "imports": {
39 | "adminLookup": {
40 | "enabled": true
41 | },
42 | "blacklist": {
43 | "files": [
44 | "/data/blacklist/osm.txt"
45 | ]
46 | },
47 | "geonames": {
48 | "datapath": "/data/geonames",
49 | "countryCode": "US"
50 | },
51 | "openstreetmap": {
52 | "download": [
53 | { "sourceURL": "https://s3.amazonaws.com/metro-extracts.nextzen.org/new-york_new-york.osm.pbf" }
54 | ],
55 | "leveldbpath": "/tmp",
56 | "datapath": "/data/openstreetmap",
57 | "import": [{
58 | "filename": "new-york_new-york.osm.pbf"
59 | }]
60 | },
61 | "openaddresses": {
62 | "datapath": "/data/openaddresses",
63 | "files": [
64 | "us/ny/city_of_new_york.csv"
65 | ]
66 | },
67 | "polyline": {
68 | "datapath": "/data/polylines",
69 | "files": [ "extract.0sv" ]
70 | },
71 | "whosonfirst": {
72 | "datapath": "/data/whosonfirst",
73 | "importPostalcodes": true,
74 | "countryCode": "US",
75 | "importPlace": [
76 | "85977539"
77 | ]
78 | },
79 | "transit": {
80 | "datapath": "/data/transit",
81 | "feeds": [
82 | {
83 | "layerId": "stops",
84 | "url": "http://web.mta.info/developers/data/nyct/subway/google_transit.zip",
85 | "filename": "NYC-subway-stops.txt",
86 | "agencyId": "MTA NYCT",
87 | "agencyName": "MTA NYCT",
88 | "layerName": "Stop"
89 | }
90 | ]
91 | },
92 | "interpolation": {
93 | "download": {
94 | "tiger": {
95 | "datapath": "/data/tiger",
96 | "states": [
97 | { "state_code": 36, "county_code": 81, "name": "Queens County, NY" },
98 | { "state_code": 36, "county_code": 85, "name": "Richmond County, NY" },
99 | { "state_code": 36, "county_code": 61, "name": "New York County, NY" },
100 | { "state_code": 36, "county_code": 47, "name": "Kings County, NY" },
101 | { "state_code": 36, "county_code": 5, "name": "Bronx County, NY" }
102 |
103 | ]
104 | }
105 | }
106 | }
107 | }
108 | }
109 |
--------------------------------------------------------------------------------
/projects/new-york-city/synonyms/custom_name.txt:
--------------------------------------------------------------------------------
1 |
2 | shopping,store,shop,retail,grocery,mall
3 |
4 | north, N
5 | south, S
6 | east, E
7 | west, W
8 | north west => northwest
9 | north east => northeast
10 | south west => southwest
11 | south east => southeast
12 | northwest, NW
13 | northeast, NE
14 | southwest, SW
15 | southeast, SE
16 |
17 | Int'l, international
--------------------------------------------------------------------------------
/projects/new-york-city/test_cases/search_address.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "/v1/search address",
3 | "description": "addresses in New York, NY",
4 | "priorityThresh": 1,
5 | "normalizers": {
6 | "name": [
7 | "toUpperCase",
8 | "removeOrdinals",
9 | "stripPunctuation",
10 | "abbreviateDirectionals",
11 | "abbreviateStreetSuffixes"
12 | ]
13 | },
14 | "tests": [
15 | {
16 | "id": 1,
17 | "status": "pass",
18 | "in": {
19 | "text": "111 8th ave nyc"
20 | },
21 | "expected": {
22 | "properties": [
23 | {
24 | "name": "111 8th ave",
25 | "locality": "New York",
26 | "region": "New York",
27 | "region_a": "NY"
28 | }
29 | ]
30 | }
31 | },
32 | {
33 | "id": 2,
34 | "status": "pass",
35 | "in": {
36 | "text": "63-07 Saunders St rego park ny"
37 | },
38 | "expected": {
39 | "properties": [
40 | {
41 | "name": "63-07 Saunders St",
42 | "locality": "New York",
43 | "region": "New York",
44 | "region_a": "NY",
45 | "borough": "Queens",
46 | "county": "Queens County",
47 | "label": "63-07 Saunders St, Queens, New York, NY, USA"
48 | }
49 | ]
50 | }
51 | },
52 | {
53 | "id": 3,
54 | "status": "pass",
55 | "in": {
56 | "text": "52 Ten Eyck St Brooklyn NY"
57 | },
58 | "expected": {
59 | "properties": [
60 | {
61 | "name": "52 Ten Eyck St",
62 | "locality": "New York",
63 | "region": "New York",
64 | "region_a": "NY",
65 | "borough": "Brooklyn",
66 | "county": "Kings County",
67 | "label": "52 Ten Eyck St, Brooklyn, New York, NY, USA"
68 | }
69 | ]
70 | }
71 | }
72 | ]
73 | }
74 |
--------------------------------------------------------------------------------
/projects/new-york-city/test_cases/search_venue.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "/v1/search venues",
3 | "priorityThresh": 1,
4 | "endpoint": "search",
5 | "tests": [
6 | {
7 | "id": 1,
8 | "status": "pass",
9 | "notes": "John F. Kennedy International Airport should come up for JFK",
10 | "in": {
11 | "text": "JFK"
12 | },
13 | "expected": {
14 | "properties": [
15 | {
16 | "layer": "venue",
17 | "name": "John F. Kennedy International Airport",
18 | "country_a": "USA",
19 | "country": "United States",
20 | "region": "New York",
21 | "region_a": "NY",
22 | "locality": "New York"
23 | }
24 | ]
25 | }
26 | }
27 | ]
28 | }
29 |
--------------------------------------------------------------------------------
/projects/north-america/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=/tmp/pelias/north-america
3 |
--------------------------------------------------------------------------------
/projects/north-america/README.md:
--------------------------------------------------------------------------------
1 | # North America Project
2 |
3 | This project is configured to download/prepare/build a complete Pelias installation for North America.
4 |
5 | As a fairly large build, this will require significant resources to complete quickly. It can still run on a personal computer with 8GB+ RAM, but will take a while. It will require 300GB or so of disk space.
6 |
7 | Running an interpolation build of this size would also take many days
8 |
9 | Additionally, it requires a polylines file generated with [Valhalla](https://github.com/valhalla).
10 |
11 | # Setup
12 |
13 | Please refer to the instructions at https://github.com/pelias/docker in order to install and configure your docker environment.
14 |
15 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
16 |
17 | This build also requires [obtaining or generating a polylines file from Valhalla](https://github.com/pelias/polylines/wiki/Generating-polylines-from-Valhalla). Once you have the polylines file, you must move it to `polylines/extract.0sv`. You can also download the latest `north-america-valhalla.polylines.0sv.gz`, move and rename from: https://geocode.earth/data/
18 |
19 | Please ensure that's all working fine before continuing.
20 |
21 | # Run a Build
22 |
23 | To run a complete build, execute the following commands:
24 |
25 | ```bash
26 | pelias compose pull
27 | pelias elastic start
28 | pelias elastic wait
29 | pelias elastic create
30 | pelias download all
31 | pelias prepare placeholder
32 | pelias import all
33 | pelias compose up
34 | pelias test run
35 | ```
36 |
37 | # Make an Example Query
38 |
39 | You can now make queries against your new Pelias build:
40 |
41 | [http://localhost:4000/v1/search?text=empire state building](http://localhost:4000/v1/search?text=empire%20state%20building)
42 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/address_interpolation.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "address interpolation",
3 | "endpoint": "search",
4 | "priorityThresh": 1,
5 | "distanceThresh": 50,
6 | "tests": [
7 | {
8 | "id": 1,
9 | "user": "missinglink",
10 | "status": "pass",
11 | "in": {
12 | "text": "475f west 26th street, new york"
13 | },
14 | "expected": {
15 | "properties": [
16 | {
17 | "layer": "address",
18 | "source": "mixed",
19 | "housenumber": "475",
20 | "street": "West 26th Street",
21 | "match_type": "interpolated",
22 | "accuracy": "point"
23 | }
24 | ],
25 | "coordinates": [
26 | [ -74.0026336, 40.7495275 ]
27 | ]
28 | }
29 | },
30 | {
31 | "id": "1a",
32 | "user": "missinglink",
33 | "status": "pass",
34 | "description": "fails when specifying size param",
35 | "issue": "https://github.com/pelias/pelias/issues/562",
36 | "in": {
37 | "text": "475f west 26th street, new york",
38 | "size": 1
39 | },
40 | "expected": {
41 | "properties": [
42 | {
43 | "layer": "address",
44 | "source": "mixed",
45 | "housenumber": "475",
46 | "street": "West 26th Street",
47 | "match_type": "interpolated",
48 | "accuracy": "point"
49 | }
50 | ],
51 | "coordinates": [
52 | [ -74.0026336, 40.7495275 ]
53 | ]
54 | }
55 | },
56 | {
57 | "id": 2,
58 | "status": "pass",
59 | "user": "missinglink",
60 | "description": "interpolated address (between two different datasets)",
61 | "in": {
62 | "text": "257 west 26th street, new york"
63 | },
64 | "expected": {
65 | "properties": [
66 | {
67 | "layer": "address",
68 | "source": "mixed",
69 | "housenumber": "257",
70 | "street": "West 26th Street",
71 | "match_type": "interpolated",
72 | "accuracy": "point"
73 | }
74 | ],
75 | "coordinates": [
76 | [ -73.996716, 40.7470427 ]
77 | ]
78 | }
79 | },
80 | {
81 | "id": "2a",
82 | "user": "missinglink",
83 | "status": "fail",
84 | "description": "interpolation service not queried when admin info omittted",
85 | "issue": "https://github.com/pelias/api/issues/897",
86 | "in": {
87 | "text": "257 west 26th street"
88 | },
89 | "expected": {
90 | "properties": [
91 | {
92 | "layer": "address",
93 | "source": "mixed",
94 | "housenumber": "257",
95 | "street": "West 26th Street",
96 | "match_type": "interpolated",
97 | "accuracy": "point"
98 | }
99 | ],
100 | "coordinates": [
101 | [ -73.996716, 40.7470427 ]
102 | ]
103 | }
104 | }
105 | ]
106 | }
107 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/address_matching.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "address matching",
3 | "priorityThresh": 5,
4 | "endpoint": "search",
5 | "tests": [
6 | {
7 | "id": 1,
8 | "issue": "https://github.com/pelias/pelias/issues/424",
9 | "description": "libpostal should understand street names without ordinal sufffixes",
10 | "user": "dianashk",
11 | "type": "dev",
12 | "in": {
13 | "text": "30 w 26 st"
14 | },
15 | "expected": {
16 | "properties": [
17 | {
18 | "layer": "address",
19 | "housenumber": "30",
20 | "street": "West 26th Street"
21 | }
22 | ]
23 | }
24 | },
25 | {
26 | "id": 3,
27 | "status": "pass",
28 | "issue": "https://github.com/pelias/pelias/issues/296",
29 | "description": "Need to decide if a result is more relevant when the house number matches or the street name",
30 | "user": "dianashk",
31 | "type": "dev",
32 | "in": {
33 | "text": "49 Kay Street",
34 | "size": "1"
35 | },
36 | "expected": {
37 | "properties": [
38 | {
39 | "street": "Kay Street"
40 | }
41 | ]
42 | },
43 | "unexpected": {
44 | "properties": [
45 | {
46 | "street": "Kay Drive"
47 | },
48 | {
49 | "street": "Kay Avenue"
50 | },
51 | {
52 | "street": "Kay Road"
53 | },
54 | {
55 | "street": "De Kay Street"
56 | }
57 | ]
58 | }
59 | },
60 | {
61 | "id": 4,
62 | "status": "pass",
63 | "user": "dianashk",
64 | "description": "postalcodes should not strip leading 0's",
65 | "in": {
66 | "text": "461 W Main St, Cheshire, 06410"
67 | },
68 | "expected": {
69 | "properties": [
70 | {
71 | "postalcode": "06410",
72 | "country": "United States",
73 | "region": "Connecticut"
74 | }
75 | ]
76 | },
77 | "unexpected": {
78 | "properties": [
79 | {
80 | "postalcode": "6410"
81 | }
82 | ]
83 | }
84 | },
85 | {
86 | "id": 5,
87 | "status": "pass",
88 | "user": "missinglink",
89 | "description": [ "borough matching, no delimiter", "OA/OSM import order seems to matter so increase priorityThresh" ],
90 | "in": {
91 | "text": "190 dean street brooklyn"
92 | },
93 | "expected": {
94 | "priorityThresh": 2,
95 | "properties": [
96 | { "label": "190 Dean Street, Brooklyn, New York, NY, USA" }
97 | ]
98 | }
99 | }
100 | ]
101 | }
102 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/address_type.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "address type",
3 | "priorityThresh": 5,
4 | "description": [
5 | "These tests ensure that address records are stored in a layer which is distict from the POI layers",
6 | "see: https://github.com/pelias/openstreetmap/issues/29",
7 | "see: https://github.com/pelias/pelias/issues/60"
8 | ],
9 | "tests": [
10 | {
11 | "id": "1",
12 | "status": "pass",
13 | "user": "missinglink",
14 | "endpoint": "search",
15 | "description": [
16 | "Ensure address records are stored in the 'osmaddress' layer."
17 | ],
18 | "in": {
19 | "text": "102 Fleet Street",
20 | "focus.point.lat": 51.53177,
21 | "focus.point.lon": -0.06672
22 | },
23 | "expected": {
24 | "properties": [
25 | {
26 | "gid": "openstreetmap:address:node:1401849738",
27 | "layer": "address",
28 | "source": "openstreetmap",
29 | "id": "node:1401849738"
30 | }
31 | ]
32 | }
33 | },
34 | {
35 | "id": "2",
36 | "status": "pass",
37 | "user": "missinglink",
38 | "endpoint": "search",
39 | "description": [
40 | "Ensure address records are stored in the 'address' layer.",
41 | "Ensure POI records are cloned to 2x different layers",
42 | "related: test(3)"
43 | ],
44 | "in": {
45 | "text": "Shepherd and Flock",
46 | "focus.point.lat": 51.219671,
47 | "focus.point.lon": -0.779389
48 | },
49 | "expected": {
50 | "properties": [
51 | {
52 | "gid": "openstreetmap:venue:way:338854694",
53 | "layer": "venue",
54 | "source": "openstreetmap",
55 | "id": "way:338854694"
56 | }
57 | ]
58 | }
59 | },
60 | {
61 | "id": "3",
62 | "status": "pass",
63 | "user": "missinglink",
64 | "endpoint": "search",
65 | "description": [
66 | "Ensure address records are stored in the 'address' layer.",
67 | "Ensure POI records are cloned to 2x different layers",
68 | "related: test(2)"
69 | ],
70 | "in": {
71 | "text": "22 Moor Park Lane",
72 | "focus.point.lat": 51.219671,
73 | "focus.point.lon": -0.779389
74 | },
75 | "expected": {
76 | "properties": [
77 | {
78 | "gid": "openstreetmap:address:way:338854694",
79 | "layer": "address",
80 | "source": "openstreetmap",
81 | "id": "way:338854694"
82 | }
83 | ]
84 | }
85 | }
86 | ]
87 | }
88 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/autocomplete_acushnet_antiques.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "autocomplete acushnet antiques",
3 | "notes": "https://github.com/pelias/pelias/issues/271",
4 | "endpoint": "autocomplete",
5 | "priorityThresh": 1,
6 | "tests": [
7 | {
8 | "id": "1",
9 | "status": "pass",
10 | "user": "missinglink",
11 | "description": [
12 | "the venue should be retrieved using only a few characters due to the focus",
13 | "point being directly on top of the venue"
14 | ],
15 | "in": {
16 | "focus.point.lat": "41.652889",
17 | "focus.point.lon": "-70.922898",
18 | "text": "acus"
19 | },
20 | "expected": {
21 | "properties": [{
22 | "name": "Acushnet River Antiques Showroom"
23 | }]
24 | }
25 | },
26 | {
27 | "id": "2",
28 | "status": "pass",
29 | "user": "missinglink",
30 | "description": [
31 | "as above except using a prefix of 'antique'"
32 | ],
33 | "in": {
34 | "focus.point.lat": "41.652889",
35 | "focus.point.lon": "-70.922898",
36 | "text": "antiq"
37 | },
38 | "expected": {
39 | "properties": [{
40 | "name": "Acushnet River Antiques Showroom"
41 | }]
42 | }
43 | },
44 | {
45 | "id": "3",
46 | "status": "pass",
47 | "user": "missinglink",
48 | "description": [
49 | "as above except using the full token of the stem of 'antiques'"
50 | ],
51 | "in": {
52 | "focus.point.lat": "41.652889",
53 | "focus.point.lon": "-70.922898",
54 | "text": "antique"
55 | },
56 | "expected": {
57 | "properties": [{
58 | "name": "Acushnet River Antiques Showroom"
59 | }]
60 | }
61 | },
62 | {
63 | "id": "4",
64 | "status": "pass",
65 | "user": "missinglink",
66 | "description": [
67 | "no focus point, this test assumes the name is unique globally",
68 | "at time of writing only one document is returned, this test may need to",
69 | "be updated if another document is added to the index with a similar name"
70 | ],
71 | "in": {
72 | "text": "acushnet an"
73 | },
74 | "expected": {
75 | "properties": [{
76 | "name": "Acushnet River Antiques Showroom"
77 | }]
78 | }
79 | }
80 | ]
81 | }
82 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/autocomplete_boundary_country.json:
--------------------------------------------------------------------------------
1 |
2 | {
3 | "name": "autocomplete boundary.country",
4 | "priorityThresh": 1,
5 | "description": "ensure that only USA results, and especially not GBR results, come back with boundary.country set",
6 | "endpoint": "autocomplete",
7 | "tests": [
8 | {
9 | "id": 1,
10 | "status": "pass",
11 | "user": "julian",
12 | "type": "dev",
13 | "in": {
14 | "boundary.country": "USA",
15 | "text": "London"
16 | },
17 | "unexpected" : {
18 | "properties": [
19 | {
20 | "country_a": "GBR"
21 | }
22 | ]
23 | },
24 | "expected": {
25 | "properties": [
26 | {
27 | "country_a": "USA"
28 | }
29 | ]
30 | }
31 | }
32 | ]
33 | }
34 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/autocomplete_boundary_rect.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "autocomplete boundary.rect",
3 | "priorityThresh": 3,
4 | "endpoint": "autocomplete",
5 | "tests": [
6 | {
7 | "id": 1,
8 | "status": "pass",
9 | "user": "Julian",
10 | "type": "dev",
11 | "in": {
12 | "boundary.rect.min_lat":19,
13 | "boundary.rect.max_lat":20,
14 | "boundary.rect.min_lon":-99,
15 | "boundary.rect.max_lon":-98,
16 | "text": "san francisco"
17 | },
18 | "expected": {
19 | "properties": [
20 | {
21 | "name": "San Francisco",
22 | "country_a": "MEX"
23 | }
24 | ]
25 | },
26 | "unexpected": {
27 | "properties": [{
28 | "country_a": "USA"
29 | }]
30 | }
31 | }
32 | ]
33 | }
34 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/autocomplete_stop_words.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "autocomplete stop words",
3 | "notes": "https://github.com/pelias/schema/issues/105",
4 | "endpoint": "autocomplete",
5 | "priorityThresh": 5,
6 | "tests": [
7 | {
8 | "id": "1",
9 | "status": "pass",
10 | "user": "missinglink",
11 | "priorityThresh": 5,
12 | "in": {
13 | "text": "world trade center"
14 | },
15 | "expected": {
16 | "properties": [
17 | {
18 | "name": "World Trade Center"
19 | }
20 | ]
21 | }
22 | },
23 | {
24 | "id": "3",
25 | "status": "pass",
26 | "user": "missinglink",
27 | "description": [ "case of a query ending in a directional (west)" ],
28 | "priorityThresh": 3,
29 | "in": {
30 | "text": "moscone west"
31 | },
32 | "expected": {
33 | "properties": [
34 | {
35 | "name": "Moscone Convention Center West"
36 | }
37 | ]
38 | }
39 | }
40 | ]
41 | }
42 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/autocomplete_street_centroids.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "autocomplete street centroids",
3 | "priorityThresh": 1,
4 | "endpoint": "autocomplete",
5 | "tests": [
6 | {
7 | "id": 3,
8 | "status": "pass",
9 | "user": "missinglink",
10 | "issue": "https://github.com/pelias/pelias/issues/545",
11 | "in": {
12 | "sources": "osm",
13 | "layers": "street",
14 | "text": "w 26 st, new york"
15 | },
16 | "expected": {
17 | "coordinates": [ -73.9981, 40.747625 ],
18 | "distanceThresh": 1500,
19 | "properties": [
20 | {
21 | "country_a": "USA",
22 | "name": "West 26th Street",
23 | "street": "West 26th Street",
24 | "layer": "street",
25 | "source": "openstreetmap"
26 | }
27 | ]
28 | }
29 | }
30 | ]
31 | }
32 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/autocomplete_street_fallback.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "autocomplete street fallback",
3 | "priorityThresh": 5,
4 | "endpoint": "autocomplete",
5 | "description": [
6 | "query should return street centroid(s) followed by one or",
7 | "more addresses on that street."
8 | ],
9 | "tests": [
10 | {
11 | "id": 2,
12 | "status": "pass",
13 | "user": "missinglink",
14 | "in": {
15 | "text": "w 26th st, new york"
16 | },
17 | "expected": {
18 | "properties": [
19 | {
20 | "country_a": "USA",
21 | "street": "West 26th Street",
22 | "region": "New York",
23 | "layer": "street"
24 | },{
25 | "country_a": "USA",
26 | "street": "West 26th Street",
27 | "region": "New York",
28 | "layer": "address"
29 | }
30 | ]
31 | }
32 | }
33 | ]
34 | }
35 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/autocomplete_venues.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "autocomplete",
3 | "priorityThresh": 5,
4 | "endpoint": "autocomplete",
5 | "tests": [
6 | {
7 | "id": 1,
8 | "status": "pass",
9 | "user": "Diana",
10 | "type": "dev",
11 | "in": {
12 | "text": "DiDi Dumpling"
13 | },
14 | "expected": {
15 | "properties": [
16 | {
17 | "label": "DiDi Dumpling, Manhattan, New York, NY, USA"
18 | }
19 | ]
20 | }
21 | }
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/brooklyn.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Brooklyn",
3 | "priorityThresh": 1,
4 | "tests": [
5 | {
6 | "id": 1,
7 | "status": "pass",
8 | "user": "Julian",
9 | "type": "dev",
10 | "in": {
11 | "text": "brooklyn",
12 | "boundary.country": "USA"
13 | },
14 | "expected": {
15 | "properties": [
16 | {
17 | "name": "Brooklyn",
18 | "region": "New York"
19 | }
20 | ]
21 | }
22 | },
23 | {
24 | "id": 2,
25 | "status": "pass",
26 | "user": "Julian",
27 | "type": "dev",
28 | "in": {
29 | "text": "brooklyn",
30 | "layers": "borough",
31 | "boundary.country": "USA"
32 | },
33 | "expected": {
34 | "properties": [
35 | {
36 | "name": "Brooklyn",
37 | "region": "New York"
38 | }
39 | ]
40 | }
41 | },
42 | {
43 | "id": "3-autocomplete",
44 | "status": "pass",
45 | "user": "Julian",
46 | "type": "dev",
47 | "endpoint": "autocomplete",
48 | "in": {
49 | "text": "brooklyn",
50 | "boundary.country": "USA"
51 | },
52 | "expected": {
53 | "properties": [
54 | {
55 | "name": "Brooklyn",
56 | "region": "New York"
57 | }
58 | ]
59 | }
60 | },
61 | {
62 | "id": 4,
63 | "status": "pass",
64 | "user": "Julian",
65 | "type": "dev",
66 | "in": {
67 | "text": "brooklyn"
68 | },
69 | "expected": {
70 | "priorityThresh": 4,
71 | "properties": [
72 | {
73 | "name": "Brooklyn",
74 | "region": "New York"
75 | }
76 | ]
77 | }
78 | },
79 | {
80 | "id": 5,
81 | "status": "pass",
82 | "user": "Julian",
83 | "type": "dev",
84 | "in": {
85 | "text": "brooklyn",
86 | "layers": "borough"
87 | },
88 | "expected": {
89 | "properties": [
90 | {
91 | "name": "Brooklyn",
92 | "region": "New York"
93 | }
94 | ]
95 | }
96 | },
97 | {
98 | "id": "6-autocomplete",
99 | "status": "pass",
100 | "user": "Julian",
101 | "type": "dev",
102 | "endpoint": "autocomplete",
103 | "in": {
104 | "text": "brooklyn"
105 | },
106 | "expected": {
107 | "priorityThresh": 5,
108 | "properties": [
109 | {
110 | "name": "Brooklyn",
111 | "region": "New York"
112 | }
113 | ]
114 | }
115 | }
116 | ]
117 | }
118 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/confidence_score.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "confidence score",
3 | "priorityThresh": 5,
4 | "tests": [
5 | {
6 | "id": 1,
7 | "status": "pass",
8 | "user": "Julian",
9 | "description": "This is an attempt to test that an address with zipcode that is found does not fail a 'deal breaker'",
10 | "type": "dev",
11 | "in": {
12 | "text": "1 West 72nd St, New York, NY, 10023"
13 | },
14 | "expected": {
15 | "properties": [
16 | {
17 | "name": "1 West 72nd Street",
18 | "housenumber": "1",
19 | "street": "West 72nd Street",
20 | "country_a": "USA",
21 | "postalcode": "10023",
22 | "confidence": 1
23 | }
24 | ]
25 | },
26 | "unexpected": {
27 | "properties": [
28 | {
29 | "confidence": 0.5
30 | }
31 | ]
32 | }
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/encoding.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "encoding, or fun with diacritics",
3 | "priorityThresh": 1,
4 | "tests": [
5 | {
6 | "id": 1,
7 | "status": "pass",
8 | "endpoint": "search",
9 | "description": "make sure that results return the appropriate accents on results",
10 | "in": {
11 | "text": "mexico city"
12 | },
13 | "expected": {
14 | "properties": [
15 | {
16 | "county": "Benito Juárez",
17 | "region": "Ciudad de México",
18 | "name": "Mexico City",
19 | "country": "Mexico"
20 | }
21 | ]
22 | }
23 | }
24 | ]
25 | }
26 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/exact_matches.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "exact matches",
3 | "priorityThresh": 5,
4 | "tests": [
5 | {
6 | "id": 1,
7 | "status": "pass",
8 | "user": "sevko",
9 | "in": {
10 | "text": "100 20th street"
11 | },
12 | "expected": {
13 | "properties": [
14 | {
15 | "name": "100 20th St"
16 | }
17 | ]
18 | }
19 | },
20 | {
21 | "id": 2,
22 | "status": "pass",
23 | "user": "sevko",
24 | "in": {
25 | "text": "40 20th street"
26 | },
27 | "expected": {
28 | "properties": [
29 | {
30 | "name": "40 20th Street"
31 | }
32 | ]
33 | }
34 | },
35 | {
36 | "id": 3,
37 | "status": "pass",
38 | "user": "sevko",
39 | "in": {
40 | "text": "120 42nd Street"
41 | },
42 | "expected": {
43 | "properties": [
44 | {
45 | "name": "120 42nd Street"
46 | }
47 | ]
48 | }
49 | },
50 | {
51 | "id": 4,
52 | "status": "pass",
53 | "user": "sevko",
54 | "type": "dev",
55 | "in": {
56 | "text": "358 41st street, ny"
57 | },
58 | "expected": {
59 | "properties": [
60 | {
61 | "name": "358 41st Street"
62 | }
63 | ]
64 | }
65 | },
66 | {
67 | "id": 6,
68 | "status": "pass",
69 | "user": "sevko",
70 | "type": "dev",
71 | "in": {
72 | "text": "1359 54 street, ny"
73 | },
74 | "expected": {
75 | "properties": [
76 | {
77 | "name": "1359 54th Street"
78 | }
79 | ]
80 | }
81 | },
82 | {
83 | "id": 7,
84 | "status": "pass",
85 | "user": "sevko",
86 | "type": "dev",
87 | "in": {
88 | "text": "310 7 street, ny"
89 | },
90 | "expected": {
91 | "properties": [
92 | {
93 | "name": "310 7th Street"
94 | }
95 | ]
96 | }
97 | },
98 | {
99 | "id": 8,
100 | "status": "pass",
101 | "user": "sevko",
102 | "type": "dev",
103 | "description": "libpostal id's `921` as postcode",
104 | "issue": "https://github.com/pelias/pelias/issues/427",
105 | "in": {
106 | "text": "921 83 street, ny"
107 | },
108 | "expected": {
109 | "properties": [
110 | {
111 | "name": "921 83rd Street"
112 | }
113 | ]
114 | }
115 | },
116 | {
117 | "id": 9,
118 | "status": "pass",
119 | "user": "sevko",
120 | "type": "dev",
121 | "in": {
122 | "text": "518 3 street, ny"
123 | },
124 | "expected": {
125 | "properties": [
126 | {
127 | "name": "518 3rd Street",
128 | "locality": "New York"
129 | }
130 | ]
131 | }
132 | }
133 | ]
134 | }
135 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/fallback.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fallback queries",
3 | "priorityThresh": 5,
4 | "endpoint": "search",
5 | "tests": [
6 | {
7 | "id": 3,
8 | "status": "pass",
9 | "user": "trescube",
10 | "type": "dev",
11 | "notes": [
12 | "this test verifies that a housenumber+street outscores the very common city of berlin",
13 | "https://github.com/pelias/pelias/issues/442"
14 | ],
15 | "in": {
16 | "text": "101 california, san francisco"
17 | },
18 | "expected": {
19 | "properties": [
20 | {
21 | "layer": "address",
22 | "country_a": "USA",
23 | "locality": "San Francisco",
24 | "housenumber": "101",
25 | "street": "California"
26 | }
27 | ]
28 | }
29 | }
30 | ]
31 | }
32 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/labels.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "labels",
3 | "priorityThresh": 10,
4 | "notes": [ "Ensure the 'label' property is being correctly built" ],
5 | "tests": [
6 | {
7 | "id": 1,
8 | "status": "pass",
9 | "user": "missinglink",
10 | "in": {
11 | "text": "San Francisco, San Francisco County, CA"
12 | },
13 | "expected": {
14 | "properties": [{
15 | "label": "San Francisco, CA, USA"
16 | }]
17 | }
18 | },
19 | {
20 | "id": 2,
21 | "status": "pass",
22 | "user": "missinglink",
23 | "in": {
24 | "text": "30 West 26th Street, Manhattan, NY"
25 | },
26 | "expected": {
27 | "properties": [{
28 | "label": "30 West 26th Street, Manhattan, New York, NY, USA"
29 | }]
30 | }
31 | },
32 | {
33 | "id": 4,
34 | "status": "pass",
35 | "description": "placeholder matches both California (USA region) and Canada (country)",
36 | "user": "missinglink",
37 | "in": {
38 | "text": "California, CA"
39 | },
40 | "expected": {
41 | "properties": [{
42 | "label": "California, USA"
43 | }]
44 | }
45 | },
46 | {
47 | "id": 15,
48 | "status": "fail",
49 | "description": "geonnames localadmin records should not have borough or locality component in label",
50 | "issue": [ "https://github.com/pelias/wof-admin-lookup/issues/49",
51 | "https://github.com/pelias/wof-admin-lookup/issues/220" ],
52 | "user": "julian",
53 | "in": {
54 | "text": "city of new york",
55 | "sources": "geonames",
56 | "layers": "localadmin"
57 | },
58 | "expected": {
59 | "properties": [{
60 | "source": "geonames",
61 | "label": "City of New York, NY, USA"
62 | }]
63 | }
64 | },
65 | {
66 | "id": 24,
67 | "status": "pass",
68 | "description": "Washington, D.C. venues should have District of Columbia abbreviation",
69 | "issue": "https://github.com/pelias/labels/issues/14",
70 | "user": "julian",
71 | "in": {
72 | "text": "national air and space museum, washington dc"
73 | },
74 | "expected": {
75 | "properties": [
76 | {
77 | "label": "National Air and Space Museum, Washington, DC, USA"
78 | }
79 | ]
80 | }
81 | }
82 | ]
83 | }
84 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/landmarks.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "landmarks",
3 | "priorityThresh": 5,
4 | "tests": [
5 | {
6 | "id": 14,
7 | "status": "fail",
8 | "description": [
9 | "because there is no indication of importance or popularity in our data",
10 | "we have no way of knowing how to properly sort the results.",
11 | "When they all have a name that matches the query, sort order of results",
12 | "is based purely on order at import time or some variable ES search process.",
13 | "In order to really fix this test, we must find definitive source of popularity data",
14 | "for POIs that have common names."
15 | ],
16 | "issue": "https://github.com/pelias/pelias/issues/171",
17 | "type": "dev",
18 | "user": "hkrishna",
19 | "in": {
20 | "text": "statue of liberty"
21 | },
22 | "expected": {
23 | "properties": [
24 | {
25 | "label": "Statue of Liberty, Manhattan, NY, USA"
26 | }
27 | ]
28 | }
29 | }
30 | ]
31 | }
32 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/missing_postcodes.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "missing postcodes",
3 | "priorityThresh": 3,
4 | "endpoint": "search",
5 | "tests": [
6 | {
7 | "id": 1,
8 | "status": "pass",
9 | "user": "Julian",
10 | "type": "dev",
11 | "notes": "Correct zipcode is 10009",
12 | "in": {
13 | "text": "267 e 10th st, new york, ny 10010"
14 | },
15 | "expected": {
16 | "properties": [
17 | {
18 | "name": "267 East 10th Street",
19 | "country_a": "USA",
20 | "country": "United States",
21 | "region": "New York",
22 | "region_a": "NY",
23 | "county": "New York County",
24 | "borough": "Manhattan",
25 | "locality": "New York",
26 | "neighbourhood": "East Village",
27 | "housenumber": "267",
28 | "street": "East 10th Street"
29 | }
30 | ]
31 | }
32 | },
33 | {
34 | "id": 2,
35 | "status": "fail",
36 | "user": "Julian",
37 | "type": "dev",
38 | "notes": "Desired document has no zipcode, but should be 33801. If we ever get better data, find a new test case",
39 | "in": {
40 | "text": "440 S Combee Rd, Lakeland, FL 33801"
41 | },
42 | "expected": {
43 | "properties": [
44 | {
45 | "name": "440 South Combee Road",
46 | "country_a": "USA",
47 | "country": "United States",
48 | "region": "Florida",
49 | "region_a": "FL",
50 | "county": "Polk County",
51 | "locality": "Crystal Lake",
52 | "housenumber": "440",
53 | "street": "South Combee Road"
54 | }
55 | ]
56 | }
57 | }
58 | ]
59 | }
60 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/placeholder_geometric_filters.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Placeholder should obey geometric filters",
3 | "priorityThresh": 1,
4 | "tests": [
5 | {
6 | "id": 2,
7 | "status": "pass",
8 | "endpoint": "search",
9 | "description": "Fallback query should obey geometric filter",
10 | "in": {
11 | "text": "2000 main st, berlin",
12 | "boundary.country": "CA"
13 | },
14 | "expected": {
15 | "properties": [
16 | {
17 | "name": "2000 Main St",
18 | "country_a": "CAN"
19 | }
20 | ]
21 | }
22 | }
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/properties_source_id.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Result properties",
3 | "priorityThresh": 1,
4 | "tests": [
5 | {
6 | "id": 1,
7 | "status": "pass",
8 | "endpoint": "search",
9 | "description": "test it in search results and OSM data",
10 | "in": {
11 | "text": "IHOP",
12 | "focus.point.lon": -73.944108,
13 | "focus.point.lat": 40.815263,
14 | "layers": "venue"
15 | },
16 | "expected": {
17 | "properties": [
18 | {
19 | "gid": "openstreetmap:venue:node/2562438641",
20 | "layer": "venue",
21 | "source": "openstreetmap",
22 | "id": "node/2562438641",
23 | "source_id": "node/2562438641"
24 | }
25 | ]
26 | }
27 | },
28 | {
29 | "id": 2,
30 | "status": "pass",
31 | "endpoint": "autocomplete",
32 | "description": "test it in autocomplete results and WOF data",
33 | "in": {
34 | "text": "London",
35 | "sources": "wof"
36 | },
37 | "expected": {
38 | "properties": [
39 | {
40 | "gid": "whosonfirst:locality:101750367",
41 | "layer": "locality",
42 | "source": "whosonfirst",
43 | "id": "101750367",
44 | "source_id": "101750367"
45 | }
46 | ]
47 | }
48 | },
49 | {
50 | "id": 3,
51 | "status": "pass",
52 | "endpoint": "reverse",
53 | "in": {
54 | "point.lon": -73.989231,
55 | "point.lat": 40.744022,
56 | "layers": "venue"
57 | },
58 | "expected": {
59 | "properties": [
60 | {
61 | "gid": "openstreetmap:venue:way/248143769",
62 | "layer": "venue",
63 | "id": "way/248143769",
64 | "source": "openstreetmap",
65 | "source_id": "way/248143769",
66 | "name": "Flatiron Hotel"
67 | }
68 | ]
69 | }
70 | },
71 | {
72 | "id": 4,
73 | "status": "pass",
74 | "description": "OSM venue",
75 | "endpoint": "place",
76 | "in": {
77 | "ids": "openstreetmap:venue:node:4509430011"
78 | },
79 | "expected": {
80 | "properties": [
81 | {
82 | "gid": "openstreetmap:venue:node:4509430011",
83 | "layer": "venue",
84 | "source": "openstreetmap",
85 | "id": "node:4509430011",
86 | "source_id": "node:4509430011",
87 | "name": "INDAY"
88 | }
89 | ]
90 | }
91 | }
92 | ]
93 | }
94 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/search_abbreviations.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "searchAbbvs",
3 | "priorityThresh": 5,
4 | "tests": [
5 | {
6 | "id": 1,
7 | "status": "fail",
8 | "issue": "https://github.com/pelias/pelias/issues/737",
9 | "user": "julian",
10 | "in": {
11 | "text": "412 Saint Patrick St, donaldsonville, la"
12 | },
13 | "expected": {
14 | "properties": [
15 | {
16 | "layer": "address",
17 | "housenumber": "412",
18 | "street": "St Patrick St",
19 | "locality": "Donaldsonville",
20 | "region": "Louisiana"
21 | }
22 | ]
23 | }
24 | },
25 | {
26 | "id": 2,
27 | "status": "pass",
28 | "user": "julian",
29 | "in": {
30 | "text": "412 St Patrick St, donaldsonville, la"
31 | },
32 | "expected": {
33 | "properties": [
34 | {
35 | "layer": "address",
36 | "housenumber": "412",
37 | "street": "St Patrick St",
38 | "locality": "Donaldsonville",
39 | "region": "Louisiana"
40 | }
41 | ]
42 | }
43 | }
44 | ]
45 | }
46 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/search_city_country.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "search city/country",
3 | "priorityThresh": 1,
4 | "endpoint": "search",
5 | "notes": "these tests test functionality to match libpostal city/country analysis, these can be moved to a general placeholder test area",
6 | "tests": [
7 | {
8 | "id": 20,
9 | "status": "pass",
10 | "user": "trescube",
11 | "type": "dev",
12 | "in": {
13 | "text": "truth or consequences, usa"
14 | },
15 | "expected": {
16 | "properties": [
17 | {
18 | "layer": "locality",
19 | "locality": "Truth Or Consequences",
20 | "region_a": "NM",
21 | "country": "United States",
22 | "country_a": "USA"
23 | }
24 | ]
25 | }
26 | },
27 | {
28 | "id": 21,
29 | "status": "pass",
30 | "user": "trescube",
31 | "type": "dev",
32 | "in": {
33 | "text": "toronto, ca"
34 | },
35 | "expected": {
36 | "properties": [
37 | {
38 | "layer": "locality",
39 | "locality": "Toronto",
40 | "region_a": "ON",
41 | "country": "Canada",
42 | "country_a": "CAN"
43 | }
44 | ]
45 | }
46 | },
47 | {
48 | "id": 22,
49 | "status": "pass",
50 | "user": "trescube",
51 | "type": "dev",
52 | "in": {
53 | "text": "yakima, us"
54 | },
55 | "expected": {
56 | "properties": [
57 | {
58 | "layer": "locality",
59 | "locality": "Yakima",
60 | "region_a": "WA",
61 | "country": "United States",
62 | "country_a": "USA"
63 | }
64 | ]
65 | }
66 | },
67 | {
68 | "id": 31,
69 | "status": "pass",
70 | "user": "trescube",
71 | "type": "dev",
72 | "notes": "mismatch should fallback to country",
73 | "in": {
74 | "text": "seattle, canada"
75 | },
76 | "expected": {
77 | "properties": [
78 | {
79 | "layer": "country",
80 | "country": "Canada",
81 | "country_a": "CAN"
82 | }
83 | ]
84 | }
85 | }
86 | ]
87 | }
88 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/search_coarse.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "search coarse",
3 | "priorityThresh": 5,
4 | "endpoint": "search",
5 | "tests": [
6 | {
7 | "id": 1,
8 | "status": "pass",
9 | "user": "Diana",
10 | "type": "dev",
11 | "in": {
12 | "focus.point.lat": 40.744243,
13 | "focus.point.lon": -73.990342,
14 | "text": "brooklyn"
15 | },
16 | "expected": {
17 | "properties": [
18 | {
19 | "label": "Brooklyn, New York, NY, USA"
20 | }
21 | ]
22 | }
23 | },
24 | {
25 | "id": 2,
26 | "status": "pass",
27 | "issue": "https://github.com/pelias/pelias/issues/295",
28 | "description": "data issue",
29 | "user": "Diana",
30 | "type": "dev",
31 | "in": {
32 | "focus.point.lat": 40.744243,
33 | "focus.point.lon": -73.990342,
34 | "text": "new york"
35 | },
36 | "expected": {
37 | "properties": [
38 | {
39 | "label": "New York, USA"
40 | }
41 | ]
42 | },
43 | "unexpected": {
44 | "properties": [
45 | {
46 | "name": "New York",
47 | "borough": "Brooklyn"
48 | }
49 | ]
50 | }
51 | }
52 | ]
53 | }
54 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/search_geodisambiguation.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "search geodisambiguation",
3 | "priorityThresh": 1,
4 | "endpoint": "search",
5 | "tests": [
6 | {
7 | "id": 1,
8 | "status": "pass",
9 | "user": "Stephen",
10 | "issue": "https://github.com/pelias/whosonfirst/issues/106",
11 | "notes": "this is now covered by placeholder which doesn't ingest geonames",
12 | "in": {
13 | "text": "Aliquippa, PA",
14 | "sources": "wof"
15 | },
16 | "expected": {
17 | "priorityThresh": 2,
18 | "properties": [
19 | {
20 | "layer": "locality",
21 | "name": "Aliquippa",
22 | "region": "Pennsylvania",
23 | "region_a": "PA",
24 | "country": "United States",
25 | "country_a": "USA"
26 | }
27 | ]
28 | }
29 | }
30 | ]
31 | }
32 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/search_iso2_to_iso3.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ISO2->ISO3 internal conversion",
3 | "notes": "this test verifies that an iso2 country matches",
4 | "priorityThresh": 1,
5 | "endpoint": "search",
6 | "tests": [
7 | {
8 | "id": 1,
9 | "status": "pass",
10 | "user": "trescube",
11 | "type": "dev",
12 | "in": {
13 | "text": "1 Main St, Richlandtown, PA, US"
14 | },
15 | "expected": {
16 | "properties": [
17 | {
18 | "layer": "address",
19 | "country_a": "USA",
20 | "region": "Pennsylvania",
21 | "region_a": "PA",
22 | "locality": "Richlandtown",
23 | "street": "Main St",
24 | "housenumber": "1"
25 | }
26 | ]
27 | }
28 | },
29 | {
30 | "id": 4,
31 | "status": "pass",
32 | "user": "trescube",
33 | "type": "dev",
34 | "in": {
35 | "text": "22 Lloyd George Ave, Toronto Ontario CA"
36 | },
37 | "expected": {
38 | "properties": [
39 | {
40 | "layer": "address",
41 | "country_a": "CAN",
42 | "locality": "Toronto",
43 | "street": "Lloyd George Ave",
44 | "housenumber": "22"
45 | }
46 | ]
47 | }
48 | },
49 | {
50 | "id": 5,
51 | "status": "pass",
52 | "user": "trescube",
53 | "type": "dev",
54 | "in": {
55 | "text": "327 Rincon de Romos, Aguascalientes, MX"
56 | },
57 | "expected": {
58 | "properties": [
59 | {
60 | "layer": "address",
61 | "country_a": "MEX",
62 | "locality": "Aguascalientes",
63 | "street": "Rincón De Romos",
64 | "housenumber": "327"
65 | }
66 | ]
67 | }
68 | }
69 | ]
70 | }
71 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/search_layers.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "search layers",
3 | "tests": [
4 | {
5 | "id": "1",
6 | "status": "pass",
7 | "user": "orangejulius",
8 | "endpoint": "search",
9 | "description": "Ensure there are no non-venue records when searching for venue",
10 | "issue": "https://github.com/pelias/pelias/issues/253",
11 | "in": {
12 | "text": "london",
13 | "layers": "venue"
14 | },
15 | "unexpected": {
16 | "properties": [
17 | {
18 | "layer": "country"
19 | },
20 | {
21 | "layer": "macroregion"
22 | },
23 | {
24 | "layer": "region"
25 | },
26 | {
27 | "layer": "macrocounty"
28 | },
29 | {
30 | "layer": "county"
31 | },
32 | {
33 | "layer": "localadmin"
34 | },
35 | {
36 | "layer": "locality"
37 | },
38 | {
39 | "layer": "borough"
40 | },
41 | {
42 | "layer": "neighbourhood"
43 | },
44 | {
45 | "layer": "address"
46 | }
47 | ]
48 | }
49 | }
50 | ]
51 | }
52 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/search_poi.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "search_poi",
3 | "notes": "For testing POI searches",
4 | "priorityThresh": 5,
5 | "tests": [
6 | {
7 | "id": "searchpoi-1",
8 | "status": "fail",
9 | "description": "@nvkelso couldn't find Target in Eureka while visiting home",
10 | "issue": "https://github.com/pelias/pelias/issues/185",
11 | "user": "riordan",
12 | "in": {
13 | "text": "Target Eureka CA"
14 | },
15 | "expected": {
16 | "priorityThresh": 1,
17 | "properties": [
18 | {
19 | "layer": "venue",
20 | "name": "Target",
21 | "locality": "Eureka",
22 | "region": "California"
23 | }
24 | ]
25 | }
26 | },
27 | {
28 | "id": "searchpoi-2",
29 | "status": "fail",
30 | "description": "@nvkelso couldn't find Target in Eureka while visiting home",
31 | "issue": "https://github.com/pelias/pelias/issues/185",
32 | "user": "riordan",
33 | "in": {
34 | "text": "Target Eureka California"
35 | },
36 | "expected": {
37 | "priorityThresh": 1,
38 | "properties": [
39 | {
40 | "layer": "venue",
41 | "name": "Target",
42 | "locality": "Eureka",
43 | "region": "California"
44 | }
45 | ]
46 | }
47 | },
48 | {
49 | "id": "searchpoi-3",
50 | "status": "fail",
51 | "description": "Searching with focus on",
52 | "issue": "https://github.com/pelias/pelias/issues/185",
53 | "user": "riordan",
54 | "in": {
55 | "text": "Target",
56 | "focus.point.lat": "40.801944",
57 | "focus.point.lon": "-124.163611"
58 | },
59 | "expected": {
60 | "priorityThresh": 1,
61 | "properties": [
62 | {
63 | "layer": "venue",
64 | "name": "Target",
65 | "locality": "Eureka",
66 | "region": "California"
67 | }
68 | ]
69 | }
70 | }
71 | ]
72 | }
73 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/search_postalcodes.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "search_postalcodes",
3 | "notes": "For testing postalcode searches",
4 | "priorityThresh": 1,
5 | "tests": [
6 | {
7 | "id": "searchpostal-1",
8 | "status": "fail",
9 | "issue": "https://github.com/pelias/pelias/issues/692",
10 | "user": "diana",
11 | "in": {
12 | "text": "90210"
13 | },
14 | "expected": {
15 | "properties": [
16 | {
17 | "layer": "postalcode",
18 | "name": "90210",
19 | "locality": "Los Angeles",
20 | "region": "California"
21 | }
22 | ]
23 | }
24 | },
25 | {
26 | "id": "searchpostal-4",
27 | "status": "fail",
28 | "issue": "https://github.com/pelias/pelias/issues/692",
29 | "user": "diana",
30 | "description": "fallback to postalcode when city is not found",
31 | "in": {
32 | "text": "not-an-address, 90210"
33 | },
34 | "expected": {
35 | "properties": [
36 | {
37 | "layer": "postalcode",
38 | "name": "90210",
39 | "locality": "Los Angeles",
40 | "region": "California"
41 | }
42 | ]
43 | }
44 | }
45 | ]
46 | }
47 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/search_street_centroids.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "search street centroids",
3 | "priorityThresh": 1,
4 | "endpoint": "search",
5 | "tests": [
6 | {
7 | "id": 3,
8 | "status": "pass",
9 | "user": "missinglink",
10 | "issue": "https://github.com/pelias/pelias/issues/545",
11 | "in": {
12 | "sources": "osm",
13 | "layers": "street",
14 | "text": "w 26 st, new york"
15 | },
16 | "expected": {
17 | "coordinates": [ -73.9981, 40.747625 ],
18 | "distanceThresh": 1500,
19 | "properties": [
20 | {
21 | "country_a": "USA",
22 | "name": "West 26th Street",
23 | "street": "West 26th Street",
24 | "layer": "street",
25 | "source": "openstreetmap"
26 | }
27 | ]
28 | }
29 | }
30 | ]
31 | }
32 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/structured_address_parsing.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "structured address parsing",
3 | "priorityThresh": 1,
4 | "endpoint": "search/structured",
5 | "tests": [
6 | {
7 | "id": 1,
8 | "status": "pass",
9 | "user": "diana",
10 | "notes": "address with highway number should not result in 500 error",
11 | "in": {
12 | "address": "1396 Dual 40 Hwy",
13 | "locality": "Hagerstown",
14 | "region": "MD",
15 | "postalcode": "21740",
16 | "country": "United States"
17 | },
18 | "expected": {
19 | "properties": [
20 | {
21 | "country_a": "USA",
22 | "country": "United States",
23 | "region": "Maryland",
24 | "region_a": "MD",
25 | "locality": "Hagerstown"
26 | }
27 | ]
28 | }
29 | },
30 | {
31 | "id": 1.1,
32 | "status": "fail",
33 | "user": "diana",
34 | "in": {
35 | "address": "1396 Dual 40 Hwy",
36 | "locality": "Hagerstown",
37 | "region": "MD",
38 | "postalcode": "21740",
39 | "country": "United States"
40 | },
41 | "expected": {
42 | "properties": [
43 | {
44 | "layer": "address",
45 | "housenumber": "1396",
46 | "street": "Dual Highway",
47 | "country_a": "USA",
48 | "country": "United States",
49 | "region": "Maryland",
50 | "region_a": "MD",
51 | "locality": "Hagerstown"
52 | }
53 | ]
54 | }
55 | }
56 | ]
57 | }
58 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/structured_postalcodes.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "structured_postalcodes",
3 | "notes": "For testing postalcode structured searches",
4 | "priorityThresh": 1,
5 | "endpoint": "search/structured",
6 | "tests": [
7 | {
8 | "id": "structuredpostal-1",
9 | "status": "fail",
10 | "issue": "https://github.com/pelias/pelias/issues/692",
11 | "user": "diana",
12 | "in": {
13 | "postalcode": "90210"
14 | },
15 | "expected": {
16 | "properties": [
17 | {
18 | "layer": "postalcode",
19 | "name": "90210",
20 | "locality": "Los Angeles",
21 | "region": "California"
22 | }
23 | ]
24 | }
25 | },
26 | {
27 | "id": "structuredpostal-3",
28 | "status": "fail",
29 | "issue": "https://github.com/pelias/pelias/issues/692",
30 | "user": "diana",
31 | "description": "fallback to postalcode when city is not found",
32 | "in": {
33 | "address": "not-an-address",
34 | "postalcode": "90210"
35 | },
36 | "expected": {
37 | "properties": [
38 | {
39 | "layer": "postalcode",
40 | "name": "90210",
41 | "locality": "Los Angeles",
42 | "region": "California"
43 | }
44 | ]
45 | }
46 | },
47 | {
48 | "id": "structuredpostal-4",
49 | "status": "pass",
50 | "user": "julian",
51 | "description": "postalcode and country does not fall back to country",
52 | "issue": "https://github.com/pelias/api/issues/973",
53 | "in": {
54 | "postalcode": "83278",
55 | "country": "United States"
56 | },
57 | "expected": {
58 | "properties": [
59 | {
60 | "layer": "postalcode",
61 | "name": "83278",
62 | "county": "Custer County",
63 | "region": "Idaho"
64 | }
65 | ]
66 | }
67 | }
68 | ]
69 | }
70 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/tizen-sdk-geocoder.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "tizen sdk: geocode",
3 | "priorityThresh": 1,
4 | "description": [
5 | "maps_service_geocode (const char *address): Gets the position coordinates for a given address",
6 | "maps_service_geocode_inside_area (const char *address, const maps_area_h bounds): Gets the position for a given address, within the specified bounding box",
7 | "maps_service_geocode_by_structured_address (const maps_address_h address): Gets the position coordinates for a given address",
8 | "maps_service_reverse_geocode (double latitude, double longitude): Gets the address for a given position coordinates",
9 | "maps_service_multi_reverse_geocode (maps_coordinates_list_h coordinates_list): Gets the address list for a given position coordinates list"
10 | ],
11 | "tests": [
12 | {
13 | "id": "maps_service_geocode_inside_area",
14 | "status": "pass",
15 | "user": "dianashk",
16 | "endpoint": "search",
17 | "in": {
18 | "text": "30 w 26th street",
19 | "boundary.rect.min_lon": -80.947265625,
20 | "boundary.rect.min_lat": 41.343824581185686,
21 | "boundary.rect.max_lat": 42.407234661551875,
22 | "boundary.rect.max_lon": -78.90380859375
23 | },
24 | "expected": {
25 | "properties": [
26 | {
27 | "name": "30 West 26th Street",
28 | "region_a": "PA"
29 | }
30 | ]
31 | },
32 | "unexpected": {
33 | "properties": [
34 | {
35 | "region_a": "NY"
36 | }
37 | ]
38 | }
39 | },
40 | {
41 | "id": "maps_service_geocode_by_structured_address",
42 | "status": "pass",
43 | "user": "dianashk",
44 | "endpoint": "search/structured",
45 | "in": {
46 | "address": "30 w 26th street",
47 | "region": "new york",
48 | "postalcode": "10010"
49 | },
50 | "expected": {
51 | "priorityThresh": 2,
52 | "properties": [
53 | {
54 | "name": "30 West 26th Street",
55 | "region_a": "NY"
56 | }
57 | ]
58 | }
59 | },
60 | {
61 | "id": "maps_service_reverse_geocode",
62 | "status": "pass",
63 | "endpoint": "reverse",
64 | "in": {
65 | "point.lon": -73.989231,
66 | "point.lat": 40.744022,
67 | "layers": "address"
68 | },
69 | "expected": {
70 | "properties": [
71 | {
72 | "name": "9 West 26th Street"
73 | }
74 | ]
75 | }
76 | }
77 | ]
78 | }
79 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/washington_dc.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "washington dc",
3 | "priorityThresh": 1,
4 | "tests": [
5 | {
6 | "id": 1,
7 | "status": "pass",
8 | "user": "julian",
9 | "description": "address searches in washington DC should work when 'district of columbia' is abbreviated",
10 | "issue": "https://github.com/pelias/pelias/issues/509",
11 | "in": {
12 | "text": "1705 P St NW, Washington, dc"
13 | },
14 | "expected": {
15 | "priorityThresh": 2,
16 | "properties": [
17 | {
18 | "layer": "address",
19 | "housenumber": "1705",
20 | "street": "P Street Northwest",
21 | "locality": "Washington",
22 | "region": "District of Columbia"
23 | }
24 | ]
25 | }
26 | },
27 | {
28 | "id": 2,
29 | "status": "pass",
30 | "user": "julian",
31 | "description": "address searches in washington DC should work when 'district of columbia' is not abbreviated",
32 | "issue": "https://github.com/pelias/pelias/issues/509",
33 | "in": {
34 | "text": "1705 P St NW, Washington, district of columbia"
35 | },
36 | "expected": {
37 | "priorityThresh": 2,
38 | "properties": [
39 | {
40 | "layer": "address",
41 | "housenumber": "1705",
42 | "street": "P Street Northwest",
43 | "locality": "Washington",
44 | "region": "District of Columbia"
45 | }
46 | ]
47 | }
48 | },
49 | {
50 | "id": 3,
51 | "status": "pass",
52 | "user": "julian",
53 | "description": "venue searches in washington DC should work when 'district of columbia' is abbreviated",
54 | "issue": "https://github.com/pelias/pelias/issues/509",
55 | "in": {
56 | "text": "busboys and poets, washington dc"
57 | },
58 | "expected": {
59 | "properties": [
60 | {
61 | "layer": "venue",
62 | "name": "Busboys and Poets",
63 | "locality": "Washington",
64 | "region": "District of Columbia"
65 | }
66 | ]
67 | }
68 | },
69 | {
70 | "id": 4,
71 | "status": "pass",
72 | "user": "julian",
73 | "description": "S Street in Washington, DC should not be interpreted as 'South St'",
74 | "issue": "https://github.com/pelias/pelias/issues/329",
75 | "in": {
76 | "text": "641 S Street NW, washington, district of columbia"
77 | },
78 | "expected": {
79 | "properties": [
80 | {
81 | "layer": "address",
82 | "housenumber": "641",
83 | "street": "S Street Northwest",
84 | "locality": "Washington",
85 | "region": "District of Columbia"
86 | }
87 | ]
88 | }
89 | }
90 | ]
91 | }
92 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/wof_counties.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Who's on First counties",
3 | "priorityThresh": 1,
4 | "tests": [
5 | {
6 | "id": 2,
7 | "status": "fail",
8 | "user": "Stephen",
9 | "issue": "https://github.com/pelias/pelias/issues/311",
10 | "description": [
11 | "chosen since it's also not the name of a city",
12 | "Result from UK shows up first because we still don't handle admin parts properly"
13 | ],
14 | "in": {
15 | "text": "Potter, PA",
16 | "sources": "wof"
17 | },
18 | "expected": {
19 | "properties": [
20 | {
21 | "layer": "county",
22 | "name": "Potter County",
23 | "county": "Potter County",
24 | "region": "Pennsylvania",
25 | "region_a": "PA",
26 | "country": "United States",
27 | "country_a": "USA"
28 | }
29 | ]
30 | }
31 | },
32 | {
33 | "id": 3,
34 | "status": "pass",
35 | "user": "Stephen",
36 | "description": "chosen because users think it's a city",
37 | "in": {
38 | "text": "Maui, Hawaii",
39 | "sources": "wof"
40 | },
41 | "expected": {
42 | "properties": [
43 | {
44 | "layer": "county",
45 | "name": "Maui County",
46 | "county": "Maui County",
47 | "region": "Hawaii",
48 | "region_a": "HI",
49 | "country": "United States",
50 | "country_a": "USA"
51 | }
52 | ]
53 | }
54 | }
55 | ]
56 | }
57 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/wof_countries.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Who's on First countries",
3 | "priorityThresh": 1,
4 | "tests": [
5 | {
6 | "id": 1,
7 | "status": "pass",
8 | "user": "Stephen",
9 | "description": "",
10 | "in": {
11 | "text": "United States",
12 | "sources": "wof"
13 | },
14 | "expected": {
15 | "properties": [
16 | {
17 | "layer": "country",
18 | "name": "United States",
19 | "country": "United States",
20 | "country_a": "USA"
21 | }
22 | ]
23 | }
24 | },
25 | {
26 | "id": 2,
27 | "status": "pass",
28 | "user": "Stephen",
29 | "description": "",
30 | "in": {
31 | "text": "Canada",
32 | "sources": "wof"
33 | },
34 | "expected": {
35 | "properties": [
36 | {
37 | "layer": "country",
38 | "name": "Canada",
39 | "country": "Canada",
40 | "country_a": "CAN"
41 | }
42 | ]
43 | }
44 | },
45 | {
46 | "id": 6,
47 | "status": "pass",
48 | "user": "Stephen",
49 | "issue": "https://github.com/pelias/pelias/issues/263",
50 | "description": "placeholder supports alpha3 and alpha2 country codes",
51 | "in": {
52 | "text": "USA",
53 | "sources": "wof"
54 | },
55 | "expected": {
56 | "properties": [
57 | {
58 | "layer": "country",
59 | "name": "United States",
60 | "country": "United States",
61 | "country_a": "USA"
62 | }
63 | ]
64 | }
65 | }
66 | ]
67 | }
68 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/wof_localadmins.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Who's on First localadmins",
3 | "priorityThresh": 1,
4 | "tests": [
5 | {
6 | "id": 2,
7 | "status": "pass",
8 | "user": "Stephen",
9 | "in": {
10 | "text": "Norwood Young America, Minnesota, US",
11 | "sources": "wof",
12 | "layers": "localadmin"
13 | },
14 | "expected": {
15 | "properties": [
16 | {
17 | "layer": "localadmin",
18 | "name": "Norwood Young America",
19 | "county": "Carver County",
20 | "region": "Minnesota",
21 | "region_a": "MN",
22 | "country": "United States",
23 | "country_a": "USA"
24 | }
25 | ]
26 | }
27 | },
28 | {
29 | "id": 3,
30 | "status": "pass",
31 | "user": "Stephen",
32 | "in": {
33 | "text": "Zickrick, SD",
34 | "sources": "wof"
35 | },
36 | "expected": {
37 | "priorityThresh": 1,
38 | "properties": [
39 | {
40 | "layer": "localadmin",
41 | "name": "Zickrick Township",
42 | "region": "South Dakota",
43 | "region_a": "SD",
44 | "country": "United States",
45 | "country_a": "USA"
46 | }
47 | ]
48 | }
49 | }
50 |
51 | ]
52 | }
53 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/wof_neighbourhoods.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Who's on First neighbourhoods",
3 | "priorityThresh": 1,
4 | "tests": [
5 | {
6 | "id": 1,
7 | "status": "pass",
8 | "user": "Stephen",
9 | "in": {
10 | "text": "Crown Heights, Brooklyn, New York",
11 | "sources": "wof"
12 | },
13 | "expected": {
14 | "properties": [
15 | {
16 | "layer": "neighbourhood",
17 | "name": "Crown Heights",
18 | "locality": "New York",
19 | "borough": "Brooklyn",
20 | "county": "Kings County",
21 | "region": "New York",
22 | "region_a": "NY",
23 | "country": "United States",
24 | "country_a": "USA"
25 | }
26 | ]
27 | }
28 | },
29 | {
30 | "id": 2,
31 | "status": "pass",
32 | "issue": "https://github.com/pelias/pelias/issues/548",
33 | "user": "Stephen",
34 | "in": {
35 | "text": "Reparto Vista Alegre, Cuba",
36 | "sources": "wof"
37 | },
38 | "expected": {
39 | "properties": [
40 | {
41 | "layer": "neighbourhood",
42 | "name": "Reparto Vista Alegre",
43 | "region": "Santiago de Cuba",
44 | "country": "Cuba",
45 | "country_a": "CUB"
46 | }
47 | ]
48 | }
49 | },
50 | {
51 | "id": 3,
52 | "status": "pass",
53 | "user": "Stephen",
54 | "in": {
55 | "text": "Nuevo Cristóbal, Panama",
56 | "sources": "wof"
57 | },
58 | "expected": {
59 | "properties": [
60 | {
61 | "layer": "neighbourhood",
62 | "name": "Nuevo Cristóbal",
63 | "country": "Panama",
64 | "country_a": "PAN"
65 | }
66 | ]
67 | }
68 | }
69 | ]
70 | }
71 |
--------------------------------------------------------------------------------
/projects/north-america/test_cases/wof_regions.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Who's on First regions",
3 | "priorityThresh": 1,
4 | "tests": [
5 | {
6 | "id": 1,
7 | "status": "pass",
8 | "user": "Stephen",
9 | "description": "",
10 | "in": {
11 | "text": "Pennsylvania",
12 | "sources": "wof"
13 | },
14 | "expected": {
15 | "properties": [
16 | {
17 | "layer": "region",
18 | "name": "Pennsylvania",
19 | "region": "Pennsylvania",
20 | "region_a": "PA",
21 | "country": "United States",
22 | "country_a": "USA"
23 | }
24 | ]
25 | }
26 | },
27 | {
28 | "id": 2,
29 | "status": "pass",
30 | "user": "Stephen",
31 | "description": "",
32 | "in": {
33 | "text": "New Mexico",
34 | "sources": "wof"
35 | },
36 | "expected": {
37 | "properties": [
38 | {
39 | "layer": "region",
40 | "name": "New Mexico",
41 | "region": "New Mexico",
42 | "region_a": "NM",
43 | "country": "United States",
44 | "country_a": "USA"
45 | }
46 | ]
47 | }
48 | },
49 | {
50 | "id": 3,
51 | "status": "pass",
52 | "user": "Stephen",
53 | "description": "",
54 | "in": {
55 | "text": "Newfoundland and Labrador",
56 | "sources": "wof"
57 | },
58 | "expected": {
59 | "properties": [
60 | {
61 | "layer": "region",
62 | "name": "Newfoundland and Labrador",
63 | "region": "Newfoundland and Labrador",
64 | "region_a": "NL",
65 | "country": "Canada",
66 | "country_a": "CAN"
67 | }
68 | ]
69 | }
70 | },
71 | {
72 | "id": 4,
73 | "status": "pass",
74 | "user": "Stephen",
75 | "description": "",
76 | "in": {
77 | "text": "Prince Edward Island",
78 | "sources": "wof"
79 | },
80 | "expected": {
81 | "properties": [
82 | {
83 | "layer": "region",
84 | "name": "Prince Edward Island",
85 | "region": "Prince Edward Island",
86 | "region_a": "PE",
87 | "country": "Canada",
88 | "country_a": "CAN"
89 | }
90 | ]
91 | }
92 | }
93 | ]
94 | }
95 |
--------------------------------------------------------------------------------
/projects/norway/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=/tmp/pelias/norway
3 |
--------------------------------------------------------------------------------
/projects/norway/README.md:
--------------------------------------------------------------------------------
1 | # Norway area
2 |
3 | This project is configured to download/prepare/build a complete Pelias installation for Norway.
4 |
5 | # Setup
6 |
7 | Please refer to the instructions at in order to install and configure your docker environment.
8 |
9 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
10 |
11 | Please ensure that's all working fine before continuing.
12 |
13 | # Run a Build
14 |
15 | To run a complete build, execute the following commands:
16 |
17 | ```bash
18 | pelias compose pull
19 | pelias elastic start
20 | pelias elastic wait
21 | pelias elastic create
22 | pelias download all
23 | pelias prepare all
24 | pelias import all
25 | pelias compose up
26 | ```
27 |
28 | # Make an Example Query
29 |
30 | You can now make queries against your new Pelias build:
31 |
32 |
33 |
--------------------------------------------------------------------------------
/projects/norway/elasticsearch.yml:
--------------------------------------------------------------------------------
1 | network.host: 0.0.0.0
2 | bootstrap.memory_lock: true
3 | indices.breaker.fielddata.limit: 85%
4 | indices.fielddata.cache.size: 75%
--------------------------------------------------------------------------------
/projects/norway/pelias.json:
--------------------------------------------------------------------------------
1 | {
2 | "logger": {
3 | "level": "debug",
4 | "timestamp": false
5 | },
6 | "esclient": {
7 | "apiVersion": "7.5",
8 | "hosts": [
9 | { "host": "elasticsearch" }
10 | ]
11 | },
12 | "elasticsearch": {
13 | "settings": {
14 | "index": {
15 | "refresh_interval": "10s",
16 | "number_of_replicas": "0",
17 | "number_of_shards": "1"
18 | }
19 | }
20 | },
21 | "api": {
22 | "services": {
23 | "pip": { "url": "http://pip:4200" },
24 | "libpostal": { "url": "http://libpostal:4400" },
25 | "placeholder": { "url": "http://placeholder:4100" },
26 | "interpolation": { "url": "http://interpolation:4300" }
27 | }
28 | },
29 | "imports": {
30 | "adminLookup": {
31 | "enabled": true
32 | },
33 | "geonames": {
34 | "datapath": "/data/geonames",
35 | "countryCode": "NO"
36 | },
37 | "openstreetmap": {
38 | "download": [
39 | { "sourceURL": "http://download.geofabrik.de/europe/norway-latest.osm.pbf" }
40 | ],
41 | "leveldbpath": "/tmp",
42 | "datapath": "/data/openstreetmap",
43 | "import": [{
44 | "filename": "norway-latest.osm.pbf"
45 | }]
46 | },
47 | "openaddresses": {
48 | "datapath": "/data/openaddresses",
49 | "files": ["no/countrywide.csv"]
50 | },
51 | "polyline": {
52 | "datapath": "/data/polylines",
53 | "files": [ "extract.0sv" ]
54 | },
55 | "whosonfirst": {
56 | "datapath": "/data/whosonfirst",
57 | "countryCode": "NO",
58 | "importPostalcodes": true,
59 | "importPlace": [ "85633341" ]
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/projects/planet/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=/tmp/pelias/data
3 | ENABLE_GEONAMES=true
4 |
--------------------------------------------------------------------------------
/projects/planet/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Full Planet Build
3 |
4 | This project is configured to download/prepare/build a complete Pelias installation for the entire planet.
5 |
6 | ### Minimum Requirements
7 | * 600GB Disk
8 | * 16GB RAM
9 | * 16+ CPU cores or a lot of patience
10 |
11 | ### Recommended requirements:
12 |
13 | * 600GB fast disk (such as NVMe SSD)
14 | * 48GB RAM
15 | * 36 CPU cores
16 |
17 | ## Time requirements
18 |
19 | With a 36 CPU machine and fast network connection, full planet builds can take as little as 16 hours.
20 |
21 | It's not recommended to run full planet builds on consumer hardware (such as a standard 8 core, 16GB RAM laptop or desktop) unless you are willing to wait up to 72 hours.
22 |
23 | ## Setup
24 |
25 | Please refer to the instructions at https://github.com/pelias/docker in order to install and configure your docker environment.
26 |
27 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
28 |
29 | Please ensure that's all working fine before continuing.
30 |
31 | ## Acceptance tests
32 |
33 | This project uses [git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) to pull in the [pelias/acceptance-test](https://github.com/pelias/acceptance-tests/) repository to allow testing full planet builds.
34 |
35 | ### Caveats
36 |
37 | A full planet build will require a street polylines file generated with Valhalla. Please see [the documentation](https://github.com/pelias/polylines/wiki/Generating-polylines-from-Valhalla) on how to perform that build.
38 |
39 | ## Run a Build
40 |
41 | To run a complete build, execute the following commands:
42 |
43 | ```bash
44 | git submodule init
45 | git submodule update
46 |
47 | pelias compose pull
48 | pelias elastic start
49 | pelias elastic wait
50 | pelias elastic create
51 | pelias download all
52 | pelias prepare all
53 | pelias import all
54 | pelias compose up
55 |
56 | pelias test run
57 | ```
58 |
59 | # Make an Example Query
60 |
61 | You can now make queries against your new Pelias build:
62 |
63 | http://localhost:4000/v1/search?text=london
64 |
--------------------------------------------------------------------------------
/projects/planet/pelias.json:
--------------------------------------------------------------------------------
1 | {
2 | "logger": {
3 | "level": "info",
4 | "timestamp": false
5 | },
6 | "esclient": {
7 | "apiVersion": "7.5",
8 | "hosts": [
9 | { "host": "elasticsearch" }
10 | ]
11 | },
12 | "elasticsearch": {
13 | "settings": {
14 | "index": {
15 | "refresh_interval": "10s",
16 | "number_of_replicas": "0",
17 | "number_of_shards": "12"
18 | }
19 | }
20 | },
21 | "acceptance-tests": {
22 | "endpoints": {
23 | "docker": "http://api:4000/v1/"
24 | }
25 | },
26 | "api": {
27 | "services": {
28 | "placeholder": { "url": "http://placeholder:4100" },
29 | "pip": { "url": "http://pip:4200" },
30 | "interpolation": { "url": "http://interpolation:4300" },
31 | "libpostal": { "url": "http://libpostal:4400" }
32 | }
33 | },
34 | "imports": {
35 | "adminLookup": {
36 | "enabled": true
37 | },
38 | "geonames": {
39 | "datapath": "/data/geonames",
40 | "countryCode": "ALL"
41 | },
42 | "openstreetmap": {
43 | "download": [
44 | { "sourceURL": "https://planet.openstreetmap.org/pbf/planet-latest.osm.pbf" }
45 | ],
46 | "leveldbpath": "/tmp",
47 | "datapath": "/data/openstreetmap",
48 | "import": [{
49 | "filename": "planet-latest.osm.pbf"
50 | }]
51 | },
52 | "openaddresses": {
53 | "datapath": "/data/openaddresses",
54 | "files": [
55 | ]
56 | },
57 | "polyline": {
58 | "datapath": "/data/polylines",
59 | "files": [ "extract.0sv" ]
60 | },
61 | "whosonfirst": {
62 | "datapath": "/data/whosonfirst",
63 | "importPostalcodes": true
64 | },
65 | "interpolation": {
66 | "download": {
67 | "tiger": {
68 | "datapath": "/data/tiger"
69 | }
70 | }
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/projects/planet/test_cases:
--------------------------------------------------------------------------------
1 | ./acceptance-tests/test_cases/
--------------------------------------------------------------------------------
/projects/poland/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=./data
3 |
--------------------------------------------------------------------------------
/projects/poland/README.md:
--------------------------------------------------------------------------------
1 | # Poland
2 |
3 | This project is configured to download/prepare/build a complete Pelias installation for Poland.
4 |
5 | # Setup
6 |
7 | Please refer to the instructions at in order to install and configure your docker environment.
8 |
9 | Given the coverage provided by OpenAddresses is somewhat sparse, it's worth examining the configuration and the OpenAddresses coverage to understand your queries.
10 |
11 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
12 |
13 | Please ensure that's all working fine before continuing.
14 |
15 | # Run a Build
16 |
17 | To run a complete build, execute the following commands:
18 |
19 | ```bash
20 | pelias compose pull
21 | pelias elastic start
22 | pelias elastic wait
23 | pelias elastic create
24 | pelias download all
25 | pelias prepare all
26 | pelias import all
27 | pelias compose up
28 | pelias test run
29 | ```
30 |
31 | # Make an Example Query
32 |
33 | You can now make queries against your new Pelias build:
34 |
35 |
36 |
--------------------------------------------------------------------------------
/projects/poland/elasticsearch.yml:
--------------------------------------------------------------------------------
1 | network.host: 0.0.0.0
2 | bootstrap.memory_lock: true
3 | indices.breaker.fielddata.limit: 85%
4 | indices.fielddata.cache.size: 75%
--------------------------------------------------------------------------------
/projects/poland/pelias.json:
--------------------------------------------------------------------------------
1 | {
2 | "logger": {
3 | "level": "debug",
4 | "timestamp": false
5 | },
6 | "esclient": {
7 | "apiVersion": "7.5",
8 | "hosts": [
9 | {
10 | "host": "elasticsearch"
11 | }
12 | ]
13 | },
14 | "elasticsearch": {
15 | "settings": {
16 | "index": {
17 | "refresh_interval": "10s",
18 | "number_of_replicas": "0",
19 | "number_of_shards": "1"
20 | }
21 | }
22 | },
23 | "acceptance-tests": {
24 | "endpoints": {
25 | "docker": "http://api:4000/v1/"
26 | }
27 | },
28 | "api": {
29 | "services": {
30 | "pip": {
31 | "url": "http://pip:4200"
32 | },
33 | "libpostal": {
34 | "url": "http://libpostal:4400"
35 | },
36 | "placeholder": {
37 | "url": "http://placeholder:4100"
38 | },
39 | "interpolation": {
40 | "url": "http://interpolation:4300"
41 | }
42 | }
43 | },
44 | "imports": {
45 | "geonames": {
46 | "datapath": "/data/geonames",
47 | "countryCode": "PL"
48 | },
49 | "openstreetmap": {
50 | "download": [
51 | {
52 | "sourceURL": "http://download.geofabrik.de/europe/poland-latest.osm.pbf"
53 | }
54 | ],
55 | "leveldbpath": "/tmp",
56 | "datapath": "/data/openstreetmap",
57 | "import": [
58 | {
59 | "filename": "poland-latest.osm.pbf"
60 | }
61 | ]
62 | },
63 | "openaddresses": {
64 | "datapath": "/data/openaddresses",
65 | "files": [
66 | "pl/dolnoslaskie.csv",
67 | "pl/kujawsko-pomorskie.csv",
68 | "pl/lodzkie.csv",
69 | "pl/lubelskie.csv",
70 | "pl/lubuskie.csv",
71 | "pl/malopolskie.csv",
72 | "pl/mazowieckie.csv",
73 | "pl/opolskie.csv",
74 | "pl/podkarpackie.csv",
75 | "pl/podlaskie.csv",
76 | "pl/pomorskie.csv",
77 | "pl/slaskie.csv",
78 | "pl/swietokrzyskie.csv",
79 | "pl/warminsko-mazurskie.csv",
80 | "pl/wielkopolskie.csv",
81 | "pl/zachodniopomorskie.csv"
82 | ]
83 | },
84 | "polyline": {
85 | "datapath": "/data/polylines",
86 | "files": [
87 | "extract.0sv"
88 | ]
89 | },
90 | "whosonfirst": {
91 | "datapath": "/data/whosonfirst",
92 | "countryCode": "PL",
93 | "importPostalcodes": false,
94 | "importPlace": [
95 | "85633723"
96 | ]
97 | }
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/projects/poland/test_cases/search_address.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "/v1/search address",
3 | "description": "addresses in Poland",
4 | "priorityThresh": 1,
5 | "normalizers": {
6 | "name": [
7 | "toUpperCase",
8 | "removeOrdinals",
9 | "stripPunctuation",
10 | "abbreviateDirectionals",
11 | "abbreviateStreetSuffixes"
12 | ]
13 | },
14 | "tests": [
15 | {
16 | "id": 1,
17 | "status": "pass",
18 | "in": {
19 | "text": "sulejówek"
20 | },
21 | "expected": {
22 | "properties": [
23 | {
24 | "name": "SULEJWEK",
25 | "locality": "Sulejówek",
26 | "country_a": "POL"
27 | }
28 | ]
29 | }
30 | }
31 | ]
32 | }
33 |
--------------------------------------------------------------------------------
/projects/portland-metro/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=/tmp/pelias/portland-metro
3 |
--------------------------------------------------------------------------------
/projects/portland-metro/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Portland Metro Area
3 |
4 | This project is configured to download/prepare/build a complete Pelias installation for Portland, Oregon.
5 |
6 | It is intended as an example for other projects, feel free to copy->paste these files to a new project directory to kick-start your own project.
7 |
8 | # Setup
9 |
10 | Please refer to the instructions at https://github.com/pelias/docker in order to install and configure your docker environment.
11 |
12 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
13 |
14 | Please ensure that's all working fine before continuing.
15 |
16 | # Run a Build
17 |
18 | To run a complete build, execute the following commands:
19 |
20 | ```bash
21 | pelias compose pull
22 | pelias elastic start
23 | pelias elastic wait
24 | pelias elastic create
25 | pelias download all
26 | pelias prepare all
27 | pelias import all
28 | pelias compose up
29 | pelias test run
30 | ```
31 |
32 | # Make an Example Query
33 |
34 | You can now make queries against your new Pelias build:
35 |
36 | http://localhost:4000/v1/search?text=pdx
37 |
--------------------------------------------------------------------------------
/projects/portland-metro/blacklist/osm.txt:
--------------------------------------------------------------------------------
1 | openstreetmap:venue:way:59581827 # remove the problematic portland airport record
2 |
--------------------------------------------------------------------------------
/projects/portland-metro/test_cases/libpostal_quirks.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "/v1/search address",
3 | "description": "addresses in Portland, OR",
4 | "priorityThresh": 1,
5 | "normalizers": {
6 | "name": [
7 | "toUpperCase",
8 | "removeOrdinals",
9 | "stripPunctuation",
10 | "abbreviateDirectionals",
11 | "abbreviateStreetSuffixes"
12 | ]
13 | },
14 | "tests": [
15 | {
16 | "id": 1,
17 | "status": "pass",
18 | "in": {
19 | "text": "4004 SW Beaverton-Hillsdale, Portland"
20 | },
21 | "issue": "https://github.com/OpenTransitTools/trimet-mod-pelias/issues/20",
22 | "description": "libpostal does not handle street directionals in some cases",
23 | "expected": {
24 | "properties": [
25 | {
26 | "name": "4004 SW Beaverton Hillsdale Hwy",
27 | "locality": "Portland",
28 | "region": "Oregon",
29 | "region_a": "OR"
30 | }
31 | ]
32 | }
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/projects/portland-metro/test_cases/search_venue.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "/v1/search venues",
3 | "priorityThresh": 1,
4 | "endpoint": "search",
5 | "tests": [
6 | {
7 | "id": 1,
8 | "status": "pass",
9 | "notes": "portland international should come up for PDX",
10 | "in": {
11 | "text": "pdx"
12 | },
13 | "expected": {
14 | "properties": [
15 | {
16 | "layer": "venue",
17 | "name": "Portland International Airport",
18 | "country_a": "USA",
19 | "country": "United States",
20 | "region": "Oregon",
21 | "region_a": "OR",
22 | "locality": "Portland"
23 | }
24 | ]
25 | }
26 | },
27 | {
28 | "id": 2,
29 | "status": "pass",
30 | "notes": "portland international should come up for PDX",
31 | "in": {
32 | "text": "pdx airport"
33 | },
34 | "expected": {
35 | "properties": [
36 | {
37 | "layer": "venue",
38 | "name": "Portland International Airport",
39 | "country_a": "USA",
40 | "country": "United States",
41 | "region": "Oregon",
42 | "region_a": "OR",
43 | "locality": "Portland"
44 | }
45 | ]
46 | }
47 | }
48 | ]
49 | }
50 |
--------------------------------------------------------------------------------
/projects/san-jose-metro/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=/tmp/pelias/san-jose-metro
3 |
--------------------------------------------------------------------------------
/projects/san-jose-metro/README.md:
--------------------------------------------------------------------------------
1 |
2 | # San José Metro Area
3 |
4 | This project is configured to download/prepare/build a complete Pelias installation for San José, California.
5 |
6 | # Setup
7 |
8 | Please refer to the instructions at https://github.com/pelias/docker in order to install and configure your docker environment.
9 |
10 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
11 |
12 | Please ensure that's all working fine before continuing.
13 |
14 | # Run a Build
15 |
16 | To run a complete build, execute the following commands:
17 |
18 | ```bash
19 | pelias compose pull
20 | pelias elastic start
21 | pelias elastic wait
22 | pelias elastic create
23 | pelias download all
24 | pelias prepare all
25 | pelias import all
26 | pelias compose up
27 | pelias test run
28 | ```
29 |
30 | # Make an Example Query
31 |
32 | You can now make queries against your new Pelias build:
33 |
34 | http://localhost:4000/v1/search?text=SJC
35 |
--------------------------------------------------------------------------------
/projects/san-jose-metro/synonyms/custom_name.txt:
--------------------------------------------------------------------------------
1 |
2 | shopping,store,shop,retail,grocery,mall
3 |
4 | north, N
5 | south, S
6 | east, E
7 | west, W
8 | north west => northwest
9 | north east => northeast
10 | south west => southwest
11 | south east => southeast
12 | northwest, NW
13 | northeast, NE
14 | southwest, SW
15 | southeast, SE
16 |
17 | Int'l, international
--------------------------------------------------------------------------------
/projects/san-jose-metro/test_cases/search_venue.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "/v1/search venues",
3 | "priorityThresh": 1,
4 | "endpoint": "search",
5 | "tests": [
6 | {
7 | "id": 1,
8 | "status": "pass",
9 | "notes": "san jose international airport should come up for SJC",
10 | "in": {
11 | "text": "sjc"
12 | },
13 | "expected": {
14 | "properties": [
15 | {
16 | "layer": "venue",
17 | "name": "San Jose International Airport",
18 | "country_a": "USA",
19 | "country": "United States",
20 | "region": "California",
21 | "region_a": "CA",
22 | "locality": "San Jose"
23 | }
24 | ]
25 | }
26 | },
27 | {
28 | "id": 2,
29 | "status": "pass",
30 | "notes": "san jose international airport should come up for SJC",
31 | "in": {
32 | "text": "sjc airport"
33 | },
34 | "expected": {
35 | "properties": [
36 | {
37 | "layer": "venue",
38 | "name": "San Jose International Airport",
39 | "country_a": "USA",
40 | "country": "United States",
41 | "region": "California",
42 | "region_a": "CA",
43 | "locality": "San Jose"
44 | }
45 | ]
46 | }
47 | }
48 | ]
49 | }
50 |
--------------------------------------------------------------------------------
/projects/singapore/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=/tmp/pelias/singapore
3 |
--------------------------------------------------------------------------------
/projects/singapore/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Singapore
3 |
4 | This project is configured to download/prepare/build a complete Pelias installation for Singapore.
5 |
6 | It is intended as an example for other projects, feel free to copy->paste these files to a new project directory to kick-start your own project.
7 |
8 | # Setup
9 |
10 | Please refer to the instructions at https://github.com/pelias/docker in order to install and configure your docker environment.
11 |
12 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
13 |
14 | Please ensure that's all working fine before continuing.
15 |
16 | # Run a Build
17 |
18 | To run a complete build, execute the following commands:
19 |
20 | ```bash
21 | pelias compose pull
22 | pelias elastic start
23 | pelias elastic wait
24 | pelias elastic create
25 | pelias download all
26 | pelias prepare all
27 | pelias import all
28 | pelias compose up
29 | pelias test run
30 | ```
31 |
32 | # Make an Example Query
33 |
34 | You can now make queries against your new Pelias build:
35 |
36 | http://localhost:4000/v1/search?text=sentosa
37 |
--------------------------------------------------------------------------------
/projects/singapore/pelias.json:
--------------------------------------------------------------------------------
1 | {
2 | "logger": {
3 | "level": "info",
4 | "timestamp": false
5 | },
6 | "esclient": {
7 | "apiVersion": "7.5",
8 | "hosts": [
9 | { "host": "elasticsearch" }
10 | ]
11 | },
12 | "elasticsearch": {
13 | "settings": {
14 | "index": {
15 | "refresh_interval": "10s",
16 | "number_of_replicas": "0",
17 | "number_of_shards": "1"
18 | }
19 | }
20 | },
21 | "acceptance-tests": {
22 | "endpoints": {
23 | "docker": "http://api:4000/v1/"
24 | }
25 | },
26 | "api": {
27 | "services": {
28 | "placeholder": { "url": "http://placeholder:4100" },
29 | "pip": { "url": "http://pip:4200" },
30 | "interpolation": { "url": "http://interpolation:4300" },
31 | "libpostal": { "url": "http://libpostal:4400" }
32 | }
33 | },
34 | "imports": {
35 | "adminLookup": {
36 | "enabled": true
37 | },
38 | "geonames": {
39 | "datapath": "/data/geonames",
40 | "countryCode": "SG"
41 | },
42 | "openstreetmap": {
43 | "download": [
44 | { "sourceURL": "http://download.geofabrik.de/asia/malaysia-singapore-brunei-latest.osm.pbf" }
45 | ],
46 | "leveldbpath": "/tmp",
47 | "datapath": "/data/openstreetmap",
48 | "import": [{
49 | "filename": "malaysia-singapore-brunei-latest.osm.pbf"
50 | }]
51 | },
52 | "openaddresses": {
53 | "datapath": "/data/openaddresses",
54 | "files": [
55 | "sg/countrywide.csv"
56 | ]
57 | },
58 | "polyline": {
59 | "datapath": "/data/polylines",
60 | "files": [ "extract.0sv" ]
61 | },
62 | "whosonfirst": {
63 | "datapath": "/data/whosonfirst",
64 | "importPostalcodes": true,
65 | "countryCode": "SG",
66 | "importPlace": [
67 | "85632605"
68 | ]
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/projects/singapore/test_cases/search_venue.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "/v1/search venues",
3 | "priorityThresh": 1,
4 | "endpoint": "search",
5 | "tests": [
6 | {
7 | "id": 1,
8 | "in": {
9 | "text": "sin airport"
10 | },
11 | "expected": {
12 | "properties": [
13 | {
14 | "layer": "venue",
15 | "name": "Changi Airport",
16 | "country_a": "SGP",
17 | "country": "Singapore",
18 | "region": "Central Singapore",
19 | "region_a": "CS",
20 | "locality": "Singapore"
21 | }
22 | ]
23 | }
24 | },
25 | {
26 | "id": 2,
27 | "in": {
28 | "text": "Changi Airport"
29 | },
30 | "expected": {
31 | "properties": [
32 | {
33 | "layer": "venue",
34 | "name": "Changi Airport",
35 | "country_a": "SGP",
36 | "country": "Singapore",
37 | "region": "Central Singapore",
38 | "region_a": "CS",
39 | "locality": "Singapore"
40 | }
41 | ]
42 | }
43 | }
44 | ]
45 | }
46 |
--------------------------------------------------------------------------------
/projects/south-africa/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias_za
2 | DATA_DIR=/tmp/pelias/pelias_za
3 |
--------------------------------------------------------------------------------
/projects/south-africa/README.md:
--------------------------------------------------------------------------------
1 |
2 | # South Africa
3 |
4 | This project is configured to download/prepare/build a complete Pelias installation for South Africa.
5 |
6 | # Setup
7 |
8 | Please refer to the instructions at https://github.com/pelias/docker in order to install and configure your docker environment.
9 |
10 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
11 |
12 | Please ensure that's all working fine before continuing.
13 |
14 | # Run a Build
15 |
16 | To run a complete build, execute the following commands:
17 |
18 | ```bash
19 | pelias compose pull
20 | pelias elastic start
21 | pelias elastic wait
22 | pelias elastic create
23 | pelias download all
24 | pelias prepare all
25 | pelias import all
26 | pelias compose up
27 | ```
28 |
29 | # Make an Example Query
30 |
31 | You can now make queries against your new Pelias build:
32 |
33 | http://localhost:4000/v1/search?text=900 park street, tshwane, south africa
34 |
--------------------------------------------------------------------------------
/projects/south-africa/pelias.json:
--------------------------------------------------------------------------------
1 | {
2 | "logger": {
3 | "level": "info",
4 | "timestamp": false
5 | },
6 | "esclient": {
7 | "apiVersion": "7.5",
8 | "hosts": [
9 | { "host": "elasticsearch" }
10 | ]
11 | },
12 | "elasticsearch": {
13 | "settings": {
14 | "index": {
15 | "refresh_interval": "10s",
16 | "number_of_replicas": "0",
17 | "number_of_shards": "3"
18 | }
19 | }
20 | },
21 | "acceptance-tests": {
22 | "endpoints": {
23 | "docker": "http://api:4000/v1/"
24 | }
25 | },
26 | "api": {
27 | "services": {
28 | "pip": { "url": "http://pip:4200" },
29 | "libpostal": { "url": "http://libpostal:4400" },
30 | "placeholder": { "url": "http://placeholder:4100" },
31 | "interpolation": { "url": "http://interpolation:4300" }
32 | }
33 | },
34 | "imports": {
35 | "adminLookup": {
36 | "enabled": true
37 | },
38 | "geonames": {
39 | "datapath": "/data/geonames",
40 | "countryCode": "ZA"
41 | },
42 | "openstreetmap": {
43 | "download": [
44 | { "sourceURL": "http://download.geofabrik.de/africa/south-africa-latest.osm.pbf" }
45 | ],
46 | "leveldbpath": "/tmp",
47 | "datapath": "/data/openstreetmap",
48 | "import": [{
49 | "filename": "south-africa-latest.osm.pbf"
50 | }]
51 | },
52 | "openaddresses": {
53 | "datapath": "/data/openaddresses",
54 | "files": [
55 | "za/ec/nelson_mandela_bay.csv",
56 | "za/gt/ekurhuleni.csv",
57 | "za/gt/tshwane.csv",
58 | "za/nl/ethekwini.csv",
59 | "za/wc/cape_town.csv"
60 | ]
61 | },
62 | "polyline": {
63 | "datapath": "/data/polylines",
64 | "files": [ "extract.0sv" ]
65 | },
66 | "whosonfirst": {
67 | "datapath": "/data/whosonfirst",
68 | "importPostalcodes": true,
69 | "countryCode": "ZA",
70 | "importPlace": [
71 | "85633813"
72 | ]
73 | },
74 | "transit": {
75 | "datapath": "/data/transit",
76 | "feeds": [
77 | ]
78 | },
79 | "interpolation": {
80 | "download": {
81 | "tiger": {
82 | "datapath": "/data/tiger",
83 | "states": [
84 | { "state_code": 41, "county_code": 67, "name": "Washington County, OR" }
85 | ]
86 | }
87 | }
88 | }
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/projects/south-africa/synonyms/custom_name.txt:
--------------------------------------------------------------------------------
1 | north, N
2 | south, S
3 | east, E
4 | west, W
5 | north west => northwest
6 | north east => northeast
7 | south west => southwest
8 | south east => southeast
9 | northwest, NW
10 | northeast, NE
11 | southwest, SW
12 | southeast, SE
13 |
--------------------------------------------------------------------------------
/projects/south-africa/synonyms/custom_street.txt:
--------------------------------------------------------------------------------
1 | first,1st
2 | second,2nd
3 | third,3rd
4 | fourth,4th
5 | fifth,5th
6 | sixth,6th
7 | seventh,7th
8 | eighth,8th
9 | nineth,9th
10 | tenth,10th
11 | eleventh,11th
12 | twelfth,12th
13 | thirteenth,13th
14 | fourteenth,14th
15 | fifteenth,15th
16 | sixteenth,16th
17 | seventeenth,17th
18 | eighteenth,18th
19 | nineteenth,19th
20 | twentyth,20th
21 | twentyfirst,21st
22 | twentysecond,22nd
23 | twentythrid,23rd
24 |
25 | # USPS Suffix Abbreviations
26 | # http://www.usps.com/ncsc/lookups/abbreviations.html#suffix
27 | st,st.,street,str
28 | ave,ave.,av,av.,avenue,AVNUE,AVENUE,AVENU
29 | dr,drive,dr.,drv,driv,drives
30 | BOULEVARD,BLVD,BOULEVARD,BOUL,BOULEVARD,BOULEVARD,BOULV
31 | BRIDGE,BRDGE,BRG
32 | BYPASS,BYP,BYPA,BYPAS,BYPS
33 | CLIFF,CLF,CLIFFS,CLFS
34 | CLUB,CLB
35 | COMMON,CMN
36 | CORNER,COR,CORNERS,CORS
37 | CENTER,CEN,CENT,CENTER,CENTR,CENTRE,CNTER,CNTR,CTR,CENTERS,CTRS
38 | CIR,CIRC,CIRCL,CIRCLE,CRCL,CIRCLE,CRCLE
39 | COURT,CRT,CT,COURTS
40 | CTSCK,CR,CREEK,CRK
41 | CROSSING,CRSSING,CRSSNG,XING
42 | CRECENT,CRES,CRESCENT,CRESENT,CRSCNT,CRSENT,CRSNT
43 | EXP,EXPR,EXPRESS,EXPRESSWAY,EXPW,EXPY
44 | FALL,FALLS,FLS
45 | FERRY,FRRY,FRY
46 | FIELD,FLD,FIELDS,FLDS
47 | FREEWAY,FREEWY,FRWAY,FRWY,FWY
48 | GARDEN,GARDN,GDN,GRDEN,GRDN,GARDENS,GDNS,GRDNS
49 | GATEWAY,GATEWY,GATWAY,GTWAY,GTWY
50 | GROV,GROVE,GRV,GROVES
51 | HARB,HARBOR,HARBR,HBR,HRBOR,HARBORS
52 | HEIGHT,HEIGHTS,HGTS,HT,HTS
53 | HIGHWAY,HIGHWY,HIWAY,HIWY,HWAY,HWY
54 | HILL,HL,HILLS,HLS
55 | IS,ISLAND,ISLND,ISLANDS,ISLNDS,ISS,ISLE,ISLES
56 | JCT,JCTION,JCTN,JUNCTION,JUNCTN,JUNCTON,JCTNS,JCTS,JUNCTIONS
57 | LAKE,LK,LAKES,LKS
58 | LANDING,LNDG,LNDNG
59 | LA,LANE,LANES,LN
60 | LOOP,LOOPS,LP
61 | MANOR,MNR,MANORS,MNRS
62 | MDW,MEADOW,MDWS,MEADOWS,MEDOWS
63 | MILL,ML,MILLS,MLS
64 | MNT,MOUNT,MT
65 | MNTAIN,MNTN,MOUNTAIN,MOUNTIN,MTIN,MTN,MNTNS,MOUNTAINS
66 | ORCH,ORCHARD,ORCHRD
67 | PARK,PK,PRK,PARKS
68 | PARKWAY,PARKWY,PKWAY,PKWY,PKY,PARKWAYS,PKWYS
69 | PLAZA,PLZ,PLZA
70 | PLACE,PL
71 | PR,PRAIRIE,PRARIE,PRR
72 | RANCH,RANCHES,RNCH,RNCHS
73 | RDG,RDGE,RIDGE,RDGS,RIDGES
74 | RIV,RIVER,RIVR,RVR
75 | RD,ROAD,RDS,ROADS
76 | RTESHLS,SHOALS
77 | SHOAR,SHORE,SHR,SHOARS,SHORES,SHRS
78 | SPG,SPNG,SPRING,SPRNG,SPGS,SPNGS,SPRINGS,SPRNGS
79 | SQ,SQR,SQRE,SQU,SQUARE,SQRS,SQUARES
80 | STA,STATION,STATN,STN
81 | STREAM,STREME,STRM
82 | ST,STR,STREET,STRT,STREETS
83 | SMT,SUMIT,SUMITT,SUMMIT
84 | TER,TERR,TERRACE
85 | TR,TRAIL,TRAILS,TRL,TRLS
86 | TUNEL,TUNL,TUNLS,TUNNEL,TUNNELS,TUNNL
87 | UN,UNION,UNIONS
88 | VALLEY,VALLY,VLLY,VLY,VALLEYS,VLYS
89 | VDCT,VIA,VIADCT,VIADUCT
90 | VIEW,VW,VIEWS,VWS
91 | VILL,VILLAG,VILLAGE,VILLG,VILLIAGE,VLG,VILLAGES,VLGS
92 | VILLE,VL
93 | VIS,VIST,VISTA,VST,VSTA
94 | WAY,WY,WAYS
95 |
96 | north, N
97 | south, S
98 | east, E
99 | west, W
100 | north west => northwest
101 | north east => northeast
102 | south west => southwest
103 | south east => southeast
104 | northwest, NW
105 | northeast, NE
106 | southwest, SW
107 | southeast, SE
108 |
--------------------------------------------------------------------------------
/projects/south-africa/test_cases/search_address.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "/v1/search address",
3 | "description": "addresses in Portland, OR",
4 | "priorityThresh": 1,
5 | "normalizers": {
6 | "name": [
7 | "toUpperCase",
8 | "removeOrdinals",
9 | "stripPunctuation",
10 | "abbreviateDirectionals",
11 | "abbreviateStreetSuffixes"
12 | ]
13 | },
14 | "tests": [
15 | {
16 | "id": 1,
17 | "status": "pass",
18 | "in": {
19 | "text": "900 park street, tshwane, south africa"
20 | },
21 | "expected": {
22 | "properties": [
23 | {
24 | "name": "900 Park Street",
25 | "locality": "Tshwane",
26 | "country_a": "ZAF"
27 | }
28 | ]
29 | }
30 | },
31 | {
32 | "id": 2,
33 | "status": "pass",
34 | "in": {
35 | "text": "200 Smit Street, Hillbrow"
36 | },
37 | "expected": {
38 | "properties": [
39 | {
40 | "match_type": "interpolated",
41 | "name": "200 Smit Street",
42 | "locality": "Hillbrow",
43 | "region": "Gauteng",
44 | "country_a": "ZAF"
45 | }
46 | ]
47 | }
48 | },
49 | {
50 | "id": 3,
51 | "status": "fail",
52 | "in": {
53 | "text": "Marshall Street, Johannesburg"
54 | },
55 | "expected": {
56 | "properties": [
57 | {
58 | "match_type": "exact",
59 | "layer": "street",
60 | "name": "Marshall Street",
61 | "locality": "Johannesburg",
62 | "region": "Gauteng",
63 | "country_a": "ZAF"
64 | }
65 | ]
66 | }
67 | },
68 | {
69 | "id": 3.1,
70 | "status": "fail",
71 | "in": {
72 | "text": "Marshall Street, Hillbrow"
73 | },
74 | "expected": {
75 | "properties": [
76 | {
77 | "match_type": "exact",
78 | "layer": "street",
79 | "name": "Marshall Street",
80 | "locality": "Hillbrow",
81 | "region": "Gauteng",
82 | "country_a": "ZAF"
83 | }
84 | ]
85 | }
86 | }
87 | ]
88 | }
89 |
--------------------------------------------------------------------------------
/projects/south-america/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=/tmp/pelias/south-america
3 |
--------------------------------------------------------------------------------
/projects/south-america/README.md:
--------------------------------------------------------------------------------
1 |
2 | # South América
3 |
4 | This project is configured to download/prepare/build a complete Pelias installation for the South América.
5 |
6 | # Setup
7 |
8 | Please refer to the instructions at https://github.com/pelias/docker in order to install and configure your docker environment.
9 |
10 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
11 |
12 | Please ensure that's all working fine before continuing.
13 |
14 | # Run a Build
15 |
16 | To run a complete build, execute the following commands:
17 |
18 | ```bash
19 | pelias compose pull
20 | pelias elastic start
21 | pelias elastic wait
22 | pelias elastic create
23 | pelias download all
24 | pelias prepare all
25 | pelias import all
26 | pelias compose up
27 | pelias test run
28 | ```
29 |
30 | # Make an Example Query
31 |
32 | You can now make queries against your new Pelias build:
33 |
34 | http://localhost:4000/v1/search?text=Flores da Cunha
35 |
--------------------------------------------------------------------------------
/projects/south-america/blacklist/osm.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pelias/docker/6f680540ecef1f5a890c2bd6cc23faeb78b367b6/projects/south-america/blacklist/osm.txt
--------------------------------------------------------------------------------
/projects/south-america/pelias.json:
--------------------------------------------------------------------------------
1 | {
2 | "logger": {
3 | "level": "info",
4 | "timestamp": false
5 | },
6 | "esclient": {
7 | "apiVersion": "7.5",
8 | "hosts": [
9 | { "host": "elasticsearch" }
10 | ]
11 | },
12 | "elasticsearch": {
13 | "settings": {
14 | "index": {
15 | "refresh_interval": "10s",
16 | "number_of_replicas": "0",
17 | "number_of_shards": "3"
18 | }
19 | }
20 | },
21 | "acceptance-tests": {
22 | "endpoints": {
23 | "docker": "http://api:4000/v1/"
24 | }
25 | },
26 | "api": {
27 | "services": {
28 | "placeholder": { "url": "http://placeholder:4100" },
29 | "pip": { "url": "http://pip:4200" },
30 | "interpolation": { "url": "http://interpolation:4300" },
31 | "libpostal": { "url": "http://libpostal:4400" }
32 | }
33 | },
34 | "imports": {
35 | "adminLookup": {
36 | "enabled": true
37 | },
38 | "geonames": {
39 | "datapath": "/data/geonames",
40 | "countryCode": "BR"
41 | },
42 | "openstreetmap": {
43 | "download": [
44 | { "sourceURL": "http://download.geofabrik.de/south-america-latest.osm.pbf" }
45 | ],
46 | "leveldbpath": "/tmp",
47 | "datapath": "/data/openstreetmap",
48 | "import": [{
49 | "filename": "south-america-latest.osm.pbf"
50 | }]
51 | },
52 | "openaddresses": {
53 | "datapath": "/data/openaddresses",
54 | "files": [
55 | "br/ac/statewide.csv",
56 | "br/al/statewide.csv",
57 | "br/am/statewide.csv",
58 | "br/ap/statewide.csv",
59 | "br/ba/statewide.csv",
60 | "br/ce/statewide.csv",
61 | "br/df/statewide.csv",
62 | "br/es/statewide.csv",
63 | "br/go/statewide.csv",
64 | "br/ma/statewide.csv",
65 | "br/mg/statewide.csv",
66 | "br/ms/statewide.csv",
67 | "br/mt/statewide.csv",
68 | "br/pa/statewide.csv",
69 | "br/pb/statewide.csv",
70 | "br/pe/statewide.csv",
71 | "br/pi/statewide.csv",
72 | "br/pr/statewide.csv",
73 | "br/rj/statewide.csv",
74 | "br/rn/statewide.csv",
75 | "br/ro/statewide.csv",
76 | "br/rr/statewide.csv",
77 | "br/rs/statewide.csv",
78 | "br/sc/statewide.csv",
79 | "br/se/statewide.csv",
80 | "br/sp/statewide.csv",
81 | "br/to/statewide.csv",
82 | "ar/c/city_of_buenos_aires.csv",
83 | "cl/countrywide.csv",
84 | "uy/countrywide.csv",
85 | "uy/mo/montevideo.csv",
86 | "co/ant/medellin.csv",
87 | "co/bogota.csv"
88 | ]
89 | },
90 | "polyline": {
91 | "datapath": "/data/polylines",
92 | "files": [ "extract.0sv" ]
93 | },
94 | "whosonfirst": {
95 | "datapath": "/data/whosonfirst",
96 | "importPostalcodes": true,
97 | "countryCode": [ "AR", "BO", "BR", "CL", "GF", "EC", "GY", "PY", "PE", "SR", "UY", "VE" ],
98 | "importPlace": [
99 | "102191577"
100 | ]
101 | }
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/projects/texas/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=pelias
2 | DATA_DIR=/tmp/pelias/texas
3 | OPENADDRESSES_PARALLELISM=2
4 |
--------------------------------------------------------------------------------
/projects/texas/README.md:
--------------------------------------------------------------------------------
1 | # Texas
2 |
3 | This project is configured to download/prepare/build a complete Pelias installation for the state of Texas, USA.
4 |
5 | It is intended as an example for other projects, feel free to copy->paste these files to a new project directory to kick-start your own project.
6 |
7 | # Setup
8 |
9 | Please refer to the instructions at https://github.com/pelias/docker in order to install and configure your docker environment.
10 |
11 | The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment).
12 |
13 | Please ensure that's all working fine before continuing.
14 |
15 | # Run a Build
16 |
17 | To run a complete build, execute the following commands:
18 |
19 | ```bash
20 | pelias compose pull
21 | pelias elastic start
22 | pelias elastic wait
23 | pelias elastic create
24 | pelias download all
25 | pelias prepare all
26 | pelias import all
27 | pelias compose up
28 | pelias test run
29 | ```
30 |
31 | # Make an Example Query
32 |
33 | You can now make queries against your new Pelias build:
34 |
35 | http://localhost:4000/v1/search?text=iah
36 |
--------------------------------------------------------------------------------
/projects/texas/blacklist/osm.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pelias/docker/6f680540ecef1f5a890c2bd6cc23faeb78b367b6/projects/texas/blacklist/osm.txt
--------------------------------------------------------------------------------
/projects/texas/test_cases/libpostal_quirks.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "/v1/search address",
3 | "description": "addresses in Portland, OR",
4 | "priorityThresh": 1,
5 | "normalizers": {
6 | "name": [
7 | "toUpperCase",
8 | "removeOrdinals",
9 | "stripPunctuation",
10 | "abbreviateDirectionals",
11 | "abbreviateStreetSuffixes"
12 | ]
13 | },
14 | "tests": [
15 | {
16 | "id": 1,
17 | "status": "pass",
18 | "in": {
19 | "text": "4004 SW Beaverton-Hillsdale, Portland"
20 | },
21 | "issue": "https://github.com/OpenTransitTools/trimet-mod-pelias/issues/20",
22 | "description": "libpostal does not handle street directionals in some cases",
23 | "expected": {
24 | "properties": [
25 | {
26 | "name": "4004 SW Beaverton Hillsdale Hwy",
27 | "locality": "Portland",
28 | "region": "Oregon",
29 | "region_a": "OR"
30 | }
31 | ]
32 | }
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/projects/texas/test_cases/search_venue.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "/v1/search venues",
3 | "priorityThresh": 1,
4 | "endpoint": "search",
5 | "tests": [
6 | {
7 | "id": 1,
8 | "status": "fail",
9 | "notes": "portland international should come up for PDX",
10 | "in": {
11 | "text": "pdx"
12 | },
13 | "expected": {
14 | "properties": [
15 | {
16 | "layer": "venue",
17 | "name": "Portland International Airport",
18 | "country_a": "USA",
19 | "country": "United States",
20 | "region": "Oregon",
21 | "region_a": "OR",
22 | "locality": "Portland"
23 | }
24 | ]
25 | }
26 | },
27 | {
28 | "id": 2,
29 | "status": "fail",
30 | "notes": "portland international should come up for PDX",
31 | "in": {
32 | "text": "pdx airport"
33 | },
34 | "expected": {
35 | "properties": [
36 | {
37 | "layer": "venue",
38 | "name": "Portland International Airport",
39 | "country_a": "USA",
40 | "country": "United States",
41 | "region": "Oregon",
42 | "region_a": "OR",
43 | "locality": "Portland"
44 | }
45 | ]
46 | }
47 | }
48 | ]
49 | }
50 |
--------------------------------------------------------------------------------