[postgis-users] PostGIS Topology Pledge: completed !

Sindile Bidla sindile.bidla at gmail.com
Mon Jan 30 06:34:44 PST 2012


Thanks strk,

I was trying to use the topology functions.

UPDATE public.sa_provinces
  SET topogeom = toTopoGeom(the_geom, 'sa_provinces_topo');

I get the following message:

ERROR:  function totopogeom(geometry, unknown) does not exist
LINE 2:   SET topogeom = toTopoGeom(the_geom, 'sa_provinces_topo');
                         ^
HINT:  No function matches the given name and argument types. You might
need to add explicit type casts.


Before running this function i used SET serch_path TO topology, public;

Any pointer what might i be doing wrong.


On 30 January 2012 14:47, Ben Madin <lists at remoteinformation.com.au> wrote:

> Thanks strk,
>
> this is great news - thank you for your efforts,
>
> cheers
>
> Ben
>
>
> On 30/01/2012, at 7:49 PM, Sandro Santilli wrote:
>
> > As of revision 8963 (included in upcoming 2.0.0alpha3 [1]), the function
> > to convert simple layers to topologically defined layers [2] is
> completed.
> >
> > [1] 2.0.0alpha3 http://www.postgis.org/download/
> > [2] toTopoGeom http://trac.osgeo.org/postgis/ticket/1017
> >
> > This means that building a persistent topology for your
> public.states.geom
> > layer would be as simple as this:
> >
> > SELECT CreateTopology('states_topo');
> > SELECT AddTopoGeometryColumn('states_topo',
> >                              'public', 'states', 'topogeom',
> >                              'POLYGON');
> > UPDATE public.states
> >   SET topogeom = toTopoGeom(geom, 'states_topo');
> >
> > You can then check correctness of the conversion:
> >
> > SELECT gid FROM public.states WHERE NOT ST_Equals(geom, topogeom);
> >
> > Look for area overlaps:
> >
> > SELECT r1.element_id FROM states_topo.relation r1, states_topo.relation
> r2
> > WHERE r1.topogeo_id != r2.topogeo_id AND r1.element_id = r2.element_id;
> >
> > Or underlaps:
> >
> > SELECT face_id FROM istat_topo.face WHERE face_id > 0
> > AND face_id NOT IN ( SELECT element_id FROM istat_topo.relation );
> >
> > Perform any editing required to clean things up [3], or to simplify the
> edges.
> > You can take a look at the primitives with QGIS db_manager plugin [4],
> or even
> > at the actual TopoGeometries with QGIS master [5] (although it will be
> slow in
> > selecting features within the viewport, see ticket #1290 [6]).
> >
> > [3]
> http://strk.keybit.net/blog/2011/11/21/topology-cleaning-with-postgis/
> > [4] qgis db_manager http://www.qgis.org/wiki/DB_Manager_plugin_GSoC_2011
> > [5] QuantumGIS http://www.qgis.org
> > [6] overlap TopoGeometry http://trac.osgeo.org/postgis/ticket/1290
> >
> > And of course you can convert TopoGeometries back to simple geometries
> when needed
> > for performance or compatibility reasons:
> >
> > ALTER TABLE public.states ADD newgeom geometry;
> > UPDATE public.states SET newgeom = topogeom::geometry;
> >
> > Happy edge walking!
> > http://strk.keybit.net/blog/2012/01/28/a-walk-on-the-wild-side/
> >
> > --------------------------------
> >  C L O S I N G    C R E D I T S
> > --------------------------------
> >
> > I was able to dedicate my time to the implementation of the toTopoGeom
> > function thanks to the contribution of a disparate group of people and
> > companies putting a part of the money each to reach the bigger target:
> >
> >   Andrea Peri            Anne Ghisla               R3 GIS
> >   Silvio Grosso          GFOSS (gfoss.it)          Cooperativa Alveo
> >   AusVet                 Ingvild Nystuen           Luca S. Percich
> >   Richard Greenwod       Andreas Neumann           Oslandia
> >
> > A special thank goes to Andrea Peri for his initial kick-starter
> contribution
> > which allowed me to set an affordable target for the pledge.
> >
> > Also thanks to the Geographical Free and Open Source Software association
> > (GFOSS) for the help with reducing paperwork involved in handling all the
> > contributions.
> >
> > --strk;
> >
> >  ,------o-.
> >  |   __/  |    Thank you for PostGIS-2.0 Topology !
> >  |  / 2.0 |    http://www.pledgebank.com/postgistopology
> >  `-o------'
> >
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
> --
>
> Ben Madin
>
> t : +61 8 6102 5535
> m : +61 448 887 220
> e : ben at ausvet.com.au
>
> AusVet Animal Health Services
> P.O. Box 5467
> Broome   WA   6725
> Australia
>
> AusVet's website:  http://www.ausvet.com.au/
>
> This transmission is for the intended addressee only and anyone else
> subscribed to this mailing list. Clearly then it is not confidential
> information. If you have received this transmission in error, sorry. The
> contents of this email are the opinion of the writer only and are not
> endorsed by AusVet Animal Health Services unless expressly stated
> otherwise. Although AusVet uses virus scanning software we do not accept
> liability for viruses or similar in any attachments. Congratulations on
> reading this boring and probably completely unnecessary bit - you may be
> the only person ever to do so!
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120130/f64df906/attachment.html>


More information about the postgis-users mailing list