You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Submit a new issue only if you are sure it is a missing feature or a bug. Otherwise please discuss the topic in the [mailing list](https://lists.openstreetmap.org/listinfo/photon) first.
2
+
3
+
## We love pull requests. Here's a quick guide:
4
+
5
+
1.[Fork the repo](https://help.github.com/articles/fork-a-repo) and create a branch for your new feature or bug fix.
6
+
7
+
2. Run the tests. We only take pull requests with passing tests: `mvn clean test`
8
+
9
+
3. Add at least one test for your change. Only refactoring and documentation changes
10
+
require no new tests. Also make sure you submit a change specific to exactly one issue. If you have ideas for multiple
11
+
changes please create separate pull requests.
12
+
13
+
4. Make the test(s) pass.
14
+
15
+
5. Push to your fork and [submit a pull request](https://help.github.com/articles/using-pull-requests). A button should
16
+
appear on your fork its github page afterwards.
17
+
18
+
## Code formatting
19
+
20
+
We use IntelliJ defaults and a very similar configuration for NetBeans defined in the root pom.xml. For eclipse there is this [configuration](https://github.com/graphhopper/graphhopper/files/481920/GraphHopper.Formatter.zip). Also for other IDEs
21
+
it should be simple to match:
22
+
23
+
* Java indent is 4 spaces
24
+
* Line width is 100 characters
25
+
* The rest is left to Java coding standards but disable "auto-format on save" to prevent unnecessary format changes.
26
+
* Currently we do not care about import section that much, avoid changing it
27
+
* Unix line endings (should be handled via git)
28
+
29
+
And in case we didn't emphasize it enough: we love tests!
download search index (31G gb compressed, 56.3 gb uncompressed, worldwide coverage, languages: English, German, French and Italian). The search index is updated weekly and thankfully provided by [graphhopper](https://graphhopper.com/) with the support of [lonvia](https://github.com/lonvia).
33
+
Download the search index (53G gb compressed, worldwide coverage, languages: English, German, French and Italian). The search index is updated weekly and thankfully provided by [GraphHopper](https://www.graphhopper.com/) with the support of [lonvia](https://github.com/lonvia).
33
34
34
35
Make sure you have bzip2 or pbzip2 installed and execute one of these two commands in your shell. This will download, uncompress and extract the huge database in one step:
# you can significantly speed up extracting using pbzip2 (recommended):
39
40
wget -O - http://download1.graphhopper.com/public/photon-db-latest.tar.bz2 | pbzip2 -cd | tar x
40
41
```
41
-
42
-
start photon
43
-
```bash
44
-
java -jar photon-0.2.7.jar
45
-
```
46
42
47
-
Check the URL `http://localhost:2322/api?q=berlin` to see if photon is running without problems. You may want to use our [leaflet plugin](https://github.com/komoot/leaflet.photon) to see the results on a map.
43
+
To use an older version of ElasticSearch please download the data from [here](http://download1.graphhopper.com/public/photon-ES-17-db-171019.tar.bz2) (Nov 2017) via wget as described above and use version [0.2.7 of photon](http://photon.komoot.de/data/photon-0.2.7.jar) (Oct 2016).
48
44
49
-
discover more of photon's feature with its usage `java -jar photon-0.2.7.jar -h`.
45
+
Check the URL `http://localhost:2322/api?q=berlin` to see if photon is running without problems. You may want to use our [leaflet plugin](https://github.com/komoot/leaflet.photon) to see the results on a map.
50
46
47
+
discover more of photon's feature with its usage `java -jar photon-*.jar -h`.
51
48
52
49
53
50
### Customized Search Data
54
51
If you need search data in other languages or restricted to a country you will need to create your search data by your own.
55
-
Once you have your [nominatim](https://github.com/twain47/Nominatim) database ready, you can import the data to photon:
52
+
Once you have your [nominatim](https://github.com/twain47/Nominatim) database ready, you can import the data to photon.
56
53
54
+
If you haven't already set a password for your nominatim database user, do it now (change user name and password as you like, below):
55
+
56
+
```bash
57
+
su postgres
58
+
psql
59
+
ALTER USER nominatim WITH ENCRYPTED PASSWORD 'mysecretpassword';
0 commit comments