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

Michal Zimmermann zimmicz at gmail.com
Thu Oct 11 04:21:25 PDT 2012


Yep, I have TopoGeometry fields.
-- counties
"Topology topo_kraje (12), SRID 4326, precision 0
36 nodes, 48 edges, 14 faces, 14 topogeoms in 1 layers
Layer 1, type Polygonal (3), 14 topogeoms
 Deploy: edpp.kraje.topo
"
-- districts
"Topology topo_orp (13), SRID 4326, precision 0
962 nodes, 1611 edges, 651 faces, 206 topogeoms in 1 layers
Layer 1, type Polygonal (3), 206 topogeoms
 Deploy: edpp.orp.topo
"

On 10/11/12, Sandro Santilli <strk at keybit.net> wrote:
> On Thu, Oct 11, 2012 at 12:10:34PM +0200, Michal Zimmermann wrote:
>> Sandro,
>> earlier you said
>> >One benefit is making the spatial relationships explicit, so that
>> > you could encode your counties as being composed by the districts,
>> > and the districts would be composed by faces, which would be defined
>> > by (shared) edges.
>> > At that point querying for "all districts in a county" would just be
>> > a matter of listing the components of a "county" TopoGeometry.
>>
>> Does this mean it is better approach to have only one topology enabled
>> layer (in my case districts) with features having some id of which
>> county they belong to? In the end, I need to have county > districts >
>> cadastral areas chain (all of them being represented as polygons).
>> Right now I have both counties and districts layer with topology, but
>> I can't see a way to join them (e. g. to "select all districts from
>> counties where county.id = 1").
>
> You mean you have TopoGeometry fields ?
> Show the output of TopologySummary(<your_topology_name>)
>
> --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
>


-- 
Michal Zimmermann (zimmi)
WWW: http://www.zimmi.cz



More information about the postgis-users mailing list