[postgis-users] polygons inside polygon

Nicolas Ribot nicolas.ribot at gmail.com
Wed Dec 1 06:13:15 PST 2021


Hi David,

You can use st_isValidReason(geom) to inspect an invalid geometry.
Predicates like st_contains, st_overlaps, st_intersects, etc. can give you
information about relationship between geometries. They all originate from
st_relate (http://postgis.net/docs/ST_Relate.html)

Nicolas

On Wed, 1 Dec 2021 at 12:29, Shaozhong SHI <shishaozhong at gmail.com> wrote:

> This is interesting.
>
> Can we have an SQL to produce report on the status of polygon?  Namely,
> can we write a script to tell us whether a geometry is a valid single
> geometry, or polygons inside polygon, whether there be any issues such as
> self-intersect in a polygon?
>
> SQL reporting on geometry is of interest.
>
> Is it possible to send me a small file of polygons inside polygon in a
> format of CSV or Well Known Text, so that I can test out and confirm the
> robustness of SQL scripts?
>
> Regards,
>
> David
>
> On Tue, 30 Nov 2021 at 06:30, <paul.malm at lfv.se> wrote:
>
>>
>>
>>
>>
>> Hi,
>>
>> I have a polygon layer where polygons are inside other polygons (could be
>> polygons in polygons in polygons…).
>>
>> I would like to separate them in 2 different layers, one layer with the
>> outer most polygon and one layer with all polygons that has a surrounding
>> polygon.
>>
>> Is there a smart way to do this in SQL?
>>
>>
>>
>> Thanks,
>>
>> Paul
>>
>>     [image: 1_LFV_svensk_96]
>>
>>   Paul Malm
>>
>>
>>
>>   Operations / AIM Flyginfo SE
>>
>>
>>
>>   Direkt  08-797 70 23  Mobil 070-860 11 15
>>   paul.malm at lfv.se
>>
>>    Besöks- och postadress
>>    LFV Flyginfo SE
>>
>>    Af Pontins väg 6
>>
>>    115 21 STOCKHOLM
>>
>>
>>
>>
>>
>>
>>
>>    Tänk på miljön innan du skriver ut detta e-postmeddelande.
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/postgis-users
>>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20211201/187c9d4f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 3211 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20211201/187c9d4f/attachment.jpg>


More information about the postgis-users mailing list