Skip to content

Commit 5667d2c

Browse files
committed
feat: 54-location-query-reverse-search-lat-lon-to-location
1 parent 8a066ee commit 5667d2c

19 files changed

Lines changed: 15879 additions & 32569 deletions

File tree

config/default.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"db": {
3636
"elastic": {
3737
"control": {
38-
"node": "http://control_elastic:9200",
38+
"node": "http://localhost:9200",
3939
"auth": {
4040
"username": "elastic",
4141
"password": "changeme"
@@ -44,7 +44,7 @@
4444
"index": "control_index"
4545
},
4646
"geotext": {
47-
"node": "http://geotext_elastic:9200",
47+
"node": "http://localhost:9200",
4848
"auth": {
4949
"username": "elastic",
5050
"password": "changeme"
@@ -59,9 +59,9 @@
5959
}
6060
},
6161
"s3": {
62-
"endpoint": "http://s3:9000",
63-
"accessKeyId": "accessKeyId",
64-
"secretAccessKey": "secretAccessKey",
62+
"endpoint": "http://localhost:9000",
63+
"accessKeyId": "myappuser",
64+
"secretAccessKey": "myappsecret",
6565
"forcePathStyle": true,
6666
"region": "local",
6767
"bucket": "geocoding",
@@ -85,7 +85,7 @@
8585
"application": {
8686
"site": "local",
8787
"services": {
88-
"tokenTypesUrl": "http://NLP_ANALYSES"
88+
"tokenTypesUrl": "http://localhost:5000"
8989
},
9090
"cronLoadTileLatLonDataPattern": "0 * * * *",
9191
"elasticQueryBoosts": {

openapi3.yaml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,98 @@ paths:
154154
$ref: '#/components/responses/Forbidden'
155155
'500':
156156
$ref: '#/components/responses/InternalError'
157+
/search/location/coordinates:
158+
get:
159+
operationId: locationGetCoordinates
160+
summary: Reverse search a location by WGS84 coordinates
161+
description: >-
162+
Reverse-search for geo-data. Send WGS84 coordinates and get what's there. It serves data from multiple diverse mapcolonies
163+
vector sources and partners.
164+
tags:
165+
- Location Name Based Search
166+
parameters:
167+
- $ref: '#/components/parameters/token'
168+
- $ref: '#/components/parameters/xApiKey'
169+
- name: lat
170+
in: query
171+
description: Latitude of the coordinate
172+
schema:
173+
type: number
174+
minimum: -90
175+
maximum: 90
176+
required: true
177+
- name: lon
178+
in: query
179+
description: Longitude of the coordinate
180+
schema:
181+
type: number
182+
minimum: -180
183+
maximum: 180
184+
required: true
185+
- name: source
186+
in: query
187+
required: false
188+
schema:
189+
type: array
190+
items:
191+
$ref: '#/components/schemas/Source'
192+
title: Source
193+
description: |
194+
Sources to include (if not specified, all sources will be queried)
195+
- name: relation
196+
in: query
197+
required: false
198+
schema:
199+
type: string
200+
enum: [intersects, disjoint, contains]
201+
default: intersects
202+
description: |
203+
The spatial relationship between the query point and the indexed shapes
204+
- $ref: '#/components/parameters/limit'
205+
responses:
206+
'200':
207+
description: OK
208+
x-request-id:
209+
schema:
210+
type: string
211+
minLength: 1
212+
maxLength: 36
213+
content:
214+
application/json:
215+
schema:
216+
allOf:
217+
- $ref: '#/components/schemas/genericGeocodingResponse'
218+
- type: object
219+
required:
220+
- type
221+
- features
222+
properties:
223+
type:
224+
type: string
225+
enum:
226+
- FeatureCollection
227+
features:
228+
type: array
229+
items:
230+
type: object
231+
properties:
232+
geometry:
233+
$ref: '#/components/schemas/GeometryObjectSchema'
234+
properties:
235+
type: object
236+
properties:
237+
placetype:
238+
type: string
239+
sub_placetype:
240+
type: string
241+
'400':
242+
$ref: '#/components/responses/BadRequest'
243+
'401':
244+
$ref: '#/components/responses/Unauthorized'
245+
'403':
246+
$ref: '#/components/responses/Forbidden'
247+
'500':
248+
$ref: '#/components/responses/InternalError'
157249
/search/location/regions:
158250
get:
159251
operationId: locationGetRegions
@@ -1041,6 +1133,14 @@ components:
10411133
type: array
10421134
items:
10431135
$ref: '#/components/schemas/Point3D'
1136+
GeometryObjectSchema:
1137+
oneOf:
1138+
- $ref: '#/components/schemas/Point'
1139+
- $ref: '#/components/schemas/LineString'
1140+
- $ref: '#/components/schemas/Polygon'
1141+
- $ref: '#/components/schemas/MultiPoint'
1142+
- $ref: '#/components/schemas/MultiLineString'
1143+
- $ref: '#/components/schemas/MultiPolygon'
10441144
Source:
10451145
type: string
10461146
title: Source

0 commit comments

Comments
 (0)