[postgis-users] Select polygons within polygon with PostGIS 2.0

Astrid Bjørnerød aeb at skogoglandskap.no
Mon Oct 15 23:02:19 PDT 2012


But has the TopoGeometry object  id from the geometry ?
And the same with TopoElements, they only have element-id and type.
I want to delete  edges which left or right face has a special attributevalue, for building new topology without these edges and the update the geometry.
Then I have to know the answer from a query like this:
Select edge_id from topo.edge where topo.edge.left_face = select  g. GetTopoGeomElements.element_id from geoTable g where g.field1 = 'value1';
Is this possible?

Regards Astrid

-----Opprinnelig melding-----
Fra: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] På vegne av Sandro Santilli
Sendt: 15. oktober 2012 17:41
Til: PostGIS Users Discussion
Emne: Re: [postgis-users] Select polygons within polygon with PostGIS 2.0

On Mon, Oct 15, 2012 at 11:37:08AM +0000, Astrid Bjørnerød wrote:
> No, I have really not understood  the way to get a link between the relation-table and the originally geo-table.

A TopoGeometry object represents that link.

> I have a table geoTable.
> All I want is to make query which returns the values of left and right polygons, like this :
>   Update geoTable set newValue = leftFace.value  where geoTable.field1 is null;  --if leftFace.Area > rightFace.Area or
>   Update geoTable set newValue = rightFace.value where geoTable.field1 
> is null; --if leftFace.Area < rightFace.Area
> 
> What is the mapping between myTopo.relation element_id and the geoTable and how do I get this (which topology functions)?

You only want to query the relation table to know the composition of your TopoGeometry. In your case this would probably be a list of face identifiers. But you can also use functions to get that
information: GetTopoGeomElementArray or GetTopoGeomElements.

You ask:

 "[..] I want [..] the values of left and right polygons"

Left and right of what ? In the topology model we refer to "left" and "right" of an edge. Is that what you're looking for ?

--strk;

 http://www.cartodb.com - Map, analyze and build applications with your data

                                       ~~ http://strk.keybit.net 

_______________________________________________
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