<div dir="ltr">Greetings,<div><br>I have a similar issue where I want join attributes by location from line A to line B. Line B contains the attributes I'm interested to join to line A. Line A is a continuous road network, while line B is erratic gps line output. It some cases line A and line B intersect, but that is not always the case. I used the join attributes by location tool in qgis and got mixed results since the tool performs an intersect first, where I need a function to handle both an ST_overlap and ST_buffer. I think the lines are too close together to use ST_DWithin.</div><div><div><div class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br><div>Perhaps something like this:</div><div><br></div><div><div>SELECT ST_Overlaps(a,b) As a_overlap_b, ST_Crosses(a,b) As a_crosses_b, ST_Intersects(a, b) As a_intersects_b,</div><div>ST_Contains(b,a) As b_contains_a,</div><div>ST_Dimension(a) As dim_a, ST_Dimension(b) as dim_b, ST_Dimension(ST_Intersection(a,b)) As dima_intersection_b</div><div>FROM (SELECT ST_Buffer(ST_GeomFromText('POINT(1 0.5)'), 3)  As a,</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>ST_Buffer(ST_GeomFromText('LINESTRING(1 0, 1 1, 3 5)'),0.5)  As b)</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">    </span>As foo;</div></div><div><br></div><div>Will the attributes carry over to the output?</div><div><br></div><div>Paul </div></div></div></div></div></div>
</div></div>