<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Arial">Remi,<br>
<br>
I didn't tell you before but I want to use the main river line as
the line for labeling river's name. So an approximation to the
main river is good enough for me. <br>
For a major number of cases (rivers tend to be quite linear), I
can use the st_longestline to get an approximation for the
start/end points and from there I can use the routing functions.<br>
<br>
Thanks.<br>
Cheers.<br>
<br>
</font>
<div class="moz-signature"><span style="font-size:8.5pt">
<b>Toni Hernández Vallčs</b>
<br>
Servei de Sistemes d'Informació Geogrŕfica i Teledetecció<br>
-<br>
Universitat de Girona<br>
<b>SIGTE</b><br>
-<br>
Pl. Ferrater Mora 1<br>
17071 Girona<br>
Tel +34 972 418 039 (7026 intern)<br>
<a href="mailto:toni@sigte.udg.edu">toni@sigte.udg.edu</a>
<br>
<br>
<a href="http://www.sigte.udg.edu">http://www.sigte.udg.edu</a><br>
Twitter <a href="http://twitter.com/SIGTE_UDG">http://twitter.com/SIGTE_UDG</a><br>
<br>
</span></div>
<div class="moz-cite-prefix">On 09/06/2015 08:09, toni hernández
wrote:<br>
</div>
<blockquote cite="mid:55768303.4090502@sigte.udg.edu" type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<font face="Arial">Thanks Remi,<br>
<br>
I thought that but I have no starting/ending points.
St_StartPoint and St_EndPoint are not working with
MultiLinestrings<br>
I'll give it some more intense thought. :)<br>
<br>
Cheers.<br>
<br>
</font>
<div class="moz-signature"><span style="font-size:8.5pt"> <b>Toni
Hernández Vallčs</b> <br>
Servei de Sistemes d'Informació Geogrŕfica i Teledetecció<br>
-<br>
Universitat de Girona<br>
<b>SIGTE</b><br>
-<br>
Pl. Ferrater Mora 1<br>
17071 Girona<br>
Tel +34 972 418 039 (7026 intern)<br>
<a moz-do-not-send="true" href="mailto:toni@sigte.udg.edu">toni@sigte.udg.edu</a>
<br>
<br>
<a moz-do-not-send="true" href="http://www.sigte.udg.edu">http://www.sigte.udg.edu</a><br>
Twitter <a moz-do-not-send="true"
href="http://twitter.com/SIGTE_UDG">http://twitter.com/SIGTE_UDG</a><br>
<br>
</span></div>
<div class="moz-cite-prefix">On 08/06/2015 17:45, Rémi Cura wrote:<br>
</div>
<blockquote
cite="mid:CAJvUf_sDg3wT1pmhsYA-CeJsrdJMHny=DDg4Vw8ngUcZE9h5YQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_default"
style="font-family:monospace,monospace">if you have start
and end point of geom B,<br>
you can get the river path with a shortest path method (one
liner using python, can be done in few hours using plpgsql).<br>
<br>
</div>
<div class="gmail_default"
style="font-family:monospace,monospace">The idea is that you
cut your geom into segments(pairs of points)<br>
, the length of the segment is the weight of this edge <br>
, and you know which segment is connected to which segment
(adjacency graph).<br>
</div>
<div class="gmail_default"
style="font-family:monospace,monospace">Then you use <a
moz-do-not-send="true"
href="http://networkx.lanl.gov/reference/generated/networkx.algorithms.shortest_paths.generic.shortest_path.html#networkx.algorithms.shortest_paths.generic.shortest_path">Networkx
</a>shortest path distance.<br>
</div>
<div class="gmail_default"
style="font-family:monospace,monospace"><br>
Else, <br>
</div>
<div class="gmail_default"
style="font-family:monospace,monospace">you are up to use
some nasty workaround I suppose (playing with buffers on
your original river surface, testing which segment
intersects etc. ).<br>
</div>
<div class="gmail_default"
style="font-family:monospace,monospace">I tried that but it
ends up being more work (and more corner cases) than doing
the things properly (in my experience).<br>
<br>
</div>
<div class="gmail_default"
style="font-family:monospace,monospace">Cheers,<br>
</div>
<div class="gmail_default"
style="font-family:monospace,monospace">Rémi-C<br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2015-06-08 16:42 GMT+02:00 toni
hernández <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:toni@sigte.udg.edu" target="_blank">toni@sigte.udg.edu</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> <font face="Arial">Hi
everyone,<br>
<br>
I have a multilinestring with a river and all its
afluents as you can see in this image <br>
<a moz-do-not-send="true"
href="http://sigserver4.udg.edu/apps/geometries.png"
target="_blank">http://sigserver4.udg.edu/apps/geometries.png</a><br>
<br>
I got geometry A using St_StraithSkeleton.<br>
<br>
Is there a way to go from geometry A to geometry B?? <br>
Maybe something similar to SmoothLine???<br>
<br>
<br>
</font>
<div>-- <br>
<span style="font-size:8.5pt"> <b>Toni Hernández
Vallčs</b> <br>
Servei de Sistemes d'Informació Geogrŕfica i
Teledetecció<br>
-<br>
Universitat de Girona<br>
<b>SIGTE</b><br>
-<br>
Pl. Ferrater Mora 1<br>
17071 Girona<br>
Tel +34 972 418 039 (7026 intern)<br>
<a moz-do-not-send="true"
href="mailto:toni@sigte.udg.edu" target="_blank">toni@sigte.udg.edu</a>
<br>
<br>
<a moz-do-not-send="true"
href="http://www.sigte.udg.edu" target="_blank">http://www.sigte.udg.edu</a><br>
Twitter <a moz-do-not-send="true"
href="http://twitter.com/SIGTE_UDG"
target="_blank">http://twitter.com/SIGTE_UDG</a><br>
<br>
</span></div>
</div>
<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a moz-do-not-send="true"
href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users"
target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
postgis-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a></pre>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a></pre>
</blockquote>
<br>
</body>
</html>