[postgis-users] polygon minimum width

Kevin Neufeld kneufeld at refractions.net
Thu Oct 1 22:35:17 PDT 2009


The linestrings wouldn't need to be continuous as long as you attribute 
them left and right bank.  Then your query would be to find the shortest 
distance between two linear datasets (left and right banks).  A cross 
product query would help you here.  Or, ST_Collect your banks into two 
multilinestrings, one for left and one for right bank.  Then compute the 
distance between them.

But you are still going to have problems at the head and mouth of the 
river.  There, the left and right banks touch, so the minimum distance 
between the left side of the river and right side of the river is zero. 

-- Kevin

Surya Tarigan wrote:
> Hallo Nicklas
> fortunately I have linestring version of the polygon, but it seems 
> that the linestirings are not continuous. Does st_distance still 
> apply? Or are there any postgis function to make the polyline continuous?
>  
> kind regards,
>  
>  
>
> ------------------------------------------------------------------------
> *From:* "nicklas.aven at jordogskog.no" <nicklas.aven at jordogskog.no>
> *To:* PostGIS Users Discussion <postgis-users at postgis.refractions.net>
> *Sent:* Thursday, October 1, 2009 3:50:37 PM
> *Subject:* Re: [postgis-users] polygon minimum width
>
> Hallo
>  
> I think the easiest way is to make a linestring of the 
> polygon.boundary and then cut the line in the start and end so you get 
> two more or less paralell lines.. Then you can use st_distance to find 
> the shortest distance between them.
>  
> Hope that helps
> Nicklas
>
> 2009-10-01 Surya Tarigan wrote:
>
> >
> >
> Dear list,
> >
>  
> >
> I  have a river polygon with polygon length about 20 km.  How can I 
> query the minimum width of  the river polygon. I tried to search 
> previous threads, but I could not find any clue.
> >
>  
> >
> kind regards,
> >
>  
> >
> surya
>
> >
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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