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
a855ffe58e
replace deprecated postgis functions
...
ST_Line_Locate_Point and ST_Distance_Spheroid have changed
spelling in newer version and throw a deprecation warning.
2016-10-09 20:09: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
775fdeb8e4
UI: viewbox parameter was set in wrong parameter order
2016-09-13 14:41:56 +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
Marc Tobias Metten
87b6810eba
HTML map: new button -show map bounds- in top right corner
2016-08-24 04:21:28 +02:00
Marc Tobias Metten
797c2d1e74
Merge remote-tracking branch 'upstream/master' into move-mouse-position-info-on-map
2016-08-24 00:03:40 +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
Marc Tobias Metten
bb403e2e58
HTML map: new button -show map bounds-
2016-08-01 01:34:03 +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
0d179b8c97
remove unnecessary local variable
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
4f75f4cb6e
remove IP blocking and rate-limiting code
...
Closes #472 .
2016-07-18 21:33:09 +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
2ab43f6367
reverse do not downgrade tiger and interpolation results
...
Also fix the type that is returned for Tiger data.
Fixes #470
2016-06-14 21:38:03 +02:00
Sarah Hoffmann
10c5d7f6f6
fix more syntax errors in error functions
2016-06-12 23:25:47 +02:00
Sarah Hoffmann
e842d8793c
allow parameters to be empty
...
Consider empty parameters as unset and use the default. Simplifies
use in forms.
2016-06-12 23:22:14 +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
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
6fef943e49
update links to OSM objects
...
/browse/ is no longer necesary in the URL
2016-06-12 09:26:58 +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
cf4a44aaf7
introduce chksql function for phpscripts
...
Checks SQL query results for errors and bails out if it finds one.
Avoids some heavy code duplication all over the place.
2016-06-09 20:37:51 +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
Sarah Hoffmann
2156fb1ad7
remove reference assignment where unnecessary
...
Avoids a number of warnings on PHP7.
2016-06-04 23:46:19 +02:00
Sarah Hoffmann
f0d962f8a0
fix variable name in search xml output
2016-05-27 23:35:24 +02:00
Sarah Hoffmann
234b1b0293
Merge remote-tracking branch 'markus/master' into master
2016-05-14 21:09:57 +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
Sarah Hoffmann
4e0e0c1797
replace new-style [] expression with old-style array()
...
Also removes some unused code.
fixes #444
2016-05-01 11:22:53 +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
Markus Gail
89c556d163
Coding style adaptions and correcting small errors from merge.
2016-04-25 13:58:28 +02:00
Markus Gail
b03be15442
Merge remote-tracking branch 'origin/master' into osmline
...
Conflicts:
lib/Geocode.php
lib/PlaceLookup.php
sql/functions.sql
sql/tables.sql
utils/setup.php
2016-04-25 11:01:04 +02:00
Markus Gail
7879ad44cd
Remove interpolation lines from placex and save them in an extra table.
2016-04-25 09:44:01 +02:00
Sarah Hoffmann
af06d31d21
remove duplicate CORS header
...
fixes #427
2016-04-12 23:04:38 +02:00
Sarah Hoffmann
d01d0c13f4
Merge pull request #425 from lonvia/disable-aux-tables
...
make tables for external data (Tiger and aux) configurable
2016-04-12 23:00:24 +02:00
Sarah Hoffmann
a86563cfb1
make tables for external data (Tiger and aux) configurable
...
Introduces two new settings CONST_Use_US_Tiger_Data and
CONST_Use_Aux_Location_data, which are disabled by default.
When false the corresponding tables are ignored in queries
and updates.
Aux and tiger tables are no longer created by default. This
has to be done by the corresponding import scripts. The former
aux table creation can be found in sql/aux_tables.sql for
reference.
2016-04-07 21:47:51 +02:00
Sarah Hoffmann
009882999f
clean up query logging
...
- remove query_log table, keeping only new_query_log
- drop unused import_npi_log table
- disable DB logging per default
- use file logging structure from osm.org
2016-04-07 20:37:27 +02:00
Sarah Hoffmann
f9a488cd5a
remove 'closed for indexing' feature
...
Simultanous updates are fine these days.
2016-03-30 22:53:19 +02:00
Sarah Hoffmann
02bd322c1d
remove explicitly set postgres/postgis version
...
Get the version from the database where necessary or simply
probe for existence of features. Fake hstore_to_json when
necessary.
Bumps the minimum required versions fro postgres to 9.1 and
for postgis to 2.0.
2016-03-30 22:48:18 +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
Sarah Hoffmann
53eb9a5f14
fix syntax errors in tiger code and adapt format of dummy tables
2016-03-27 23:45:20 +02:00
Sarah Hoffmann
443bfec035
Merge branch 'tigerlines' of https://github.com/markigail/Nominatim
2016-03-27 20:00:15 +02:00
Sarah Hoffmann
7090604de7
reinstate NOMINATIM_SETTINGS variable
...
Move sourcing of this script to settings.php so that
it is loaded before anything else.
2016-03-24 22:06:54 +01:00
Markus Gail
7dd0a63b68
Fix coding style.
2016-03-23 09:34:36 +01:00
Markus Gail
a4ecd9d73e
Merge branch 'tigerlines' of /home/markus/Nominatim into tiger
...
Conflicts:
lib/Geocode.php
lib/ReverseGeocode.php
lib/lib.php
2016-03-22 11:26:39 +01:00
Markus Gail
e94b667e16
adapt to code style conventions
2016-03-21 14:15:22 +01:00
Markus Gail
f6127df15d
add osm_type='tiger' to json, jsonv2 and xml output
2016-03-21 14:14:01 +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
Markus Gail
bc449e10be
change tiger housenumber format to save as lines instead of points and thus new interpolation
2016-03-21 14:07:12 +01:00
Markus Gail
d8703c223b
adapt to code style conventions
2016-03-21 13:32:44 +01:00
Markus Gail
28166c5bb1
add osm_type='tiger' to json, jsonv2 and xml output
2016-03-21 13:32:44 +01:00
Markus Gail
df6b433066
Tested Version of new Tiger line storage format.
2016-03-21 13:32:44 +01:00
Markus Gail
26e30bf8e1
Implement geocoding and reverse geocoding with tiger interpolation lines instead of points.
2016-03-21 13:32:44 +01:00
Markus Gail
49d0ce1de4
change tiger housenumber format to save as lines instead of points and thus new interpolation
2016-03-21 13:32:44 +01:00
marc tobias
d020e05f5b
query the last updated timestamp only if output format is HTML
2016-03-21 13:32:44 +01:00
marc tobias
c346c57341
corrected layout of keywords on HTML details page
2016-03-21 13:32:44 +01:00
Marc Tobias Metten
607fef2d8f
moved bIncludePolygonAsPoints related logic into lib.php, added tests
2016-03-21 13:32:44 +01: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
Sarah Hoffmann
279ea25e7d
Merge pull request #381 from lonvia/cmake-port
...
Replace autotools with cmake and update osm2pgsql
2016-03-13 21:40:38 +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
Sarah Hoffmann
5d7bd37ab2
introduce InstallPath, so that stuff can be executed from build 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
Sarah Hoffmann
df9850f5ca
Merge pull request #385 from mtmail/query-lastupdated-only-for-html-output
...
query the last updated timestamp only if output format is HTML
2016-03-02 21:36:34 +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
edaa1f7fcd
corrected layout of keywords on HTML details page
2016-03-02 00:53:56 +01:00
Sarah Hoffmann
1ad6f4a1ce
introduce InstallPath, so that stuff can be executed from build dir
2016-02-29 22:26:55 +01:00
Sarah Hoffmann
cb3af09ebd
Merge pull request #380 from mtmail/geometryText2Points
...
Geometry text2 points
2016-02-29 20:53:49 +01:00
Marc Tobias Metten
9fb413a126
corrected layout of keywords on HTML details page
2016-02-29 13:59:16 +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
Sarah Hoffmann
8b491e8544
Merge pull request #361 from mtmail/detail-page-big-table2
...
UI: columns nicer aligned in details table(s)
2016-02-06 12:51:47 +01:00
marc tobias
c2b68c337b
remove commented-out lines
2016-02-06 12:49:59 +01:00
marc tobias
634d04068d
UI: columns nicer aligned in details table(s)
2016-02-06 12:39:51 +01:00
Marc Tobias Metten
21385f5e51
make map tile layer configurable
2016-01-27 19:42:49 +01:00
Sarah Hoffmann
4cade95b24
more detailed introduction
...
fixes #261
2016-01-24 09:22:49 +01:00
Sarah Hoffmann
a9b370fcb2
reverse webpage: don't choose zoom level 0 when none is given
2016-01-22 23:11:47 +01:00
Sarah Hoffmann
355d1efe21
add a short introduction text for the web interface
2016-01-22 23:01:03 +01:00
marc tobias
cd37227a3c
user interface: zoom dropdown for debugging on reverse search page
2016-01-22 11:54:26 +00:00
marc tobias
ef1a7d9073
user interface: reverse search remembers zoom level after map click
2016-01-21 15:26:18 +00:00
marc tobias
513efecc34
user interface: less whitespace in header
2016-01-21 12:03:19 +00:00
Sarah Hoffmann
248588fbf3
make headers more compact
2016-01-20 21:14:30 +01:00
Marc Tobias Metten
016815eda2
new reverse HTML page incl leaflet map
2016-01-19 16:15:32 +01:00
Marc Tobias Metten
f2a2c29815
responsive details-error page. Shared header and footer
2016-01-19 12:29:07 +01:00
Marc Tobias Metten
851af3db7f
details.php now also responsive
2016-01-15 17:11:12 +01:00
marc tobias
fc961c14fa
status after hackweekend London
2016-01-15 17:11:12 +01:00
PhiRub
5cc1946dfc
Fixed Lat/Long Example
2015-09-03 15:59:40 -05:00
Sarah Hoffmann
5c187182a3
fix json output of empty arrays
2015-08-15 09:52:48 +02:00
Sarah Hoffmann
95a681f128
make sure names/extratags is enabled for postgres > 9.2 only
...
Support for hstore_to_json() needed.
2015-08-10 21:53:13 +02:00
Sarah Hoffmann
a1f3bfb35a
implement namedetails and extratags parameter for search
2015-08-10 21:42:40 +02:00
Sarah Hoffmann
86ca377b1a
add extratags and name details to PlaceLookup (reverse)
2015-08-09 15:14:59 +02:00
Sarah Hoffmann
134553b184
ignore man_made objects in reverse search
...
fixes https://trac.openstreetmap.org/ticket/5339
2015-08-04 21:44:19 +02:00
Marc Tobias Metten
7c8c206818
new method /lookup.php - Reverse search by multiple osm ids
2015-06-16 21:11:21 +02:00
Sarah Hoffmann
1fcb712f00
also return bbox ccordinates as string for nodes
...
fixes https://trac.openstreetmap.org/ticket/5132 again
2015-06-12 23:26:38 +02:00
Sarah Hoffmann
80df4d3b56
fix parameter name
...
Fixes trac ticket 5319.
2015-05-28 21:25:55 +02:00
Sarah Hoffmann
3e871d6ee0
Merge branch 'http_proxy' of https://github.com/simonlopez/Nominatim
2015-05-22 21:20:51 +02:00
Sarah Hoffmann
c51ca976ed
bring back area bboxes for nodes
2015-05-21 22:47:37 +02:00
Simon Lopez
c1f65ba7cf
allow usage behind an HTTP Proxy. Fixes twain47/Nominatim#33
2015-05-21 19:51:04 +02:00
Sarah Hoffmann
68596436b1
set SQL statement timeout to php execution timeout
2015-05-06 21:27:12 +02:00
Sarah Hoffmann
79f1107391
increase relevance of class/type importance
...
fixes #273
2015-05-04 21:14:34 +02:00
Sarah Hoffmann
cf36e8d2fb
Merge branch 'reverse-lookup-including-tiger-lookup' of https://github.com/mtmail/Nominatim
2015-04-30 21:48:25 +02:00
Sarah Hoffmann
a7e1b3b1ee
Merge branch 'feature/polygon-simplification' of https://github.com/a1exsh/Nominatim
2015-04-30 21:26:11 +02:00
Oleksandr Shulgin
46e64bd933
Check for positive polygon simplification threshold
...
Don't run the simplification function if no threshold was given
(or in case of a negative one). Also process the query string
parameter in case of html out format.
2015-04-29 16:13:39 +02:00
Marc Tobias Metten
2e1590ed89
apply Sarah's pull request feedback
2015-04-29 01:34:32 +02:00
Sarah Hoffmann
27753fb8db
remove check for class/type shortcuts which were never implemented
...
fixes #266
2015-04-28 21:37:51 +02:00
Marc Tobias Metten
2a3672c19b
postgres coalesce() looks for null values, not 0. Result remains in this case 0
2015-04-28 21:14:36 +02:00
Marc Tobias Metten
9746629fd3
during reverse geocode lookup we also check the (optional) Tiger data for house numbers
2015-04-28 21:07:34 +02:00
Oleksandr Shulgin
ab47773604
Add polygon simplification
...
New query string parameter polygon_threshold=<0.0..1> is introduced.
The float value of this parameter (defaults to 0) is passed to
ST_SimplifyPreserveTopology() on geometry we're about to output in
one (or many) requested formats such as GeoJSON, KML, etc.
This is useful when getting border polygons for whole countries, but
rendering them at large scale, when most of the high resolution details
cannot be seen anyway. For example, the unsimplified polygon data for
Germany in GeoJSON format currently makes for about 3 MB response body.
With use of this new parameter, the application can greatly reduce the
amount of downloaded data and server response time while providing its
users with the same picture. On a typical laptop screen resolution,
zooming out to fit the whole country borders on screen, only 1/100 amount
of details could be well enough.
2015-04-27 15:16:38 +02:00
Brian Quinion
a5a0e1dd0b
Various places where conversion from to ->aStructuredQuery had been missed
2015-04-07 14:04:08 +01:00
Sarah Hoffmann
eb1d8894b9
correctly handle comma-only exclude_place_ids
2015-03-29 18:17:52 +02:00
Sarah Hoffmann
aaabf70a1c
correctly quote regular expression
2015-03-29 17:23:06 +02:00
Sarah Hoffmann
987b6a70c9
use unescaped unicode in json where supported by PHP
2015-03-29 13:02:21 +02:00
Sarah Hoffmann
555362eabe
simplify bounding box computation
...
Makes highlighting of points reappear.
2015-03-06 20:58:09 +01:00
Marc Tobias Metten
3c2c3ab674
check database results before using variable
2015-02-18 17:53:49 +01:00
Sarah Hoffmann
2b2b6ffadc
drop special handling of short exact terms in address
...
There is a double check against exact terms, so that results with
a matching exact short term will float to the top.
2015-02-15 19:36:39 +01:00
Sarah Hoffmann
c9f3d7d08b
disable housenumber-specific search when no address details are provided
2015-02-05 21:13:33 +01:00
Sarah Hoffmann
cf5ced6618
order search results by existance of housenumbers
...
When searching for an address with housenumber, include the house
number lookup already when searching in search_name so that we do
not cut away relevant results in cases where there are too many
street pieces.
2015-02-04 20:31:30 +01:00
Sarah Hoffmann
0f84371748
actually write back the reversed final phrase when reversing the query
2015-02-04 20:29:38 +01:00
Sarah Hoffmann
b145dadd63
correctly quote display name in html search result
2015-02-03 23:12:21 +01:00
Sarah Hoffmann
7769b0a823
junctions should not appear as roads in addresses
...
fixes #228
2015-01-30 22:25:08 +01:00
Sarah Hoffmann
330f147b02
use _st_intersects when dealing with countries, it does not use index
2015-01-28 21:40:08 +01:00
Sarah Hoffmann
fbc5ba13f8
show class instead of yes in html search output
2015-01-27 22:22:26 +01:00
Sarah Hoffmann
c798577f70
remove hack for fixing adminitrative typo
2015-01-26 22:33:56 +01:00
Sarah Hoffmann
4c2fa68c55
details view: use class name if type is yes
...
fixes #209
2015-01-26 22:27:33 +01:00
Sarah Hoffmann
d1552b0904
don't use tokens from country parameter in address field of searches
...
fixes #218
2015-01-26 21:59:36 +01:00
Sarah Hoffmann
b121da0ca3
need phrase types in getGroupedSearches
2015-01-26 21:34:21 +01:00
Sarah Hoffmann
e16fcf879d
fully evaluate reverse order of queries
...
Factors out computation of search group and calls the code once
for forward evaluation and wants with reversed word order.
2015-01-21 21:40:38 +01:00
Sarah Hoffmann
d6e7bbaad9
add underscore back to derelict canal
...
fixes #212 (again)
2014-12-20 14:55:08 +01:00
Sarah Hoffmann
1217083146
remove duplicate derelict canal
...
fixes #212
2014-12-20 00:02:26 +01:00
Marc Tobias Metten
52265a33ba
for PlaceLookup if we look for nodes then the centroid does not exist in the placex table
2014-10-28 14:27:40 +01:00
Sarah Hoffmann
e62ae5b090
respect bounded in country searches
...
fixes trac 5238
2014-10-08 23:31:33 +02:00
Sarah Hoffmann
4d6da459da
experimental tweaking of ranks of searches
...
- completely removes partial words with spaces from addresses
- ensure that frequent partial search terms appear in NonAddress
- higher penalty for partial words consisting of numbers
2014-09-29 19:11:59 +02:00
Marc Tobias Metten
d6f298f033
move looksLikeLatLonPair into lib.php, basic PHP test suite using phpunit
2014-09-23 22:53:20 +02:00