From 4d10c7c0a0e4e267f4a7ce66c3dd871df1a2b518 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Wed, 18 Jul 2007 13:36:28 +0300 Subject: [PATCH] Add file with list of example selects --- docs/example-queries.sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docs/example-queries.sql diff --git a/docs/example-queries.sql b/docs/example-queries.sql new file mode 100644 index 0000000..e5a9bdf --- /dev/null +++ b/docs/example-queries.sql @@ -0,0 +1,9 @@ + +/* Select way near given int lat,lon */ +select wid,type,flags,num,nodes,((911084432-lat)*(911084432-lat))+((265542144-lon)*(265542144-lon)) as dist from way,way_seg,nodes where wsid=wid and node=nid and lat between 911084432-10000 and 911084432+10000 and lon between 265542144-10000 and 265542144+10000 order by dist; + +/* Select nodes for given way */ +select num,lat,lon from way_seg,nodes where wsid=4216626 and node=nid order by num + +/* Select ways of specific type inside box */ +select wid,flags,num,nodes,((911084432-lat)*(911084432-lat))+((265542144-lon)*(265542144-lon)) as dist from way,way_seg,nodes where wsid=wid and node=nid and lat between 911084432-1000000 and 911084432+1000000 and lon between 265542144-1000000 and 265542144+1000000 and type=1 order by dist; -- 2.39.5