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

Sandro Santilli strk at keybit.net
Thu Oct 11 03:49:01 PDT 2012


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 




More information about the postgis-users mailing list