Re: [postgis-users] Get only the main river. Smoothline???

2015-06-09 Thread toni hernández
Remi, 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. For a major number of cases (rivers tend to be quite linear), I can use the st_longestline to get an approximation for the

Re: [postgis-users] Get only the main river. Smoothline???

2015-06-09 Thread toni hernández
Thanks Remi, I thought that but I have no starting/ending points. St_StartPoint and St_EndPoint are not working with MultiLinestrings I'll give it some more intense thought. :) Cheers. *Toni Hernández Vallès* Servei de Sistemes d'Informació Geogràfica i Teledetecció - Universitat de Girona

Re: [postgis-users] Get only the main river. Smoothline???

2015-06-09 Thread toni hernández
only the main river. Smoothline??? Thanks Remi, I thought that but I have no starting/ending points. St_StartPoint and St_EndPoint are not working with MultiLinestrings I'll give it some more intense thought. :) Cheers. *Toni Hernández Vallès* Servei de Sistemes d'Informació Geogràfica i

Re: [postgis-users] Get only the main river. Smoothline???

2015-06-09 Thread toni hernández
@lists.osgeo.org *Objet :* Re: [postgis-users] Get only the main river. Smoothline??? Thanks Remi, I thought that but I have no starting/ending points. St_StartPoint and St_EndPoint are not working with MultiLinestrings I'll give it some more intense thought. :) Cheers

[postgis-users] Get only the main river. Smoothline???

2015-06-08 Thread toni hernández
Hi everyone, I have a multilinestring with a river and all its afluents as you can see in this image http://sigserver4.udg.edu/apps/geometries.png I got geometry A using St_StraithSkeleton. Is there a way to go from geometry A to geometry B?? Maybe something similar to SmoothLine??? --

Re: [postgis-users] Get only the main river. Smoothline???

2015-06-08 Thread Rémi Cura
if you have start and end point of geom B, you can get the river path with a shortest path method (one liner using python, can be done in few hours using plpgsql). The idea is that you cut your geom into segments(pairs of points) , the length of the segment is the weight of this edge , and you