I'm glad you sorted it - I will find some time soon for the wiki page.<div><br></div><div>The reason I suggested the dev list is that I know quite a few people do not subscribe to talk any more - your questions would not be out of place there, but it is up to you!</div>
<div><br>Regards</div><div><br></div><div>Graham.<br><br><div class="gmail_quote">On 9 August 2011 09:49, kenneth gonsalves <span dir="ltr"><<a href="mailto:lawgon@thenilgiris.com">lawgon@thenilgiris.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Mon, 2011-08-08 at 07:34 +0100, Graham Jones wrote:<br>
> These questions might get a better response on the Dev list as they<br>
> are quite technical.<br>
<br>
</div>but it is an end user question - I would not like to waste the time of<br>
the devs.<br>
<div class="im"><br>
> I am not very good at postgis so I may be wrong, but you might be<br>
> comparing two identical points (way and way).  The postgis manual<br>
> seems to do select. ... AS.. for each side of the comparison.<br>
> You could check this by using the coordinates of bangalore explicitly<br>
> rather than getting them from the database.<br>
<br>
</div>actually as Frederik pointed out the error was that the measurement has<br>
to be in degrees and not metres as I had assumed. It works like a<br>
charm.<br>
<div class="im">><br>
> I quite fancy starting a tips and tricks wiki page for this sort of<br>
> thing if you would like to ass the solution when you find it.<br>
<br>
</div>Here it is (I am quite proud of the fact that I could do it with my<br>
rudimentary knowledge of sql - it only took 4 days to write it):<br>
<br>
select <a href="http://p.name" target="_blank">p.name</a>,<br>
f.lat*.0000001 as lat,<br>
f.lon*.0000001 as lon<br>
from<br>
planet_osm_point p,<br>
planet_osm_nodes f<br>
where<br>
(p.place != 'city')<br>
and<br>
ST_DWithin(p.way,<br>
(select way from planet_osm_point where name like '%Mysuru%'  limit<br>
1),.15)<br>
and<br>
p.osm_id = <a href="http://f.id" target="_blank">f.id</a><br>
order by <a href="http://p.name" target="_blank">p.name</a>;<br>
<br>
This selects all places within .15 degrees of Mysuru.<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Graham Jones<div>Hartlepool, UK.</div><br>
</div>