Commit Graph

35 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
46cef36184 Implement geocoding and reverse geocoding with tiger interpolation lines instead of points. 2016-03-21 14:14:01 +01:00
Markus Gail
d8703c223b adapt to code style conventions 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
Marc Tobias Metten
991bd0004a Reverse geocode include geometry 2016-03-04 20:29:09 +01: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
2e1590ed89 apply Sarah's pull request feedback 2015-04-29 01:34:32 +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
Sarah Hoffmann
0687065748 enable indexed_status check for all 2013-12-04 08:07:38 +01:00
Brian Quinion
b30fd57733 refector reverse geocoding into its own class 2013-09-06 09:47:45 +01:00