[postgis-users] createtopogeom confusion

Chris English sglish at hotmail.com
Wed Dec 14 14:44:26 PST 2011


areal, lineal, puntal done! And the syntax
looks so, so, well normal...
 
Insert into union_cty_topo.summit_fa (g)
    Select topology.createtopogeom(  -->Insert Into Select, well...
    'union_cty_topo', --topo name
    3,  -- type areal
    2, --layer id
    topology.topoelementarray_agg(array[face_id,3]) -->topoelementarray_agg
    ) from union_cty_topo.face
    where face_id > 0; --required for face as first row id-zero geom-null
Query returned successfully: 1 row affected, 10281 ms execution time.
 
Insert into union_cty_topo.summit_tl (g)
    Select topology.createtopogeom(
    'union_cty_topo', --topo name
    2,  -- type lineal
    3, --layer id
    topology.topoelementarray_agg(array[edge_id,2])
    ) from union_cty_topo.edge_data
    where edge_id > 0; -- probably not necessary for edges
Query returned successfully: 1 row affected, 21922 ms execution time.
 
Insert into union_cty_topo.summit_tp (g)
    Select topology.createtopogeom(
    'union_cty_topo', --topo name
    1,  -- type puntal
    4, --layer id
    topology.topoelementarray_agg(array[node_id,1])
    ) from union_cty_topo.node;
    --where node_id > 0; --probably not necessary for points
Query returned successfully: 1 row affected, 13422 ms execution time.
 
Appending would be different, but this gets one started.
Thanks again. I'll play with GetFaceByPoint now that
everyone will know how to play with each other topologically.
 
Chris
 
hopefully the firefox line spacing/layout still works
----------------------------------------
> Date: Wed, 14 Dec 2011 20:57:45 +0100
> From: strk at keybit.net
> To: sglish at hotmail.com
> CC: postgis-users at postgis.refractions.net
> Subject: Re: [postgis-users] createtopogeom confusion
>
>
> On Wed, Dec 14, 2011 at 12:18:37PM -0500, Chris English wrote:
> >
> > Thanks.  I knew it wasn't related to Topology,
> > but my postgresql skills.  This is now, the first and
> > only documented, somewhat simple explanation
> > of what one does with one's first biggish topology
> > to CreateTopoGeom between the conference material and
> > complex examples in Postgis Topology.
> >
> > So thanks, thanks, thanks from the merely mortal.
> > I'll report my progress.
> >
> > Chris
>
> If I may suggest something for going on, experiment with
> topology.GetFaceByPoint to find the faces making up your
> original geometries. You should basically find all faces
> of which a point-on-surface is within your original geom.
>
> Hey, excellent formatting this time,
> keep it like that :D
>
> --strk;
 		 	   		  


More information about the postgis-users mailing list