ooops, prior to max use st_length! On 4/26/11, George Silva <[email protected]> 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 <[email protected]> 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 [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
