[Geocoding] Help Needed

Pradeep Rai pradiprai at gmail.com
Fri Apr 5 07:22:24 UTC 2013


Hi Sarah,

Following output received using suggested URL:

string(153) "select word_id,word_token, word, class, type, location,
country_code, operator from word where word_token in (' foo','foo') and
search_name_count < 50000" array(1) { [0]=> array(3) { ["string"]=>
string(3) "foo" ["words"]=> array(1) { [0]=> string(3) "foo" }
["wordsets"]=> array(1) { [0]=> array(1) { [0]=> string(3) "foo" } } } }
array(1) { ["foo"]=> array(1) { [0]=> array(8) { ["word_id"]=> string(5)
"86138" ["word_token"]=> string(3) "foo" ["word"]=> NULL ["class"]=> NULL
["type"]=> NULL ["location"]=> NULL ["country_code"]=> NULL ["operator"]=>
NULL } } } array(1) { [2]=> array(1) { [0]=> array(13) { ["iSearchRank"]=>
int(2) ["iNamePhrase"]=> int(0) ["sCountryCode"]=> bool(false) ["aName"]=>
array(1) { [86138]=> string(5) "86138" } ["aAddress"]=> array(0) { }
["sOperator"]=> string(0) "" ["aFeatureName"]=> array(0) { } ["sClass"]=>
string(0) "" ["sType"]=> string(0) "" ["sHouseNumber"]=> string(0) ""
["fLat"]=> string(0) "" ["fLon"]=> string(0) "" ["fRadius"]=> string(0) ""
} } }rankName TokensAddress Tokenscountryoperatorclasstypehouse#LatLonRadius
2#foo(86138)#string(4) "
------------------------------
" array(13) { ["iSearchRank"]=> int(2) ["iNamePhrase"]=> int(0)
["sCountryCode"]=> bool(false) ["aName"]=> array(1) { [86138]=> string(5)
"86138" } ["aAddress"]=> array(0) { } ["sOperator"]=> string(0) ""
["aFeatureName"]=> array(0) { } ["sClass"]=> string(0) "" ["sType"]=>
string(0) "" ["sHouseNumber"]=> string(0) "" ["fLat"]=> string(0) ""
["fLon"]=> string(0) "" ["fRadius"]=> string(0) "" }rankName TokensAddress
Tokenscountryoperatorclasstypehouse#LatLonRadius2#foo(86138)#string(190)
"select place_id from search_name where name_vector @> ARRAY[86138] order
by case when importance = 0 OR importance IS NULL then
0.92-(search_rank::float/33) else importance end DESC limit 10" array(1) {
[0]=> string(6) "142031" } string(4) "
------------------------------
" string(3059) "select
osm_type,osm_id,class,type,admin_level,rank_search,rank_address,min(place_id)
as place_id,country_code,get_address_by_language(place_id,
ARRAY['short_name:en-US','short_name:en','name:en-US','name:en','place_name:en-US','place_name:en','official_name:en-US','official_name:en','short_name','name','place_name','official_name','ref','type'])
as langaddress,get_name_by_language(name,
ARRAY['short_name:en-US','short_name:en','name:en-US','name:en','place_name:en-US','place_name:en','official_name:en-US','official_name:en','short_name','name','place_name','official_name','ref','type'])
as placename,get_name_by_language(name, ARRAY['ref']) as
ref,avg(ST_X(ST_Centroid(geometry))) as
lon,avg(ST_Y(ST_Centroid(geometry))) as lat,
coalesce(importance,0.9-(rank_search::float/30)) as importance from placex
where place_id in (142031) and placex.rank_address between 0 and 30 and
linked_place_id is null group by
osm_type,osm_id,class,type,admin_level,rank_search,rank_address,country_code,importance,get_address_by_language(place_id,
ARRAY['short_name:en-US','short_name:en','name:en-US','name:en','place_name:en-US','place_name:en','official_name:en-US','official_name:en','short_name','name','place_name','official_name','ref','type'])
,get_name_by_language(name,
ARRAY['short_name:en-US','short_name:en','name:en-US','name:en','place_name:en-US','place_name:en','official_name:en-US','official_name:en','short_name','name','place_name','official_name','ref','type'])
,get_name_by_language(name, ARRAY['ref']) union select 'T' as
osm_type,place_id as osm_id,'place' as class,'house' as type,null as
admin_level,30 as rank_search,30 as rank_address,min(place_id) as
place_id,'us' as country_code,get_address_by_language(place_id,
ARRAY['short_name:en-US','short_name:en','name:en-US','name:en','place_name:en-US','place_name:en','official_name:en-US','official_name:en','short_name','name','place_name','official_name','ref','type'])
as langaddress,null as placename,null as ref,avg(ST_X(centroid)) as
lon,avg(ST_Y(centroid)) as lat, -0.15 as importance from
location_property_tiger where place_id in (142031) and 30 between 0 and 30
group by place_id union select 'L' as osm_type,place_id as osm_id,'place'
as class,'house' as type,null as admin_level,30 as rank_search,30 as
rank_address,min(place_id) as place_id,'us' as
country_code,get_address_by_language(place_id,
ARRAY['short_name:en-US','short_name:en','name:en-US','name:en','place_name:en-US','place_name:en','official_name:en-US','official_name:en','short_name','name','place_name','official_name','ref','type'])
as langaddress,null as placename,null as ref,avg(ST_X(centroid)) as
lon,avg(ST_Y(centroid)) as lat, -0.10 as importance from
location_property_aux where place_id in (142031) and 30 between 0 and 30
group by place_id,get_address_by_language(place_id,
ARRAY['short_name:en-US','short_name:en','name:en-US','name:en','place_name:en-US','place_name:en','official_name:en-US','official_name:en','short_name','name','place_name','official_name','ref','type'])
order by importance desc"

Thanks & Regards,
Pradeep



On 2 April 2013 23:22, Sarah Hoffmann <lonvia at denofr.de> wrote:

> Hi,
>
> On Tue, Apr 02, 2013 at 05:33:52PM +0530, Pradeep Rai wrote:
> > Thanks for your reply.
> >
> > I have checked both tables contains large number of records.
>
> That's good already. Check the console output of your browser if there are
> any errors. If there are none, check the output of
>
> http://<your server URL>/search.php?q=foo&debug=1
>
> See if there are any database errors (like permission errors).
>
> > Local.php is related to map loading as local.php is not created. Kindly
> > suggest.
>
> There is no local.php in Nominatim.
>
> Sarah
>
>


-- 
Thanks & Regards,
Pradeep Rai
M: +91 9971318881
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/geocoding/attachments/20130405/57a6a934/attachment.html>


More information about the Geocoding mailing list