[postgis-users] - The greater length River inside one Watershed

Aigars V aigarsv at gmail.com
Tue Apr 26 05:48:17 PDT 2011


Probably you can look at this (pgrouting)

http://www.pgrouting.org/
http://underdark.wordpress.com/2011/02/07/a-beginners-guide-to-pgrouting/

or as I see you use qgis you also can try this qgis plugin


http://www.youtube.com/watch?v=T2JTuQOBXz0
http://gis-lab.info/qa/road-graph-eng.html


Just adapt for your needs.


However it depends what kind and how many data you have.



2011/4/26 George Silva <georger.silva at gmail.com>

> ooops, prior to max use st_length!
>
> On 4/26/11, George Silva <georger.silva at gmail.com> wrote:
> > hello marcello. what is your data model? dependng on the data model
> > (if you have a column, lets say, rivername) you can use a group by
> > clause and st_collect on your geometry field. ex:
> >
> > select rivername, max(st_collect(the_geom)) from rivers group by
> rivername
> >
> > the intersects clause its up to you , depending on your néds. not
> > tested, but should work.
> >
> > On 4/26/11, Marcello Benigno <benigno.marcello at gmail.com> wrote:
> >> Hi All,
> >>
> >> I need a query that returns the greater length of river within a
> >> watershed. Does
> >> anyone have any suggestions on how I can solve this problem?
> >>
> >> The rivers are formed by segments. if each were a continuous line would
> >> be
> >> easy.
> >>
> >> Here is a print-screen of the problem, in yellow is what would be the
> >> result
> >> of
> >> the query.
> >>
> >> Thanks in advance,
> >> --
> >> *Marcello Benigno B. de Barros Filho*
> >> Prof. do Curso Superior de Tecnologia em Geoprocessamento - IFPB
> >> Mestre em Ciências Geodésicas e Tecnologias da Geoinformação - UFPE
> >> http://profmarcello.blogspot.com
> >> http://about.me/marcello.benigno
> >>
> >
> >
> > --
> > George R. C. Silva
> >
> > Desenvolvimento em GIS
> > http://geoprocessamento.net
> > http://blog.geoprocessamento.net
> >
>
>
> --
> George R. C. Silva
>
> Desenvolvimento em GIS
> http://geoprocessamento.net
> http://blog.geoprocessamento.net
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110426/b086456b/attachment.html>


More information about the postgis-users mailing list