Skip to content

Commit 4acd11a

Browse files
authored
feat(docs): update README (#131)
1 parent 98c0b6b commit 4acd11a

File tree

1 file changed

+103
-0
lines changed

1 file changed

+103
-0
lines changed

README.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,106 @@
1+
<p align="center">
2+
<img height="100" src="https://raw.githubusercontent.com/pelias/design/master/logo/pelias_github/Github_markdown_hero.png">
3+
</p>
4+
<h3 align="center">A modular, open-source search engine for our world.</h3>
5+
<p align="center">Pelias is a geocoder powered completely by open data, available freely to everyone.</p>
6+
<p align="center">
7+
<a href="https://github.com/pelias/api/actions"><img src="https://github.com/pelias/api/workflows/Continuous%20Integration/badge.svg" /></a>
8+
<a href="https://en.wikipedia.org/wiki/MIT_License"><img src="https://img.shields.io/github/license/pelias/api?style=flat&color=orange" /></a>
9+
<a href="https://hub.docker.com/u/pelias"><img src="https://img.shields.io/docker/pulls/pelias/api?style=flat&color=informational" /></a>
10+
<a href="https://gitter.im/pelias/pelias"><img src="https://img.shields.io/gitter/room/pelias/pelias?style=flat&color=yellow" /></a>
11+
</p>
12+
<p align="center">
13+
<a href="https://github.com/pelias/docker">Local Installation</a> ·
14+
<a href="https://geocode.earth">Cloud Webservice</a> ·
15+
<a href="https://github.com/pelias/documentation">Documentation</a> ·
16+
<a href="https://gitter.im/pelias/pelias">Community Chat</a>
17+
</p>
18+
<details open>
19+
<summary>What is Pelias?</summary>
20+
<br />
21+
Pelias is a search engine for places worldwide, powered by open data. It turns addresses and place names into geographic coordinates, and turns geographic coordinates into places and addresses. With Pelias, you’re able to turn your users’ place searches into actionable geodata and transform your geodata into real places.
22+
<br /><br />
23+
We think open data, open source, and open strategy win over proprietary solutions at any part of the stack and we want to ensure the services we offer are in line with that vision. We believe that an open geocoder improves over the long-term only if the community can incorporate truly representative local knowledge.
24+
</details>
25+
26+
# Pelias Spatial Service
27+
28+
Lightweight spatial service used by Pelias — provides point-in-polygon (PIP) lookups, geometry, relationships and ontology data via a small HTTP API and demo pages.
29+
30+
## HTTP endpoints
31+
32+
All endpoints are GET endpoints unless noted. See `server/routes/*` for parameter details and exact output shape.
33+
34+
- GET `/place/:source/:id`
35+
Return place metadata by source and id.
36+
37+
- GET `/place/:source/:id/geometry`
38+
Return all geometry roles for the place.
39+
40+
- GET `/place/:source/:id/geometry/:role`
41+
Return geometry for a specific role (e.g. `intersection`, `shape`, etc.).
42+
43+
- GET `/place/:source/:id/relationship/intersects`
44+
Return places that intersect the given place.
45+
46+
- GET `/place/:source/:id/relationship/contains`
47+
Return places that contain the given place.
48+
49+
- GET `/place/:source/:id/relationship/within`
50+
Return places within the given place.
51+
52+
- GET `/place/:source/:id/property`
53+
Return properties for the place.
54+
55+
- GET `/place/:source/:id/name`
56+
Return names for the place.
57+
58+
- GET `/place/:source/:id/hierarchy`
59+
Return the administrative hierarchy for the place.
60+
61+
- GET `/query/pip`
62+
Point-in-polygon lookup (compact view). Query parameters are handled by the pip route implementation in server/routes/pip.js.
63+
64+
- GET `/query/pip/verbose`
65+
Point-in-polygon lookup (verbose view), returns detailed match records.
66+
67+
- GET `/query/pip/_view/pelias/:lon/:lat`
68+
Pelias-compatible PIP view (legacy Pelias format).
69+
- Path params: lon, lat
70+
- Query params: `layers` (comma-separated list) is supported by the Pelias view implementation and filters the output layers. See server/routes/pip_pelias.js for details.
71+
72+
- GET `/query/search`
73+
General spatial search endpoint (see server/routes/search.js for supported query parameters).
74+
75+
- GET `/ontology`
76+
Return top-level ontology index.
77+
78+
- GET `/ontology/:class`
79+
Return ontology entries for a class.
80+
81+
- GET `/ontology/:class/:type`
82+
Return ontology entries for a class/type pair.
83+
84+
Demo pages and utilities:
85+
- GET `/explore` (static demo UI at server/demo)
86+
- GET `/explore/place/:source/:id `
87+
- GET `/explore/pip`
88+
- GET `/explore/ontology`
89+
- GET `/explore/ontology/:class/:type`
90+
91+
Root:
92+
- GET `/` redirects to `/explore/pip`
93+
94+
## Examples
95+
96+
Pelias PIP view (Pelias-compatible response):
97+
98+
curl -s "http://localhost:3000/query/pip/_view/pelias/170.97/-45.09?layers=locality,region"
99+
100+
Simple place lookup:
101+
102+
curl -s "http://localhost:3000/place/whosonfirst/85633345"
103+
1104
# Docker Development
2105

3106
```bash

0 commit comments

Comments
 (0)