[postgis-users] Returning contiguous linestrings

Bob Pawley rjpawley at shaw.ca
Mon Apr 23 10:56:45 PDT 2012

Hi Sandro

Thanks for the suggestion.

I've developed the example found in 11.8 TopoGeometry Constructors 
successfully until the Insert geom

    Insert into pid_topo(pid, topo)
    Select 1, topology.toTopoGeom(entities.wkb_geometry, 'test', 11)
    from entities

This creates an error " function topology.totopogeom(geometry, unknown, 
integer) does not exist".

The function toTopoGeom was not found in in neither my self constructed 
Postgis 1.5 topology version nor the Postgis 2.0 version.

Where does this function reside??


-----Original Message----- 
From: Sandro Santilli
Sent: Wednesday, April 18, 2012 4:36 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Returning contiguous linestrings

On Wed, Apr 18, 2012 at 03:57:52AM -0700, Bob Pawley wrote:

> I have, lets say, eight rows each containing a linestring, that,
> when put together forms a closed shape or polygon.
> I can fairly easily detect one of the linestrings in this polygon.
> Since each linestring has a endpoint at (or near) the startpoint of
> the next linestring in the polygon, I am wondering if there is a
> method of detecting the other linestrings, that forms a closed
> polygon, from that one contact.
> From this I would compare the shape to known shapes to identify it.

topology.GetRingEdges does the walking around a ring, starting from
an edge. You'd have to build the topology first, making sure that
endpoints do close. A tolerance >= the max distance between those
endpoint might be enough.


  |   __/  |    Delivering high quality PostGIS 2.0 !
  |  / 2.0 |    http://strk.keybit.net - http://vizzuality.com

postgis-users mailing list
postgis-users at postgis.refractions.net

More information about the postgis-users mailing list