You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.
Reporter: rukus [Submitted to the original trac issue database at 1.22pm, Wednesday, 3rd August 2011]
I found that in one case http://localhost/~seth/reverse?format=xml&lat=49.989675&lon=36.206152&zoom=18&addressdetails=1
nominatim returns street that is far away of specified place. Looking into sources i found that in reverse.php
if ($iMaxRank >= 26)
{
// Street level search is done using placex table
$sSQL = 'select place_id from placex';
$sSQL .= ' WHERE ST_DWithin('.$sPointSQL.', geometry, '.$fSearchDiam.')';
$sSQL .= ' and rank_search >= 26 and rank_search <= '.$iMaxRank;
$sSQL .= ' and (ST_GeometryType(geometry) not in ('ST_Polygon','ST_MultiPolygon') ';
$sSQL .= ' OR ST_DWithin('.$sPointSQL.', ST_Centroid(geometry), '.$fSearchDiam.'))';
$sSQL .= ' and rank_address != 0 and type != 'houses'';
if ($bNamedOnly) $sSQL .= ' and (name is not null or housenumber is not null)';
$sSQL .= ' ORDER BY rank_search desc, ST_distance('.$sPointSQL.', geometry) ASC limit 1';
is using geometry instead of ST_Centroid(geometry). So the last string should be updated to
$sSQL .= ' ORDER BY rank_search desc, ST_distance('.$sPointSQL.', ST_Centroid(geometry)) ASC limit 1';
The text was updated successfully, but these errors were encountered:
Reporter: rukus
[Submitted to the original trac issue database at 1.22pm, Wednesday, 3rd August 2011]
I found that in one case http://localhost/~seth/reverse?format=xml&lat=49.989675&lon=36.206152&zoom=18&addressdetails=1
nominatim returns street that is far away of specified place. Looking into sources i found that in reverse.php
if ($iMaxRank >= 26)
{
// Street level search is done using placex table
$sSQL = 'select place_id from placex';
$sSQL .= ' WHERE ST_DWithin('.$sPointSQL.', geometry, '.$fSearchDiam.')';
$sSQL .= ' and rank_search >= 26 and rank_search <= '.$iMaxRank;
$sSQL .= ' and (ST_GeometryType(geometry) not in ('ST_Polygon','ST_MultiPolygon') ';
$sSQL .= ' OR ST_DWithin('.$sPointSQL.', ST_Centroid(geometry), '.$fSearchDiam.'))';
$sSQL .= ' and rank_address != 0 and type != 'houses'';
if ($bNamedOnly) $sSQL .= ' and (name is not null or housenumber is not null)';
$sSQL .= ' ORDER BY rank_search desc, ST_distance('.$sPointSQL.', geometry) ASC limit 1';
is using geometry instead of ST_Centroid(geometry). So the last string should be updated to
The text was updated successfully, but these errors were encountered: