Sarah Hoffmann
528fe6553f
adapt php tests
...
Also fixes some errors found by the tests.
2020-05-17 16:46:45 +02:00
Simon Will
14dba39157
Use assertEqualsWithDelta for float comparisons
...
PHPUnit 7.3 introduced the functions assertEqualsWithDelta for comparing
floats with a delta. The old four-argument version of assertEquals is
deprecated in PHPUnit 8 and removed in PHPUnit 9.
This commit means that the tests will fail with PHPUnit < 7.3 because
assertEqualsWithDelta is not defined there.
2020-05-05 23:43:09 +02:00
Simon Will
43fd2a7423
Declare return type of testcase setUp method
...
PHPUnit 7 changed the signature of the TestCase methods to include the
return type.
2020-05-05 23:40:18 +02:00
Sarah Hoffmann
65ee7a8002
Merge pull request #1754 from mtmail/nominatim-db-tests-against-postgres
...
Nominatim::DB tests against separate postgresql database
2020-04-26 10:20:30 +02:00
marc tobias
a5d0657d9b
lonvia PR feedback
2020-04-26 03:33:15 +02:00
Sarah Hoffmann
0b0349f746
Merge pull request #1752 from mtmail/new-oo-shell-class
...
new PHP Nominatim\Shell class to wrap shell escaping
2020-04-25 16:48:04 +02:00
Sarah Hoffmann
207efe700f
highway:construction should appear as 'road' in the address list
...
Fixes #1763 .
2020-04-22 09:08:33 +02:00
marc tobias
38c21de0ee
Nominatim::DB tests against separate postgresql database
2020-04-13 18:01:37 +02:00
marc tobias
fc40939775
new PHP Nominatim\Shell class to wrap shell escaping
2020-04-12 03:50:40 +02:00
Sarah Hoffmann
ef47515420
make admin levels 3 and 7 distinct ones in addresses
...
There really is no need to conflate these two levels as they
are in use in various countries.
Also adds province as a distinct place.
Fixes #1736 .
2020-04-10 22:58:11 +02:00
Sarah Hoffmann
98be5bf637
adapt tests to geocodejson format adaptions
2020-04-08 11:19:43 +02:00
Rahul
eb2d816f2a
Added test cases for whitespaces in LatLon
2020-04-04 00:53:40 +05:30
Sarah Hoffmann
0d189ac5df
Merge pull request #1733 from krahulreddy/whitespaces-considered-as-single-space
...
Support whitespace characters(x09-x0d) as single space
2020-04-03 18:01:47 +02:00
K Rahul Reddy
7aa2df5389
Support whitespace characters(x09-x0d) as single space
2020-04-02 05:04:40 +05:30
Sarah Hoffmann
975ef0b305
re-add district to geocodejson
2020-04-01 21:24:42 +02:00
Sarah Hoffmann
8150c3602b
add tests for geocodejson address fields
2020-04-01 11:14:48 +02:00
Sarah Hoffmann
19948c378a
adapt tests to new borough ranking
2020-03-30 23:04:20 +02:00
marc tobias
7a94872413
remove polygon=1 (polypoints) feature
2020-03-29 21:58:11 +02:00
Sarah Hoffmann
d56c69dd01
adapt API tests to place linkage changes
...
The missing district is due to a data error for wikidata tags.
2020-03-25 11:38:31 +01:00
Sarah Hoffmann
78526a33b4
Remove linkees from search_name
...
Fixes #722
2020-03-04 11:36:39 +01:00
Sarah Hoffmann
6d431aebb7
linked centroids must always be within geometry
...
When using a linked place as centroid for a boundary, check
first that it is really within the area. If it is outside,
just keep the computed centroid because a centroid outside the
area just causes havok.
Fixes #1352 .
2020-03-04 09:59:57 +01:00
Sarah Hoffmann
acd8ca2ebd
add testing for rank adaption while linking
2020-02-28 15:22:48 +01:00
Sarah Hoffmann
06fdfad89e
link against place nodes by place type
...
If a boundary relation has no label member preferably
link against a place node with the same place type.
Also inherit the rank_address from the place node (only
has an effect when linking via lable member or place type).
2020-02-28 15:22:48 +01:00
Sarah Hoffmann
00ca493f33
move linked place type into linked_place extratags
...
Using linked_place means that we don't overwrite any
place tags on the boundary. This is important when we
wanto to use the information for linking.
2020-02-28 15:22:48 +01:00
Sarah Hoffmann
5220a92be4
adapt API tests
2020-02-22 16:46:03 +01:00
marc tobias
7fd9d0eeef
unit tests for ParameterParser::hasSetAny
2020-02-19 16:55:17 +01:00
Sarah Hoffmann
6073d948e6
fix duplicate keys in tests
...
The tests suddenly failed because the unique key constraint
is more strict and does no longer include the type.
2020-02-12 11:29:33 +01:00
marc tobias
932ac23f18
document how to extract subset of TIGER data needed for API tests
2020-02-11 18:50:27 +01:00
Sarah Hoffmann
3a3f9b3496
fix formatting
2020-02-09 16:57:55 +01:00
Sarah Hoffmann
c36fd72f99
use detailsPermaLink function on main website as well
2020-02-09 16:05:22 +01:00
Sarah Hoffmann
57ae3d03a1
return place_id link to details when not an OSM object
...
Stop-gap solution to find the right object for Tiger and
interpolation objects.
2020-02-09 15:45:38 +01:00
Sarah Hoffmann
4856f56d61
adapt test to change in hamlet classification
2020-01-23 22:26:47 +01:00
Sarah Hoffmann
d732dc3bb2
update place address levels
...
Adds province and allotments and downgrades hamlet.
2020-01-08 23:53:03 +01:00
Sarah Hoffmann
20d541af06
remove osm2pgsql tag tests
...
These tests are now part of the osm2pgsql test suite.
2020-01-04 16:23:29 +01:00
Sarah Hoffmann
f8bd4f5133
add test for finding housenumber 0
2019-12-01 20:36:59 +01:00
Sarah Hoffmann
bfe92ea191
bdd tests: enforce use of full import style
2019-12-01 16:25:39 +01:00
Sarah Hoffmann
9fed91a47f
adapt tests for new wikipedia tables
2019-11-20 09:57:40 +01:00
Sarah Hoffmann
e0de838b13
adapt tests to short_name demotion
2019-10-28 22:53:41 +01:00
marc tobias
3af1520461
lookup endpoint returns boundingbox
2019-08-05 23:32:46 +02:00
Sarah Hoffmann
2bbe5017d4
use bbox of geometry when searching for attached streets
...
As we are doing a distance search, this improves results for
large places like airports.
Fixes #1442 .
2019-07-28 13:28:27 +02:00
marc tobias
1560685020
lookup endpoint supports jsonv2 and geocodejson output now
2019-07-21 23:20:48 +02:00
Sarah Hoffmann
4c1793b4e3
recreate interpolations when one of their support nodes changes
...
A simple update is not enough because the interpolation splits
might change as well as the housenumbers.
Fixes #1360 .
2019-07-03 23:15:54 +02:00
Sarah Hoffmann
cdc7d0fe0e
remove visibility modifier from constants again
...
Only supported on PHP >= 7.1.
2019-07-02 23:24:49 +02:00
Sarah Hoffmann
e164d53fcc
adapt tests to new place address ranks
2019-06-30 23:09:43 +02:00
Sarah Hoffmann
38a99856c0
Rework word set computation
...
Switch from an recursive algorithm for computing the word sets
to an iterative one that benefits from caching intermediate
results. This considerably reduces the amount of memory needed,
so that the depth restriction can be dropped. To ensure that
the number of word sets remains manageable, only sets up to
a certain length are accepted and only a certain number of
total word sets. If word sets need to be dropped, we drop
the ones with more words per word set first.
To further reduce the number of potential word sets, the valid
tokens are looked up first and then only word sets containing
valid tokens are computed.
Fixes #1403 , #1404 and #654 .
2019-06-29 18:22:31 +02:00
Sarah Hoffmann
2c21cbb5e6
update osm2pgsql (downgrading unnamed places)
...
Also adds tests for updating unnamed places.
2019-06-10 18:22:11 +02:00
Sarah Hoffmann
3bc4b4bf9f
update osm2pgsql (import special tags)
2019-06-09 13:58:05 +02:00
Sarah Hoffmann
b612b99421
Merge pull request #1321 from mtmail/interpolating-0-housenumbers
...
Support housenumber=0 in interpolations
2019-04-19 18:29:43 +02:00
marc tobias
7d9dbd62c7
Support housenumber=0 in interpolations
2019-04-02 15:13:45 +02:00
marc tobias
c9a6350894
On postcode searches observe given bounded viewbox
2019-04-02 14:49:31 +02:00