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
05bef92f0f
ignore admin_level = 15 in geocodejson output
...
Level 15 is an artifical value.
2018-07-06 21:59:17 +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
Sarah Hoffmann
adae49b184
remove trailing spaces
2018-07-05 19:28:17 +02:00
Sarah Hoffmann
2bd7c75a35
avoid 'SELECT *'
2018-07-05 19:27:21 +02:00
Sarah Hoffmann
b0e0f7ae76
make sure index is used when looking for places in country
2018-07-04 20:56:09 +02:00
Sarah Hoffmann
ac29f8bc91
Merge branch 'better-reverse' of https://github.com/gemo1011/Nominatim into gemo1011-better-reverse
2018-07-02 21:33:27 +02:00
gemo1011
1d7ed6737e
added comments and improved geOutline function
2018-06-27 14:55:24 +02:00
gemo1011
97b6656182
no polygon search over country-level
2018-06-27 14:55:23 +02:00
gemo1011
f108eac527
changed the lookupPolygon function
...
- Search for Polygons begins at rank_address 4
- $iMaxRank changed to 25 if its higher
2018-06-27 14:55:22 +02:00
gemo1011
426e108b34
added case when for highways in subquery
2018-06-27 14:55:18 +02:00
gemo1011
229ad01042
added search diameter for the place node search, depending on rank
2018-06-27 14:55:17 +02:00
gemo1011
a5750a6ef6
fixed getoutlinesfunction
2018-06-27 14:55:15 +02:00
gemo1011
0996fdfb55
improvements for pull request
2018-06-27 14:55:13 +02:00
gemo1011
07eb108a6d
fixed typo
2018-06-27 14:55:12 +02:00
gemo1011
41249377d2
fixed getoutlines function if no coordinates are passed
2018-06-27 14:55:11 +02:00
gemo1011
be091b17d9
better search for interpolated housenumbers
2018-06-27 14:55:10 +02:00
gemo1011
398467b2f4
using ST_ClosestPoint and a subquery
2018-06-27 14:55:10 +02:00
gemo1011
796f069d74
test adjusting
2018-06-27 14:55:09 +02:00
gemo1011
82b6245aaa
better place node search with rank_search
2018-06-27 14:55:08 +02:00
gemo1011
f0e5cf53b8
only starts the search in country_osm_grid if $iMaxRank > 4
2018-06-27 14:55:07 +02:00
gemo1011
ee54ebfe77
new query if no polygon is found
...
the new query searchs in the country_osm_grid table for a polygon
2018-06-27 14:55:06 +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
5a17bfc9c9
display viewbox on map
2018-06-14 02:19:19 +02:00
gemo1011
10897787af
deleted query for place nodes search if no polygon is found and added search for interpolation lines
2018-06-05 11:54:12 +02:00
gemo1011
4d073b0350
new query to search place nodes if no polygon was found
2018-06-05 11:54:12 +02:00
gemo1011
625018b654
adapted the coding style with phpcs
2018-06-05 11:54:12 +02:00
gemo1011
5f2410119d
better performance
2018-06-05 11:54:12 +02:00
gemo1011
424c0d0ebb
faster query through bbox preselection
2018-06-05 11:54:12 +02:00
gemo1011
71c9adfdba
performence update through subquerry
2018-06-05 11:54:12 +02:00
gemo1011
723bb4d0b9
changing to from rank_search to rank_address
2018-06-05 11:54:12 +02:00
gemo1011
cb76635da7
better performance for place node search
2018-06-05 11:54:12 +02:00
gemo1011
237e31b3ce
use the linked_place_id for adress search if a place node is found with a linked_place_id
2018-06-05 11:54:12 +02:00
gemo1011
d0741f21b1
changed reverse geocode algorithm
2018-06-05 11:54:12 +02:00
Marc Tobias Metten
7a964efb3a
search/reverse/lookup with geojson,geocodejson output
2018-05-29 17:20:34 +02:00
Sarah Hoffmann
1f689bdaae
document tokens
2018-05-14 23:23:38 +02:00
Sarah Hoffmann
6a0361d0c6
add documentation for TokenList
2018-05-14 23:17:54 +02:00
Sarah Hoffmann
f29c7bf910
introduce classes for token list and token types
2018-05-14 23:04:15 +02:00
Marc Tobias Metten
8841a328c8
add PHPCS Squiz.Arrays.ArrayDeclaration.KeyNotAligned rule
2018-05-08 00:37:41 +02:00
Sarah Hoffmann
c555b60b36
narrow down search by house number when postcode is given
...
Fixes #1034 .
2018-05-07 21:34:11 +02:00
Sarah Hoffmann
115792d1db
replace word frequency hash
...
The word frequency hash was only used to determine if the
name of a SearchDescription is rare. Do this already when
building the SearchDescription (when the word frequency
is still available) and get gid of the extra hash.
2018-05-06 22:35:31 +02:00
mtmail
7075a5828e
add JSON format to /status endpoint ( #1013 )
...
add JSON format to /status endpoint
2018-05-04 23:37:48 +02:00
Marc Tobias Metten
a885e7309a
PHP unit tests for DebugHtml
2018-05-03 22:19:19 +02:00
mtmail
3087ac1145
PHP code style: enforce long array initialisation ( #1015 )
2018-04-13 13:18:29 +02:00
marc tobias
7a1ee99345
return centroid on geojson format
2018-04-12 22:02:24 +02:00
marc tobias
7a31a3d106
remove rank_search_label field
2018-04-12 22:02:24 +02:00
marc tobias
fe3dba3fd7
use RFC3339 for human readable date
2018-04-12 22:02:24 +02:00
marc tobias
31c7f25541
rename parentof to hierarchy and other lonvia Mar/29 PR feedback
2018-04-12 22:02:24 +02:00
Marc Tobias Metten
45aef06d00
localname field is required by nominatim-ui
2018-04-12 22:01:10 +02:00
Marc Tobias Metten
0eb71cdce8
only return polygon if &polygon_geojson=1 is set
2018-04-12 22:01:10 +02:00
marc tobias
45bc511955
variable naming after lonvia PR feedback
2018-04-12 22:01:10 +02:00
Marc Tobias Metten
1e28f2478c
details support json output
2018-04-12 22:01:10 +02:00
Sarah Hoffmann
efac4a135a
do not apply limit to house number place searches
...
Searches for house numbers are already limited by the
number of parent places. In fact, the limit assumed that
every parent place has exactly one match against the
given housenumber. That is not true in reality and so
we were dropping relevant results.
Fixes #329 .
2018-04-06 22:20:21 +02:00
marc tobias
4791fc341e
details page: move permalink next to page title
2018-04-06 17:45:25 +02:00
marc tobias
4743a5e166
details page: add a perma-link
2018-04-06 16:11:54 +02:00
Marc Tobias Metten
329948e685
fix -undefined offset- error
2018-03-27 03:00:07 +02:00
Sarah Hoffmann
2c42bda9ce
nicer formatting for Geocode debug output
2018-03-25 22:28:18 +02:00
marc tobias
27bc8d4f7b
replace PHP sizeof() with either count() or empty()
2018-03-22 12:36:24 +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
5c8fbe8186
Merge pull request #941 from mtmail/parameter-parser-tests2
...
PHP tests for ParameterParser
2018-03-06 23:25:20 +01:00
marc tobias
3ef4c4fbe7
ParameterParser: getStringList removes empty strings
2018-03-06 14:51:48 +01:00
marc tobias
47258f40ea
ParameterParser: getFloat with empty string value throws exception
2018-03-06 13:35:27 +01:00
marc tobias
123a3c0347
ParameterParser: getInt with empty string value throws exception
2018-03-06 13:33:19 +01:00
Sarah Hoffmann
f23a860b33
second attempt at strict names in structured queries
...
If a term does not go into names it should go into
address terms.
2018-03-02 00:26:48 +01:00
Sarah Hoffmann
df008d99f5
do not allow importance to become 0
...
Importance is weighed against a viewbox factor which disappears
when the importance is 0.
Fixes #930 .
2018-03-01 22:37:45 +01:00
Sarah Hoffmann
fd920fba9b
for structured search only accept name terms from the first phrase
...
Fixes #952 .
2018-03-01 22:35:34 +01:00
Marc Tobias Metten
8a615ad969
phpcs fixes. Mostly spacing and single quotes
2018-02-23 01:16:01 +01:00
Edward Betts
7e00a6e2ff
Correct spelling mistakes.
2018-02-18 13:11:35 +00:00
Jonas Hantelmann
a489ac07cd
PlaceLookup::getAddressDetails() should be public, restore default values
...
PlaceLookup::getAddressDetails() is also used within the hierarchy.php
file so it must not be private.
2018-02-12 11:21:05 +01:00
Sarah Hoffmann
3505417e3f
Merge pull request #905 from mtmail/illinois-li-case-insensitive
...
make sure Illinois,Alabama,Louisiana state code special handling is case insensitive
2018-02-10 15:50:42 +01:00
Sarah Hoffmann
29e78780e5
Merge pull request #909 from mtmail/decimal-coord-parsing-with-sub-seconds
...
parsing coordinates allows second with floats
2018-02-10 15:49:48 +01:00
marc tobias
e428019170
typo in error message
2018-02-08 18:02:19 +01:00
marc tobias
5042be1b72
parsing coordinates allows second with floats
2018-02-08 17:45:43 +01:00
Marc Tobias Metten
315713ff9a
make sure Illinois,Alabama,Louisiana state code special handling is case insensitive
2018-02-07 00:48:18 +01:00
Sarah Hoffmann
13469e1576
convert remaining http links and shorten copyright URL
2018-01-11 23:05:28 +01:00
Sarah Hoffmann
c7b903f4b0
assume name for special operator in bounded search
...
With bounded=1 we already have a restricted area, so it does
not make sense to interpret the query as a near search.
Fixes #311 .
2017-12-17 23:50:16 +01:00
Sarah Hoffmann
cdfa31c390
Gives preference to special terms like postcode and housenumber
...
Fixes #846 .
2017-12-17 20:23:34 +01:00
Sarah Hoffmann
b94229fb8e
Give higher penalty to partial search terms
...
Avoids that the interpreation of a term as partial term
is ranked higher than as a special term like postcode
or house number.
Fixes #847 .
2017-12-17 16:00:44 +01:00
Sarah Hoffmann
ed85388de5
fix address walk-up for reverse
...
Fixes the row for the join and completely drops parts that have
a linked_place_id.
Fixes #859 .
2017-12-15 00:10:05 +01:00
Matej Krajčovič
fcba2eabc4
Fix typos in introduction.php
2017-10-30 12:36:20 +01:00
Sarah Hoffmann
8d91a88b22
allow unnamed roads for reverse geocoding
...
Should avoid that results are too far off in areas where
most roads are unnamed.
2017-10-27 20:10:32 +02:00
Sarah Hoffmann
f7258e314d
ignore linked places for reverse geocoding
...
Fixes #838 .
2017-10-27 20:06:53 +02:00
Sarah Hoffmann
6c1977b448
replace double-quoting with single quotes where applicable
2017-10-26 21:40:33 +02:00
Sarah Hoffmann
adbbb1ce02
restrict number of results for reverse queries
...
When given a coordinate off the coast of a large town, the entire
town may end up in the potential results during the reverse query.
Postgres then needs to sort tens of thousands of results before it
can determine the clostest one. Given that the results at such a
large search radius are bound to be imprecise anyway, restrict
the number of results postgres should consider to 1000.
2017-10-25 22:34:29 +02:00
Sarah Hoffmann
f78d094483
fix variable typo when filtering results
...
Fixes #830 and #832 .
2017-10-25 20:25:23 +02:00
Sarah Hoffmann
7eeb79ce67
placex must not return a lookup housenumber
2017-10-25 20:11:51 +02:00
Sarah Hoffmann
7caa67d8ec
penalize housenumber after the postcode
2017-10-24 23:30:41 +02:00
Sarah Hoffmann
919b1b42fa
fix uninitialised rank variable when regrouping searches
2017-10-24 23:17:47 +02:00
Sarah Hoffmann
760807c5e0
revert use of global penalty for a search direction
...
Adding a penalty to a search description because there
is a term at the beginning which looks like a country
turned out to be a bad idea as there are too many
abbreviations around that match against frequently
matched words.
2017-10-24 22:42:29 +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
1a4506f6ab
use PlaceLookup in search
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
5eb11800a7
replace SQL code in PlaceLookup with content of search's get_details
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
Sarah Hoffmann
42f079c355
introduce Result class in Geocode and SearchDescription
2017-10-23 23:30:53 +02:00
marc tobias
2361ca2c71
UI: allow copy&pasting lat,lon into the lat search field
2017-10-21 14:28:28 +02:00
marc tobias
3cee2d185d
UI: allow copy&pasting lat,lon into the lat search field
2017-10-21 14:11:46 +02:00
marc tobias
da4a2b7b6e
UI: scrollwheel, minimap
2017-10-21 13:24:02 +02:00
Sarah Hoffmann
cdf8c67898
fix CodeSniffer offences
2017-10-13 23:11:09 +02:00
Sarah Hoffmann
00265af528
move word recheck into token collection
...
Drop tokens for special and postcode searches already when
collecting them for ValidTokens when they cannot be found
in the normalized query.
2017-10-13 23:04:12 +02:00
Sarah Hoffmann
77b76ae51b
simplify cross-check of country tokens
...
Drop country tokens that do not match the country code list
early. Remove in turn the special country code check for
structured phrases. It is sufficient to do this during
word list building.
2017-10-13 22:23:39 +02:00
Sarah Hoffmann
9ef2370a2a
remove unused $aPossibleMainWordIDs array
2017-10-13 21:34:13 +02:00
Sarah Hoffmann
c700421aa7
add documentation for Phrase
2017-10-13 21:23:45 +02:00
Sarah Hoffmann
77abe882ab
take frequency scores from token description
...
No need to hand them in separately.
2017-10-12 22:59:07 +02:00
Sarah Hoffmann
023f94b066
convert phrase array to class
2017-10-12 22:37:44 +02:00
Sarah Hoffmann
df463f4ea6
Show address rank in details and hide unset admin_level
...
Address rank explains better why the address parts are where
they are.
Fixes #766 .
2017-10-11 22:17:59 +02:00
Sarah Hoffmann
3da4c9c384
Sort results for near searches by proximity
...
If a reference coordinate is given, results really should be
sorted by distance to this point ignoring importance completely.
Fixes #796 .
2017-10-10 23:03:28 +02:00
Sarah Hoffmann
c8780da19c
documentation for SearchContext and SearchDescription
2017-10-10 00:15:56 +02:00
Sarah Hoffmann
c02bf4986f
coding style and some documentation
2017-10-09 23:13:04 +02:00
Sarah Hoffmann
9a5d5d9aec
move complete search query code into SearchDescription
2017-10-09 22:55:50 +02:00
Sarah Hoffmann
55629a4891
move country list to SearchContext
2017-10-08 23:33:54 +02:00
Sarah Hoffmann
907133a38c
move excluded place list to SearchContext
2017-10-08 23:15:06 +02:00
Sarah Hoffmann
86c0858130
move viewbox sql to new SearchContext
2017-10-08 22:44:01 +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
614a6ab861
don't trust words from word table to be sanatized
2017-10-08 17:36:38 +02:00
Sarah Hoffmann
4bff2814a9
add missing include
2017-10-08 17:13:41 +02:00
Sarah Hoffmann
8e0ffde3e0
fix CodeSniffer violations
2017-10-08 17:00:59 +02:00
Sarah Hoffmann
795153b213
fix more syntax issues
2017-10-08 16:42:04 +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
16268f92cc
convert getGroupedSearches to SearchDescription class
2017-10-08 12:57:22 +02:00
Sarah Hoffmann
d72c863353
add function to convert array to SQL
2017-10-08 10:06:17 +02:00
Sarah Hoffmann
96b6a1a418
use SearchDescription class in query loop
2017-10-08 09:54:12 +02:00
Sarah Hoffmann
0067555c38
move initial search setup to new class type
2017-10-07 12:24:21 +02:00
Sarah Hoffmann
77d4453334
add new class for searches
2017-10-07 12:24:21 +02:00
Sarah Hoffmann
c563c2bfec
drop searches with excluded country codes earlier
2017-10-07 12:23:46 +02:00
Sarah Hoffmann
266153f218
remove code for dropping address terms
...
This code has been inactive in quite a while and is a suboptimal
solution. We need to be much more selective in what gets dropped.
2017-10-07 11:53:33 +02:00
Sarah Hoffmann
73e737d775
fix variable names
2017-10-06 22:01:52 +02:00
Sarah Hoffmann
5029101048
further restrict use of partial terms in names
2017-10-06 21:36:28 +02:00
Sarah Hoffmann
0c9a241487
housenumbers may only appear before or after the name
2017-10-06 21:16:35 +02:00
Sarah Hoffmann
41d2cd318d
penalize search order where a country comes first
2017-10-06 21:07:33 +02:00
Sarah Hoffmann
0d2cdb5c2f
allow postcodes and housenumbers together
...
Fixes #805 .
2017-10-06 20:48:35 +02:00
Sarah Hoffmann
f8d55b5448
sanitize special search term before normalizing
2017-10-06 00:22:27 +02:00
Sarah Hoffmann
00a3a8834b
fix postcode search
...
Name token must be fully replaced with the postcode and
postcode search must be done only once.
2017-10-04 23:33:29 +02:00
Sarah Hoffmann
32f6ddf6db
only allow either postcode or special search
...
Fixes #804 .
2017-10-04 20:15:06 +02:00
Sarah Hoffmann
1220ff5da6
use correct source for radius column in debug view
2017-10-04 20:14:35 +02:00
Sarah Hoffmann
89c576fbe1
tests: more coverage for all API endpoints
2017-10-04 00:05:34 +02:00
Sarah Hoffmann
8e2ef2842e
move psqlRunScript implementation into cmd lib
...
Function needed for update.php as well.
2017-10-03 14:26:59 +02:00
Sarah Hoffmann
e3323e8888
fix search for postcode via structured query
...
Results from the artifical postcode table were dropped
when reevaluating rank of results.
2017-10-03 12:10:27 +02:00
Sarah Hoffmann
2deac34648
remove unnecessary size check
2017-10-02 22:31:52 +02:00
Sarah Hoffmann
e8c52c6780
be more strict with searches involving house numbers
...
Housenumber searches without a name cannot exist per
definition. Searches with only a name but no address
should not fall back on a search without house number.
This should improve postcode only search.
2017-10-02 22:22:50 +02:00
Sarah Hoffmann
e7e7ae0104
avoid unnecessary SQL when rechecking rank restrictions
2017-10-02 20:42:37 +02:00
Sarah Hoffmann
749091bf3a
order of viewbox coordinates does not matter
2017-10-01 22:48:57 +02:00
Sarah Hoffmann
28810e6ce0
Merge pull request #802 from mtmail/coordinate-extract-missing-first-minus-sign
...
NearPoint::extractFromQuery - greedy-match optional quote sign
2017-10-01 22:42:24 +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
a88527b2a0
fix index when rechecking postcode name
2017-09-30 12:19:16 +02:00
Sarah Hoffmann
b1e8db7ca7
return unchanged term if normalizer was not found
2017-09-30 09:39:47 +02:00
marc tobias
06657b3e10
NearPoint::extractFromQuery - greedy-match optional quote sign
2017-09-21 19:13:50 +02:00
marc tobias
e67a6dc321
fix to NearPoint::extractFromQuery handling first minus sign
2017-09-19 12:40:10 +01:00
Sarah Hoffmann
15a215729e
fix handling of near queries with special search
...
Make sure to use the classtype tables with near search and
allow to search for arbitrary key/values (forbidding it
for viewbox searches).
Add tests for near queries.
2017-09-19 00:07:11 +02:00
Sarah Hoffmann
ce95c55d65
fix display of nearpoint in debug view
2017-09-18 23:06:30 +02:00
Sarah Hoffmann
8eb066c692
reinstate key-value amenity search
...
Reenable search by the secret special term [key=value]
matching against the given main tag. Note that for most
cases that works only for tags that also have a special
search table.
2017-09-18 22:09:06 +02:00
Sarah Hoffmann
a0de20e9bc
more API tests for code coverage
...
Also fixes two minor issues related to structured queries.
2017-09-17 23:30:08 +02:00
Sarah Hoffmann
3546b30473
timestamp info message and repeat warnings at end
2017-09-17 11:06:52 +02:00
Sarah Hoffmann
88610b1b74
further restrict results for <postcode>, <term>
...
Disallow postcode operator together with housenumbers
and force results around a postcode when no address is
given.
2017-08-21 22:29:51 +02:00
Sarah Hoffmann
86a8900e21
fix subqueries when getting details for postcodes
2017-08-19 19:37:06 +02:00
Sarah Hoffmann
67bb885900
throw away searches with two postcodes
2017-08-19 19:37:06 +02:00
Sarah Hoffmann
50c5abf6bb
fix API tests wrt postcodes
2017-08-19 19:37:06 +02:00
Sarah Hoffmann
5237f44c4a
remove lat/lon check for search terms
...
Was only used with GB postcodes which were removed.
2017-08-19 19:37:06 +02:00
Sarah Hoffmann
99e9abe843
require postcodes to match exactly in normalised form
2017-08-19 19:37:06 +02:00
Sarah Hoffmann
5b4bbab9be
include GB CodePoint data into location_postcode table
2017-08-19 19:37:06 +02:00
Sarah Hoffmann
3714b7ea7d
take postcode into account for other searches
...
Existence of postcode is still optional but if a matching
result is found, then non-matching ones will be discarded.
2017-08-19 19:37:05 +02:00
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
16053e81bf
show address tags and postcode in details
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
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
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
050b0a2ced
remove street and addr_place columns in placex
...
The information is onyl needed for parenting,
so no need to store it permanently.
2017-04-08 19:58:10 +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
Marc Tobias Metten
1e3bf9729e
for search,details in format=HTML return geometry in geojson, not wkt. No longer need leaflet-omnivore plugin
2017-03-19 17:31:00 +01:00
Sarah Hoffmann
57b35654e7
fix style
2017-03-17 22:36:22 +01:00
Sarah Hoffmann
20a4cab57e
add tests for nearpoint sql functions
2017-03-16 22:12:20 +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
marc tobias
a52455f160
github.com/twain47 => github.com/openstreetmap
2017-03-12 13:06:25 +01:00
Sarah Hoffmann
450a12c6be
include housenumbers and postcodes when rechecking for exact matches
2017-02-28 21:40:05 +01:00
Ludovic Delauné
2c3317f582
extra headers for compatibility on IE7
2017-02-28 17:08:34 +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
Sarah Hoffmann
a84a7a70f3
reverse: choose interpolation only when further than point
...
The ST_DWithin check also includes objects that are the same distance.
Another attempt at #545 .
2017-02-05 23:02:21 +01:00
Sarah Hoffmann
dcab7a19e5
reverse: disable interpolation when going up the address hierarchy
...
Fixes #621 .
2017-02-05 13:08:51 +01:00
Sarah Hoffmann
b8db8301df
reverse: reduce search radius for interpolations
...
Interpolations should have the same maximum search radius as
address points. Change search strategy and only search for
interpolations either before decreasing the maxRank to road
or when a POI was found and we need to check that there isn't
an interpolation that is closer.
2017-01-09 20:51:16 +01:00
Marc Tobias Metten
adb6ea546f
sMoreURL now includes countrycodes values
2016-12-22 02:06:08 +01: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
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
Sarah Hoffmann
032f24bfef
Merge branch 'ui-easy-switch-coords' of https://github.com/mtmail/Nominatim
2016-11-01 23:49:02 +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