[postgis-users] match line with road segment

searchelite searchelite at gmail.com
Sun Jul 20 22:53:33 PDT 2008




Stephen Woodbridge wrote:
> 
> searchelite wrote:
>> 
>> Stephen Woodbridge wrote:
>>> You can buffer the line and see which segments fall inside the buffer.
>>>
>>> select * from roads
>>>   where ST_Contains(the_geom, ST_makeline(gps_points));
> 
> Sorry, this should have been:
> 
> select * from roads
>    where ST_Contains(the_geom, Buffer(ST_makeline(gps_points)), "value");
> 
> where "value" is the radius of the sausage that you are going to make 
> the line into. This has to be in the units of you data set, which is 
> likely degrees. 69 mile ~= 1 degree, 69*5280 ft ~= 1 degree so 50 ft ~= 
> 50/(69*5280) = 0.00013724 so try that for starters and adjust it as 
> required to get good results.
> 
> -Steve
> 
> 

thank you steve for your reply, i guess the buffer should be ST_buffer
right? but unfortunately it's not working...it said that aggregates not
allowed in WHERE clause

thank you
-- 
View this message in context: http://www.nabble.com/match-line-with-road-segment-tp18479996p18562572.html
Sent from the PostGIS - User mailing list archive at Nabble.com.




More information about the postgis-users mailing list