[postgis-users] Building Heirarchical Topology

Regina Obe lr at pcorp.us
Wed Feb 8 12:05:14 PST 2023


ARRAY[(topo).id,(topo).layer_id]  is a topoelement. topoelement is just a
domain of an array.

I'm wondering if we can autocast a topo to a topoelement.  
I think I had tried before but they are all implemented as domains and so
the casting got a bit dicey.  
But things have changed, so that might work now.

Try doing 

 topo::topology.topoelement 

Instead of ARRAY[(topo).id,(topo).layer_id]

The cleaner way I should have said was:

ARRAY[(topo).id,(topo).layer_id]::topology.topoelement

Then it would be clearer that that is a topoelement and not a
topoelementarray.



> -----Original Message-----
> From: postgis-users [mailto:postgis-users-bounces at lists.osgeo.org] On
Behalf
> Of Paul Ramsey
> Sent: Wednesday, February 8, 2023 2:48 PM
> To: PostGIS Users Discussion <postgis-users at lists.osgeo.org>
> Subject: Re: [postgis-users] Building Heirarchical Topology
> 
> 
> 
> > On Feb 8, 2023, at 11:44 AM, Regina Obe <lr at pcorp.us> wrote:
> >
> > TopoElementArray_Agg(elm)
> 
> Since I have you here: why a "topoelementarray" and not just a
topoelement[]
> (a normal PgSLQ array of topoelement?)
> 
> If topoelements are no good for building the inputs of topogeoms, what are
> they good for? This other ARRAY[(topo).id,(topo).layer_id] seems more
useful...
> 
> P
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users



More information about the postgis-users mailing list