marc tobias
853b536394
Remove get_addressrank_label. Move get_searchrank_label to PHP
2019-02-09 20:38:36 +01:00
Sarah Hoffmann
e080bdff0f
Don't escape slashes in json output
...
Fixes #1256 .
2018-12-04 22:28:29 +01:00
marc tobias
e4a51e460e
set exception handler by request format, not always HTML
2018-10-03 22:58:20 +02:00
Sarah Hoffmann
b17019a21c
fix unit tests for class types
2018-07-12 23:59:29 +02:00
Sarah Hoffmann
25baaf530d
unify address details lookup
...
Introduces new AddressDetails class which is responsible
for address lookups. Saves always the complete result
and then allows filtering throught the different access
function. Remove special handling in Geocode() and use
there the lookup throught PlaceLookup() as well.
2018-07-10 23:54:35 +02:00
Sarah Hoffmann
320d488627
move ClassTypes into own namespace
...
Also adds some convenience functions for lookups.
2018-07-09 23:20:46 +02:00
Sarah Hoffmann
f29c7bf910
introduce classes for token list and token types
2018-05-14 23:04:15 +02:00
marc tobias
27bc8d4f7b
replace PHP sizeof() with either count() or empty()
2018-03-22 12:36:24 +01:00
marc tobias
5042be1b72
parsing coordinates allows second with floats
2018-02-08 17:45:43 +01:00
Sarah Hoffmann
6c1977b448
replace double-quoting with single quotes where applicable
2017-10-26 21:40:33 +02:00
Sarah Hoffmann
1424e8e29b
use Result class in reverse geocoding
...
Also simplifies the reverse algorithm slightly by no longer
having an additional distance lookup.
2017-10-23 23:30:53 +02:00
Sarah Hoffmann
023f94b066
convert phrase array to class
2017-10-12 22:37:44 +02:00
Sarah Hoffmann
30511fd3ab
replace NearPoint with a more generic context object
...
The NearPoint is actually common to all SearchDescriptions
and there is other context data as well. like viewbox, that
needs to be available to the search object but is common.
2017-10-08 21:23:31 +02:00
Sarah Hoffmann
fd08d41962
move Search dump function into SearchDescription class
2017-10-08 16:05:27 +02:00
Sarah Hoffmann
75e35f3832
fix syntax errors from introduction of SearchDescription
2017-10-08 15:26:14 +02:00
Sarah Hoffmann
1220ff5da6
use correct source for radius column in debug view
2017-10-04 20:14:35 +02:00
Sarah Hoffmann
f2c15b73ad
skip output of lat/lon in debug when no near point given
2017-09-30 12:24:37 +02:00
Sarah Hoffmann
ce95c55d65
fix display of nearpoint in debug view
2017-09-18 23:06:30 +02:00
Sarah Hoffmann
5b4bbab9be
include GB CodePoint data into location_postcode table
2017-08-19 19:37:06 +02:00
Sarah Hoffmann
57dc0304b5
add search for postcode
...
Implements the 'postcode' operator.
2017-08-19 19:37:05 +02:00
Sarah Hoffmann
4e6c75040e
Guard against network failures in getDatabaseDate()
...
When updating use the date from the diff file instead
as we are guaranteed to get this if the file has been
successfully loaded.
2017-06-09 21:49:31 +02:00
Sarah Hoffmann
d88c484fa1
remove PHP version check
...
5.4 is the minimum supported version now.
2017-06-01 20:10:10 +02:00
big-o
bdd90e890b
Parameter to enable JSON pretty-printing
2017-06-01 20:10:10 +02:00
Sarah Hoffmann
bd4b1b2d08
switch from osmosis to pyosmium for updates
...
Pyosmium comes with convenient functions for finding the
right state and does not require external files for
rembering the state. Updates can now conveniently
set up by simply running ./utils/update.php --init-updates
and state is kept directly in the import_status table.
This change requires an update in the database schema.
Run the following to update:
ALTER TABLE import_status ADD COLUMN sequence_id integer;
ALTER TABLE import_status ADD COLUMN indexed boolean;
ALTER TABLE import_osmosis_log ADD COLUMN batchseq integer;
2017-05-25 16:26:09 +02:00
Sarah Hoffmann
41fce277cd
make NearPoint its own class
2017-03-15 23:47:35 +01:00
Sarah Hoffmann
bb1c3f23ab
reduce maximum line length to 199 for all php files
2016-10-14 00:01:16 +02:00
Sarah Hoffmann
c0b4411337
reduce search depth when splitting word sets
...
Too many out-of-memory conditions with the current algorithm.
2016-10-12 20:09:20 +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
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
4f75f4cb6e
remove IP blocking and rate-limiting code
...
Closes #472 .
2016-07-18 21:33:09 +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
Sarah Hoffmann
95961d098d
introduce chksql function for website code and move other fail functions
...
The default error screen now reports the full SQL even when not
in debug mode as this message is often more helpful than our
custom error message.
2016-06-12 14:34:57 +02:00
Sarah Hoffmann
d45524cbfb
introduce accessor function for URL parameter
...
These functions take care of type conversion and check that
the parameters contain legal values. The API now returns a
Bad Request error if the format is wrong.
2016-06-11 23:07:06 +02:00
Sarah Hoffmann
af06d31d21
remove duplicate CORS header
...
fixes #427
2016-04-12 23:04:38 +02:00
Sarah Hoffmann
6f442b6617
remove unused functions in php library
2016-03-28 22:55:21 +02:00
Sarah Hoffmann
83cca343c3
Fix fixing of coding style
2016-03-28 22:04:08 +02:00
Markus Gail
7dd0a63b68
Fix coding style.
2016-03-23 09:34:36 +01:00
Markus Gail
e94b667e16
adapt to code style conventions
2016-03-21 14:15:22 +01:00
Markus Gail
291fdd1894
Tested Version of new Tiger line storage format.
2016-03-21 14:14:01 +01:00
Markus Gail
46cef36184
Implement geocoding and reverse geocoding with tiger interpolation lines instead of points.
2016-03-21 14:14:01 +01:00
Marc Tobias Metten
991bd0004a
Reverse geocode include geometry
2016-03-04 20:29:09 +01:00
Marc Tobias Metten
7f5fe8c877
moved bIncludePolygonAsPoints related logic into lib.php, added tests
2016-02-28 17:06:52 +01:00
Marc Tobias Metten
78a29b5a87
spaces-to-tabs for all *.php files
2016-02-27 00:02:20 +01:00
PhiRub
5cc1946dfc
Fixed Lat/Long Example
2015-09-03 15:59:40 -05:00
Sarah Hoffmann
86ca377b1a
add extratags and name details to PlaceLookup (reverse)
2015-08-09 15:14:59 +02:00