Sarah Hoffmann
0ecb920866
immediately drop searches where requested country code does not match
2017-08-19 19:37:05 +02:00
Sarah Hoffmann
563099f7fa
take address part into account in postcode search
2017-08-19 19:37:05 +02:00
Sarah Hoffmann
57dc0304b5
add search for postcode
...
Implements the 'postcode' operator.
2017-08-19 19:37:05 +02:00
Sarah Hoffmann
872e73314e
move postcodes into special operation for Searches
...
Introduces postcode field in searches and sorts out any marked
postcodes.
2017-08-19 19:37:05 +02:00
Sarah Hoffmann
c13094acfd
limit number of considered places in POI queries
...
When searching for POIs in place_classtype_ tables limit the number
of objects considered to 300. The distinct and order by clauses
forced until now to retrive all matching objects and order them
first which can cause long running queries when retriving them
for large areas like the US.
Fixes #735 .
2017-06-05 22:40:42 +02:00
Sarah Hoffmann
54393addd3
disregard special phrases that do not match fully
...
Compare the normalized terms imported with the special
terms script with the normalized version of the query string.
Disregard them if they cannot be found. This avoids a significant
number of mismatches due to transliteration issues.
The match will only be done when a normalized word has been set
making this change backwards compatible with older databases.
2017-06-04 23:12:09 +02:00
Sarah Hoffmann
c8e79397f5
introduce address column for place tables
...
The column is a hstore containing the full OSM tag with key and
value.
2017-04-08 18:58:26 +02:00
Sarah Hoffmann
09f1661638
move moreURL computation into Geocode and include all params
...
Fixes #678 .
2017-03-23 00:16:58 +01:00
Sarah Hoffmann
e841422b1f
remove unused code
2017-03-22 23:02:19 +01:00
Sarah Hoffmann
57b35654e7
fix style
2017-03-17 22:36:22 +01:00
Sarah Hoffmann
ab3b556144
use NearPoint class in Search array
2017-03-16 22:04:30 +01:00
Sarah Hoffmann
41fce277cd
make NearPoint its own class
2017-03-15 23:47:35 +01:00
Sarah Hoffmann
450a12c6be
include housenumbers and postcodes when rechecking for exact matches
2017-02-28 21:40:05 +01:00
Sarah Hoffmann
c48fb88e6b
move interpolaton computation into indexing step
...
The interpolaton computation needs information from the osm2pgsql
slim tables which may not be available when the data is inserted.
Insertion now only adds a line with basic address information to
location_property_osmline. The line is then split during the
indexing, leading to more lines (which are complete in that case)
being inserted.
Fixes #598 .
2017-02-26 16:46:41 +01:00
Marc Tobias Metten
adb6ea546f
sMoreURL now includes countrycodes values
2016-12-22 02:06:08 +01:00
Sarah Hoffmann
cfb0f3f94c
Merge pull request #548 from lonvia/query-ckeck-utf8
...
check if query is valid unicode string
2016-11-02 19:21:29 +01:00
marc tobias
d93209ee48
Tiger: set osmtype=way and correct osm_id
2016-11-01 23:34:29 +01:00
marc tobias
eb79e655e6
cleanup of SQL for readability. No logic change
2016-11-01 23:33:47 +01:00
marc tobias
4f3074e538
cleanup of SQL for readability. No logic change
2016-11-01 23:33:47 +01:00
Sarah Hoffmann
1542a006cb
Merge pull request #550 from lonvia/decrease-line-length
...
Reduce maximum line length to 199
2016-10-16 09:55:13 +02:00
Sarah Hoffmann
8650e0fedd
slightly relax viewbox parameter check
...
Allow out of bounds parameters as long as the resulting box
covers some legal coodinates.
2016-10-13 08:03:28 +02:00
Sarah Hoffmann
abac5d8ebd
split long lines in Geocode.php
2016-10-13 00:27:17 +02:00
Sarah Hoffmann
e69115fd8f
remove debug output
2016-10-12 22:27:46 +02:00
Sarah Hoffmann
7b1f35426d
check if query is valid unicode string
2016-10-12 22:25:04 +02:00
Sarah Hoffmann
6757e1b865
properly check format of viewbox parameter
2016-10-12 22:13:07 +02:00
Sarah Hoffmann
c72e6a93dc
fix typo in error message
2016-10-12 20:21:12 +02:00
Sarah Hoffmann
fb51d51582
fix syntax error for route boxes
2016-10-09 21:41:23 +02:00
Sarah Hoffmann
f5641037cf
avoid passing temporary array by reference
...
PHP7 complains: Only variables should be passed by reference.
2016-10-09 21:14:59 +02:00
Sarah Hoffmann
42d473968f
check for correct array for country codes
...
fixes trac ticket 5427
2016-10-04 20:32:22 +02:00
Sarah Hoffmann
8b896f37f3
fill interpolation array for reverse lookups via search endpoint
...
Fixes #540
2016-10-01 13:03:31 +02:00
Sarah Hoffmann
6bf90eb22f
fix namespace use
2016-09-30 22:43:11 +02:00
Marc Tobias Metten
6238ae6032
add namespaces, method visibility according to PSR2 standard
2016-09-16 02:27:36 +02:00
Marc Tobias Metten
4a321487f3
fix indentation and misc errors according to PSR2 coding style guide
2016-09-14 03:16:46 +02:00
Marc Tobias Metten
2a784fa3d4
fix function declaration errors according to PSR2 coding style guide
2016-09-11 05:22:51 +02:00
marc tobias
3887423381
fix array-related errors according to PSR2 coding style guide
2016-09-10 21:10:52 +02:00
marc tobias
f05ea577f4
bracket spacing for if/else/for/foreach/while/switch according to PSR2 standard
2016-09-08 02:16:22 +01:00
Marc Tobias Metten
832547f192
tabs-to-spaces
2016-09-04 03:19:48 +02:00
Sarah Hoffmann
5464dec057
factor out parameter parsing into its own class
...
Allows to use the parsing functions in website/search.php and
utils/query.php as well.
2016-08-20 13:43:50 +02:00
Sarah Hoffmann
0a95bdc5f5
remove unused functions in Geocode
2016-07-26 23:10:50 +02:00
Sarah Hoffmann
d594bb238b
cleanup interface of PlaceLookup
...
Move lookup parameters (place id, type, frac etc.) from members
to parameters for lookup().
2016-07-26 20:54:14 +02:00
Sarah Hoffmann
1b33999f10
refactor ReverseGeocode
...
- remove unused functions and members
- move coordinates from being members to being parameters of lookup()
2016-07-26 20:54:14 +02:00
Sarah Hoffmann
a766240c06
remove duplicate reverse geocoding code
...
Geocode now uses ReverseGeocode directly. Note that it currently
cannot support any interpolations, neither OSM nor Tiger. But
neither did the previous version.
2016-07-24 23:58:39 +02:00
Sarah Hoffmann
665de339e5
allow coordinates in query only with name or classtype
...
Coordinates with country or housenumber only do not make much
sense. Currently these combination result in queries that
require a sequential scan of search_name and normally time
out before yielding any results.
fixes #462
2016-06-15 22:41:48 +02:00
Sarah Hoffmann
348a3082c9
fix syntax errors and update tests
...
Some of the tests with bad parameters now return a HTTP 400.
2016-06-12 22:51:13 +02:00
Sarah Hoffmann
033b9590bd
use chksql everywhere in lib/
...
Replaces manual PEAR error checks and adds the chksql wrapper
where the error checks were still missing.
2016-06-12 14:58:05 +02:00
markigail
98e5ba6b61
use place_id instead of parent_place_id for excluded place_ids in interpolation lines query
2016-06-04 23:54:17 +02:00
markigail
190a72cab5
Fix bug in index.c and remove column admin_level from location_property_osmline.
2016-05-08 16:46:42 +02:00
Markus Gail
2ba9c11dd0
fix bug in Geocode.php
2016-04-29 10:24:30 +02:00
Markus Gail
db719d489f
index on geometry of interpolation lines, and more improvements.
2016-04-27 17:42:59 +02:00
Markus Gail
a10f537131
Correct merge error in Geocode.php.
2016-04-25 17:44:34 +02:00