Thanks strk,<div><br></div><div>I was trying to use the topology functions.</div><div><br></div><div><div>UPDATE public.sa_provinces</div><div>  SET topogeom = toTopoGeom(the_geom, 'sa_provinces_topo');</div></div>

<div><br></div><div>I get the following message:</div><div><br></div><div><div>ERROR:  function totopogeom(geometry, unknown) does not exist</div><div>LINE 2:   SET topogeom = toTopoGeom(the_geom, 'sa_provinces_topo');</div>

<div>                         ^</div><div>HINT:  No function matches the given name and argument types. You might need to add explicit type casts.</div></div><div><br></div><div><br></div><div>Before running this function i used SET serch_path TO topology, public;</div>

<div><br></div><div>Any pointer what might i be doing wrong.</div><div><br><br><div class="gmail_quote">On 30 January 2012 14:47, Ben Madin <span dir="ltr"><<a href="mailto:lists@remoteinformation.com.au">lists@remoteinformation.com.au</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks strk,<br>
<br>
this is great news - thank you for your efforts,<br>
<br>
cheers<br>
<br>
Ben<br>
<div><div class="h5"><br>
<br>
On 30/01/2012, at 7:49 PM, Sandro Santilli wrote:<br>
<br>
> As of revision 8963 (included in upcoming 2.0.0alpha3 [1]), the function<br>
> to convert simple layers to topologically defined layers [2] is completed.<br>
><br>
> [1] 2.0.0alpha3 <a href="http://www.postgis.org/download/" target="_blank">http://www.postgis.org/download/</a><br>
> [2] toTopoGeom <a href="http://trac.osgeo.org/postgis/ticket/1017" target="_blank">http://trac.osgeo.org/postgis/ticket/1017</a><br>
><br>
> This means that building a persistent topology for your public.states.geom<br>
> layer would be as simple as this:<br>
><br>
> SELECT CreateTopology('states_topo');<br>
> SELECT AddTopoGeometryColumn('states_topo',<br>
>                              'public', 'states', 'topogeom',<br>
>                              'POLYGON');<br>
> UPDATE public.states<br>
>   SET topogeom = toTopoGeom(geom, 'states_topo');<br>
><br>
> You can then check correctness of the conversion:<br>
><br>
> SELECT gid FROM public.states WHERE NOT ST_Equals(geom, topogeom);<br>
><br>
> Look for area overlaps:<br>
><br>
> SELECT r1.element_id FROM states_topo.relation r1, states_topo.relation r2<br>
> WHERE r1.topogeo_id != r2.topogeo_id AND r1.element_id = r2.element_id;<br>
><br>
> Or underlaps:<br>
><br>
> SELECT face_id FROM istat_topo.face WHERE face_id > 0<br>
> AND face_id NOT IN ( SELECT element_id FROM istat_topo.relation );<br>
><br>
> Perform any editing required to clean things up [3], or to simplify the edges.<br>
> You can take a look at the primitives with QGIS db_manager plugin [4], or even<br>
> at the actual TopoGeometries with QGIS master [5] (although it will be slow in<br>
> selecting features within the viewport, see ticket #1290 [6]).<br>
><br>
> [3] <a href="http://strk.keybit.net/blog/2011/11/21/topology-cleaning-with-postgis/" target="_blank">http://strk.keybit.net/blog/2011/11/21/topology-cleaning-with-postgis/</a><br>
> [4] qgis db_manager <a href="http://www.qgis.org/wiki/DB_Manager_plugin_GSoC_2011" target="_blank">http://www.qgis.org/wiki/DB_Manager_plugin_GSoC_2011</a><br>
> [5] QuantumGIS <a href="http://www.qgis.org" target="_blank">http://www.qgis.org</a><br>
> [6] overlap TopoGeometry <a href="http://trac.osgeo.org/postgis/ticket/1290" target="_blank">http://trac.osgeo.org/postgis/ticket/1290</a><br>
><br>
> And of course you can convert TopoGeometries back to simple geometries when needed<br>
> for performance or compatibility reasons:<br>
><br>
> ALTER TABLE public.states ADD newgeom geometry;<br>
> UPDATE public.states SET newgeom = topogeom::geometry;<br>
><br>
> Happy edge walking!<br>
> <a href="http://strk.keybit.net/blog/2012/01/28/a-walk-on-the-wild-side/" target="_blank">http://strk.keybit.net/blog/2012/01/28/a-walk-on-the-wild-side/</a><br>
><br>
> --------------------------------<br>
>  C L O S I N G    C R E D I T S<br>
> --------------------------------<br>
><br>
> I was able to dedicate my time to the implementation of the toTopoGeom<br>
> function thanks to the contribution of a disparate group of people and<br>
> companies putting a part of the money each to reach the bigger target:<br>
><br>
>   Andrea Peri            Anne Ghisla               R3 GIS<br>
>   Silvio Grosso          GFOSS (<a href="http://gfoss.it" target="_blank">gfoss.it</a>)          Cooperativa Alveo<br>
>   AusVet                 Ingvild Nystuen           Luca S. Percich<br>
>   Richard Greenwod       Andreas Neumann           Oslandia<br>
><br>
> A special thank goes to Andrea Peri for his initial kick-starter contribution<br>
> which allowed me to set an affordable target for the pledge.<br>
><br>
> Also thanks to the Geographical Free and Open Source Software association<br>
> (GFOSS) for the help with reducing paperwork involved in handling all the<br>
> contributions.<br>
><br>
> --strk;<br>
><br>
>  ,------o-.<br>
>  |   __/  |    Thank you for PostGIS-2.0 Topology !<br>
>  |  / 2.0 |    <a href="http://www.pledgebank.com/postgistopology" target="_blank">http://www.pledgebank.com/postgistopology</a><br>
>  `-o------'<br>
><br>
> _______________________________________________<br>
> postgis-users mailing list<br>
> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br>
<br>
<br>
</div></div>--<br>
<br>
Ben Madin<br>
<br>
t : <a href="tel:%2B61%208%206102%205535" value="+61861025535">+61 8 6102 5535</a><br>
m : <a href="tel:%2B61%20448%20887%20220" value="+61448887220">+61 448 887 220</a><br>
e : <a href="mailto:ben@ausvet.com.au">ben@ausvet.com.au</a><br>
<br>
AusVet Animal Health Services<br>
P.O. Box 5467<br>
Broome   WA   6725<br>
Australia<br>
<br>
AusVet's website:  <a href="http://www.ausvet.com.au/" target="_blank">http://www.ausvet.com.au/</a><br>
<br>
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!<br>


<div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</div></div></blockquote></div><br></div>