Commit Graph

18 Commits

Author SHA1 Message Date
Sarah Hoffmann
e0d29f398e each address line must fill at most one geocodejson field
This fixes an issue where a postcode with rank_address 5
would also appear in the state field.
2020-05-27 11:16:27 +02:00
Sarah Hoffmann
1faa0f4d41 reorganise class/type information
Add a separate function for each property which saves necessary
information independently. Simplify computation of labels and
simple labels to not explicitly save the labels.
2020-05-17 16:46:45 +02:00
Sarah Hoffmann
82a11cae2d first draft 2020-05-17 16:46:45 +02:00
Sarah Hoffmann
29df9771bb further tweaks to geocodejson address output
Removes the place itself from the address details and use
the lowest ranking element in the rank range for the output.
2020-04-08 11:11:33 +02:00
Sarah Hoffmann
300ac4b77b fix phpcs issues 2020-04-03 20:08:08 +02:00
Sarah Hoffmann
975ef0b305 re-add district to geocodejson 2020-04-01 21:24:42 +02:00
Sarah Hoffmann
ca8d776724 determine geocodejson address by rank instead of type
Using the address rank to set the address parts catches
a much wider variety of types like 'town' and 'suburb'.
With recent address ranking changes the rank ranges
are relatively reliable.
2020-04-01 11:12:52 +02:00
Sarah Hoffmann
fdc40d5169 factor out geocodejson address generation
Unifies the two implementations currently used for search and address.
2020-04-01 10:27:17 +02:00
marc tobias
eeb26aaa6f Addresses with housenumber 0 are found 2019-10-31 13:52:10 +01:00
marc tobias
7b09e320a8 /hierarchy.php was missing namespace calling AddressDetails 2019-07-28 22:05:51 +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
2ab836c11c PDO library returns proper boolean. We dont need string comparison 2019-04-02 16:52:37 +02:00
marc tobias
7d9dbd62c7 Support housenumber=0 in interpolations 2019-04-02 15:13:45 +02:00
marc tobias
890d415e1f Nominatim::DB support input variables, custom error messages 2019-03-10 16:56:36 +01:00
Sarah Hoffmann
411f361fcb traverse address list backwards when computing admin levels
By starting with the lowest address level, when collecting
administrative boundaries by level, there is a better chance
to actually get the boundary when the capital of the
administrative boundary is tagged with the level of the
boundary as well.

This is just a heuristics adaption to make the best out of
the imprecise admin_level definition for place nodes.

Fixes #1261.
2018-12-06 21:18:47 +01:00
marc tobias
e2a7a795d4 fix AddressDetails->getAddressDetails, add tests 2018-09-20 02:16:01 +02:00
Sarah Hoffmann
7e0fdf5928 fall back to debugInfo() for printing objects
Fixes #1122.
2018-08-02 00:06:02 +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