Hello,

 

I am looking for some tips to split a polygon to its simplest linestrings.

An example worth better than words :

 

POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))

Would become :

MULTINLINESTRING((0 0, 0 1), (0 1, 1 1), (1 1, 1 0), (1 0, 0 0))

 

Every single linestring has to have two and only two points.

 

Is there a way to do this with the existing postgis functions ?

I found several ways to turn a polygon to a (multi)linestring but not to
split it then into shortest linestrings. 

 

Thanks for any input.

 

Nicolas

Gillet

_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to