Commit Graph

69 Commits

Author SHA1 Message Date
marc tobias
890d415e1f Nominatim::DB support input variables, custom error messages 2019-03-10 16:56:36 +01:00
marc tobias
d4b633bfc5 replace database abstraction DB with PDO 2019-03-09 00:18:15 +01:00
marc tobias
b20a534e0c add logEnd to reverse.php, just like search.php 2019-02-27 20:22:50 +01:00
Sarah Hoffmann
e70f405abd Restructure script and website installation
Just make cmake install a small stub that includes
the settings from the build directory and then the
script from the source directory. Remove executable
rights from php files in utils/ so that they cannot
be accidentally executed.
2018-12-02 11:13:48 +01:00
marc tobias
e4a51e460e set exception handler by request format, not always HTML 2018-10-03 22:58:20 +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
80a6751c51 make phpcs happy 2018-07-06 22:06:05 +02:00
Sarah Hoffmann
01d5ecb86b use already existing address field in geocodejson 2018-07-06 21:58:41 +02:00
Sarah Hoffmann
f50f46c1ce Merge branch 'geojson-output' of https://github.com/mtmail/Nominatim into mtmail-geojson-output 2018-07-06 20:26:33 +02:00
gemo1011
43ee4a8faf changed parameters for lookup function in the reverse.php 2018-06-27 14:55:05 +02:00
gemo1011
ab5bcd6d2f rebase 2018-06-27 14:55:05 +02:00
gemo1011
6b8c99a275 rebase 2018-06-27 14:55:03 +02:00
Marc Tobias Metten
7a964efb3a search/reverse/lookup with geojson,geocodejson output 2018-05-29 17:20:34 +02:00
mtmail
3087ac1145
PHP code style: enforce long array initialisation (#1015) 2018-04-13 13:18:29 +02:00
marc tobias
27bc8d4f7b replace PHP sizeof() with either count() or empty() 2018-03-22 12:36:24 +01:00
marc tobias
d23fa84471 remove the 2-minute offset hack from data date in HTML output 2018-03-14 16:42:41 +01:00
Marc Tobias Metten
88beeb7916 merge json and jsonv2 templates, they were very similar 2018-03-13 23:49:04 +01:00
Sarah Hoffmann
6c1977b448 replace double-quoting with single quotes where applicable 2017-10-26 21:40:33 +02:00
Sarah Hoffmann
282c6777ee use PlaceLookup::loadParamArray in search and lookup 2017-10-23 23:30:53 +02:00
Sarah Hoffmann
9981d74ee1 add loadParamArray function to PlaceLookup and use for reverse 2017-10-23 23:30:53 +02:00
Sarah Hoffmann
914caab43d make PlaceLookup::lookup() accept multiple results 2017-10-23 23:30:53 +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
marc tobias
b27926fd4d fix PHP warnings when reverse search was called without parameters
... or empty results
2016-11-17 22:55:05 +01:00
Marc Tobias Metten
6238ae6032 add namespaces, method visibility according to PSR2 standard 2016-09-16 02:27:36 +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
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
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
4f75f4cb6e remove IP blocking and rate-limiting code
Closes #472.
2016-07-18 21:33:09 +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
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
7a50d2f996 factor out link formatting function and osm type translation 2016-06-12 12:39:09 +02:00
Sarah Hoffmann
76b9eb8098 remove now unused bAsPoints in reverse API 2016-06-11 23:27:21 +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
6fc32d9645 Merge branch 'cmake-port' into master
Conflicts:
	CMakeLists.txt
	lib/init.php
	settings/settings.php
2016-03-16 19:45:18 +01:00
Marc Tobias Metten
22ebd1c7a9 second argument of array_merge can be empty 2016-03-13 03:01:19 +01:00
Sarah Hoffmann
5ccb499a6f install executables and call settings.php explicitly
Executables (including websites) need to be installed in the
build directory, so that they can find the right settings.php.
settings now defines build and source dir.
2016-03-12 09:40:43 +01:00
Marc Tobias Metten
71b3aa9cca Reverse geocode include geometry - added bounding box tests 2016-03-09 19:43:03 +01:00
Marc Tobias Metten
991bd0004a Reverse geocode include geometry 2016-03-04 20:29:09 +01:00
marc tobias
8e2b5d7ce3 query the last updated timestamp only if output format is HTML 2016-03-02 01:22:19 +01:00
Marc Tobias Metten
21385f5e51 make map tile layer configurable 2016-01-27 19:42:49 +01:00
Marc Tobias Metten
016815eda2 new reverse HTML page incl leaflet map 2016-01-19 16:15:32 +01:00
Sarah Hoffmann
86ca377b1a add extratags and name details to PlaceLookup (reverse) 2015-08-09 15:14:59 +02:00
Sarah Hoffmann
753227ae25 more strict parameter checking for reverse 2015-03-17 21:06:58 +01:00
Brian Quinion
4429121341 move more code into library 2013-09-06 09:47:45 +01:00
Sarah Hoffmann
3ccf466e2f fix error output 2013-07-04 17:52:25 +02:00
Brian Quinion
93b1089866 Only use placex that are fully indexed for reverse geocoding 2013-05-08 12:16:45 +01:00