[postgis-users] createtopogeom confusion
Chris English
sglish at hotmail.com
Wed Dec 14 08:36:04 PST 2011
I'm trying to take the next step with the populated
topologies, establish the relation between areal, lineal,
puntal layers as seen in Paris2011_TopologyWithPostGIS_2.0.pdf
and PostGiS Topology manual.
> I guess there are no rows in union_cty_topo.summit_fa ?
correct
Insert
into union_cty_topo.summit_fa (g)
Values (
createtopogeom(
'union_cty_topo', --topo name
3, -- type areal
2, -- layer id
topoelementarray <--'{{4,3}}' what to do here?
)
);
Insert into union_cty_topo.summit_fa (g)
values (
topology.createtopogeom(
'union_cty_topo', --topo name
3, -- type areal
2, --layer id
foo.faces)
from ( select topology.topologyelementarray_agg(array[union_cty_topo.face_id,3]))as faces
)
)as foo;
ERROR: syntax error at or near "from"
LINE 8: from ( select topology.topologyelementarray_agg(array[union...
Dancing with FROM is where I've been stuck for a couple of days while
I try to figure out TopologyElementArray syntax.
Chris
trying firefox for verticle, but probably doesn't matter, a hotmail problem
> Date: Wed, 14 Dec 2011 08:52:58 +0100
> From: strk at keybit.net
> To: postgis-users at postgis.refractions.net
> Subject: Re: [postgis-users] createtopogeom confusion
>
> On Tue, Dec 13, 2011 at 02:34:01PM -0500, Chris English wrote:
> >
> > Hi,
> > I have a populated topology 'union_cty_topo' and am confused about the syntax
> > for createtopogeom to create face, line, and point layers.
> > update union_cty_topo.summit_fa --a desired face layer
> > set g = createtopogeom(
> > 'union_cty_topo', -- topo name
> > 3, --type(areal-ie.POLYGON
> > 2, -- layer id
> > foo.sfaces --face)
> > From (select topology.topoelementarray_agg(array[face_id,3]) as sfaces from union_cty_topo.face) as foo;
> > Query returned successfully: 0 rows affected, 953 ms execution time.
>
>
> Beside, are you trying to create a TopoGeometry formed by _all_ faces
> in the "face" table ? Note that such thing would include the universe
> face, which doesn't make much sense. Anyway, PostGIS should just give
> you a TopoGeometry representing the union of all faces in that case.
>
> Thanks for spacing, btw. If you can space also vertically I'll love it :)
>
> --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
More information about the postgis-users
mailing list