From: | Roxanne Reid-Bennett <rox(at)tara-lu(dot)com> |
---|---|
To: | pgsql-novice(at)lists(dot)postgresql(dot)org <pgsql-novice(at)lists(dot)postgresql(dot)org> |
Subject: | Re: How to create a View of geometry type equals point? |
Date: | 2024-06-14 06:38:13 |
Message-ID: | 010101901577d451-de668c7c-368a-42a8-b423-f41e080513d8-000000@us-west-2.amazonses.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Create view polys as
Select * from <table> where ST_GeometryType(<geom>) = ‘ST_Polygon’;
Returns ST_Linestring, ST_Polygon, etc.
ST_GeometryType
postgis.net
There is also GeometryType
GeometryType
postgis.net
Roxanne
On Jun 13, 2024, at 9:36 PM, Sándor Daku <daku(dot)sandor(at)gmail(dot)com> wrote:
Hello Nicholas,
I want to create a View within PostGIS that filters only those records that have Geometry type equal to Point
(and also another view of geometry type equal to Polygon)
What SELECT statement achieves this?
I'm not familiar with PostGIS, but based on a quick glance at the docs I think the ST_Dimension function is what you need. Something like: ...where ST_Dimension(geometry_field) = 0
Regards,
Sándor
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Connah | 2024-06-28 10:26:09 | Database migrations |
Previous Message | Sándor Daku | 2024-06-14 04:36:26 | Re: How to create a View of geometry type equals point? |