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

Michal Zimmermann zimmicz at gmail.com
Thu Oct 11 00:02:58 PDT 2012


Hi,
I tried with SELECT CreateTopology('kraje_topo', 4326); and got the
following error: ERROR: AddGeometryColumn() - invalid SRID. Is there
something special I need to do before creating topology?

On 10/10/12, Paolo Corti <pcorti at gmail.com> wrote:
> On Wed, Oct 10, 2012 at 12:16 PM, Sandro Santilli <strk at keybit.net> wrote:
>>
>> 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.
>>
>> But I guess you're still in the data preparation phase as you still
>> don't know which district record belong to which county, right ?
>> In that case you'll need ST_Covers (assuming the input data is
>> _really_ correct and doesn't contain cases in which the shape
>> of a district is slightly outside the shape of its county.
>>
>> Note that storing the data in a topology would be an excellent way to
>> have better control on those kind of data problems (often not easily
>> detectable as invisible to the eye).
>>
>> --strk;
>>
>
> +1 for this approach
> I have been using it for managing European administrative borders with
> excellent results!
> regards
> p
>
> --
> Paolo Corti
> Geospatial software developer
> web: http://www.paolocorti.net
> twitter: @capooti
> skype: capooti
> _______________________________________________
> 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