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.si...@gmail.com> > ooops, prior to max use st_length! > > On 4/26/11, George Silva <georger.si...@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.marce...@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@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users >
_______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users