Sarah Hoffmann
2c24ba6d2d
add deployment documentation for Python frontend
2023-08-27 21:27:16 +02:00
Sarah Hoffmann
386b4c82da
preliminary library reference finished
2023-08-25 21:40:20 +02:00
Sarah Hoffmann
d42e2e391f
avoid forwarding variables via SQL
2023-07-14 15:27:16 +02:00
Sarah Hoffmann
e67355ab0e
make get_addressdata calls cachable
...
VALUEs() is not a cachable construct in SQLAlchemy, so use arrays
instead. Also add a special case for single results, the usual result
for reverse queries.
2023-07-06 12:16:57 +02:00
Sarah Hoffmann
6c4c9ec1f2
switch reverse() to new Geometry datatype
...
Also switches to using bind parameters for recurring parameters.
2023-07-01 18:03:07 +02:00
Sarah Hoffmann
371a780ef4
add server fronting for search endpoint
...
This also implements some of the quirks of free-text search of the
V1 API, in particular, search for categories and coordinates.
2023-05-26 11:40:45 +02:00
Sarah Hoffmann
b48cda7173
mingle names from linked places into results
2023-05-24 23:17:15 +02:00
Sarah Hoffmann
f335e78d1e
make localisation of results explicit
...
Localisation was previously done as part of the formatting but might
also be useful on its own when working with the results directly.
2023-05-24 18:12:34 +02:00
Sarah Hoffmann
dcfb228c9a
add API functions for search functions
...
Search is now split into three functions: for free-text search,
for structured search and for search by category. Note that the
free-text search does not have as many hidden features like
coordinate search. Use the search parameters for that.
2023-05-24 18:05:43 +02:00
Sarah Hoffmann
dc99bbb0af
implement actual database searches
2023-05-24 13:52:31 +02:00
Sarah Hoffmann
d8240f9ee4
add query analyser for legacy tokenizer
2023-05-22 11:07:14 +02:00
Sarah Hoffmann
4607c7ed04
python lookup: add function for simple lookups
2023-04-03 14:40:41 +02:00
Sarah Hoffmann
86b43dc605
make sure PHP and Python reverse code does the same
...
The only allowable difference is precision of coordinates. Python uses
a precision of 7 digits where possible, which corresponds to the
precision of OSM data.
Also fixes some smaller bugs found by the BDD tests.
2023-03-26 16:21:43 +02:00
Sarah Hoffmann
35b52c4656
add output formatters for ReverseResults
...
These formatters are written in a way that they can be reused for
search results later.
2023-03-25 15:45:03 +01:00
Sarah Hoffmann
2f54732500
python: implement reverse lookup function
...
The implementation follows for most part the PHP code but introduces an
additional layer parameter with which the kind of places to be returned
can be restricted. This replaces the hard-coded exclusion lists.
2023-03-23 22:38:37 +01:00
Sarah Hoffmann
41da298b18
add python implementation of reverse
...
This adds an additional layer parameter and slightly changes the
queries to do more efficient lookups for large area features.
2023-03-23 10:16:50 +01:00
Sarah Hoffmann
00e3a752c9
split SearchResult type
...
Use adapted types for the different result types. This makes it
easier to have adapted output formatting and means there are only
result fields that are filled.
2023-03-23 10:16:50 +01:00
Sarah Hoffmann
ee0c5e24bb
add a WKB decoder for the Point class
...
This allows to return point geometries from the database and makes
the SQL a bit simpler.
2023-02-16 17:29:56 +01:00
Sarah Hoffmann
24e7ffb289
add HTML-formatted debug output to lookup
2023-02-14 11:57:37 +01:00
Sarah Hoffmann
42c3754dcd
add tests for details result formatting and trim results
...
Values that are None are no longer included in the output to save
a bit of bandwidth.
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
1924beeb20
add lookup of postcdoe data
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
70f6f9a711
add lookup of tiger data
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
f1ceefe9a6
add lookup of address interpolations
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
e1fc1566f3
fix new linting issues from pylint 2.16
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
189f74a40d
add unit tests for lookup function
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
df65c10360
add lookup() call to the library API
...
Currently only looks places up in placex.
2023-02-04 21:22:22 +01:00