<div dir="ltr"><div>Thanks,</div><div>(I am trying to get permission to send the data).  I have n't tried st_Straightskeleton. Will try it....</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 27, 2018 at 11:07 AM, Darafei "Komяpa" Praliaskouski <span dir="ltr"><<a href="mailto:me@komzpa.net" target="_blank">me@komzpa.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi!<div><br></div><div>First case sounds like ST_Snap. </div><div><br></div><div>For second case, if you are not going to write an extending loop I would try to get the polygon after buffering and then try with ST_StraightSkeleton and ST_ApproximateMedialAxis.</div><div><br></div><div>Can you share a dataset to play with? </div></div><br><div class="gmail_quote"><div dir="ltr">пн, 27 авг. 2018 г. в 19:34, Hemant Bist <<a href="mailto:hemantbist@gmail.com" target="_blank">hemantbist@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi, <div>Is there something already written that can help me do the following?</div><div><br></div><div>I need to "extend" the line segments  by a small amount to see if they can be joined.  The use cases are </div><div>1) Joining line segments that should be joined in reality but in the data (linstrings) they have a small gap.</div><div>2) The vector lines (multiple linestrings) are dashed line representation of real line .e.g. representing a road by dashed line of 4mm dashes with gap of 1 mm between them.</div><div>I am willing to live with error cases where some line segments are joined when they should not be. The output I need should be </div><div><br></div><div>I cannot do  st_buffer(st_union(st_buffer( line_geometry, epsilon)), -epsilon) as it turns the lines into area. But visually these areas look close to what I need.</div><div>The other drawback of st_buffer is that it extends line in all directions, instead of extending line segments in expected directions.</div><div><br></div><div>Currently  the only  possible "solution" I have in mind is to write something custom to extend the individual line strings and then do st_union.<br></div><div><br></div><div>If there are something available in other tools like gdal, grass,  I will be happy to look at them. Currently I don't know of any solutions in other tools as well.</div><div>Thanks,</div><div>HB</div><div><br></div><div><br></div><div><br></div><div> </div></div></div></div>
______________________________<wbr>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/postgis-users</a></blockquote></div><span class="HOEnZb"><font color="#888888">-- <br><div dir="ltr" class="m_8377774771025265130gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Darafei Praliaskouski<br>Support me: <a href="http://patreon.com/komzpa" target="_blank">http://patreon.com/komzpa</a></div></div>
</font></span><br>______________________________<wbr>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/postgis-users</a><br></blockquote></div><br></div>