[postgis-users] river network

Kevin Neufeld kneufeld at refractions.net
Wed Feb 18 14:36:51 PST 2009


I just spent the last 5 years doing this exact thing for the BC Government - mapping all hydrographic data across BC, 
(which they are now giving away for free :) ).  The development was all done in PostGIS, spanning 150GB in tables.  It's 
definitely possible.

Have you tried simply querying which stream segments spatially touch your specified segment?

-- Assuming your dataset is properly noded, directionalized
-- and digitized in a downstream direction, this will find
-- all streams that enter into stream with id = 1
SELECT b.*
FROM streams a, streams b
WHERE a.stream_id = 1     -- your specified segment
AND a.the_geom && b.the_geom
AND ST_Distance(
   ST_StartPoint(a.the_geom),
   ST_EndPoint(b.the_geom)
) = 0;


There is also an interesting concept where you can attribute the stream segments with a precomputed "hierarchical key". 
  Once done, you can quickly query all streams that are upstream of a given segment ... non-spatially.
This very old document may be of some interest to you.
ftp://ftp.geobc.gov.bc.ca/pub/outgoing/FreshWaterAtlasDocuments/HierarchicalKeysTechnicalDocumentation.doc

The doc came from this site 
http://aardvark.gov.bc.ca/apps/metastar/metadataDetail.do?from=search&edit=true&showall=showall&recordSet=ISO19115&recordUID=4212.

Cheers,
Kevin


surya wrote:
> Dear Bruce,
> 
> I need to query which river segment flowing into a specified segments.
> 
> best regards,
> 
> surya
> 
> ----- Original Message ----- From: "Bruce Rindahl" <rindahl at lrcwe.com>
> To: <storma-ipb at indo.net.id>; "PostGIS Users Discussion" 
> <postgis-users at postgis.refractions.net>
> Sent: Thursday, February 19, 2009 12:02 AM
> Subject: Re: [postgis-users] river network
> 
> 
>> Do you need to perform routing or some other analysis on the network?
>> Bruce
>>
>>
>> storma-ipb at indo.net.id wrote:
>>> Dear List,
>>>
>>> does anyone has experience or references on how to store river
>>> network segments of a watershed in Postgis database?
>>> bestregards,
>>> surya
>>>
>>>
>>> ___________________________________________________________
>>> indomail - Your everyday mail - http://indomail.indo.net.id
>>>
>>>
>>> _______________________________________________
>>> postgis-users mailing list
>>> postgis-users at postgis.refractions.net
>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>
>>>
>>>
>>
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list