David,

Worked perfectly.  Thanks a bunch!

-Abe
zigGIS Team
Obtuse Software, http://www.obtusesoft.com

On Wed, Jun 11, 2008 at 2:08 PM, David William Bitner
<[EMAIL PROTECTED]> wrote:
> Abe --
>
> For this type of query, running a buffer is actually not necessary.
>
> select h.* from houses h,roads r where r.name like '%MAIN%' and
> distance(h.the_geom,r.the_geom)<=500;
>
> David
>
> On Wed, Jun 11, 2008 at 12:54 PM, Abram Gillespie
> <[EMAIL PROTECTED]> wrote:
>> Hi All,
>>
>> I'm finally starting to do some real production work ... after years
>> of simply using PostGIS in example scenarios as I developed zigGIS.
>> Pretty funny, actually.  Anywho, could someone enlighten me on how to
>> buffer a road and return the surrounding buildings?  This is what I
>> have so far:
>>
>> select h.* from houses h,roads r where r.name like '%MAIN%' and
>> touches(h.the_geom, buffer(r.the_geom,500));
>>
>> Now I realize the above is a bit complex since " like '%MAIN%' "
>> returns multiple road segments, but even working on a single road:
>>
>> select h.* from houses h,roads r where r.gid=1663 and
>> touches(h.the_geom, buffer(r.the_geom,500));
>>
>> doesn't seem to return anything.  I'm positive the buffer query should
>> return some houses.
>>
>> Thanks for any help!
>>
>> -Abe
>> zigGIS Team
>> Obtuse Software, http://www.obtusesoft.com
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users@postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>
>
>
> --
> ************************************
> David William Bitner
> _______________________________________________
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to