[postgis-users] segmented road data to svg

strk at refractions.net strk at refractions.net
Fri Aug 5 02:54:38 PDT 2005


On Fri, Aug 05, 2005 at 09:50:47AM +0200, Christo Du Preez wrote:
> Is there an alternative way I can use in the meanwhile to get my 
> segmented linestrings built up into something like a polygon or something?

If they form a closed ring the Polygonize() should help,
but they probably don't ...

You can construct a like from points, and you can extract number
of points and specific points from a linestring. 

The main problem is ordering the points...
This seems an excellent use case for Topology support.

A do-it-yourself way would be something like:

	- Dump the multiline into a temp table.

	- Fetch a line L1, remove from table

	- Repeat:
		- Fetch a line L2 so that
		  {start,end}point(L2) == {start,end}point(L2)
		- Sew L2 to L1 (swap end/start point if necessary)
		- remove L2 from table

	- No more rows in temp table... finished.

--strk;


> 
> strk at refractions.net wrote:
> 
> >On Thu, Aug 04, 2005 at 12:09:40PM +0200, Christo Du Preez wrote:
> >
> >...
> >
> > 
> >
> >>What is the best procedure to build my roads up from 
> >>all the segments parts
> >>   
> >>
> >
> >This is a missing function.
> >
> >GEOS/JTS added the LineMerge class for this, but we never
> >added an interface for it in PostGIS.
> >
> >I added this in the TODO for release 1.1.0.
> >
> >--strk;
> >_______________________________________________
> >postgis-users mailing list
> >postgis-users at postgis.refractions.net
> >http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
> >
> > 
> >
> 
> -- 
> Kind Regards,
> Christo Du Preez
> 
> Senior Software Engineer
> Mecola IT
> http://www.mecola.com
> +27 [0]82 4255 895
> 
> _______________________________________________
> 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