Re: How to create a View of geometry type equals point?

Поиск
Список
Период
Сортировка
От Roxanne Reid-Bennett
Тема Re: How to create a View of geometry type equals point?
Дата
Msg-id 010101901577d451-de668c7c-368a-42a8-b423-f41e080513d8-000000@us-west-2.amazonses.com
обсуждение исходный текст
Ответ на Re: How to create a View of geometry type equals point?  (Sándor Daku <daku.sandor@gmail.com>)
Список pgsql-novice

Create view polys as
Select * from <table> where ST_GeometryType(<geom>) = ‘ST_Polygon’;

Returns ST_Linestring, ST_Polygon, etc.

There is also GeometryType 

Roxanne

On Jun 13, 2024, at 9:36 PM, Sándor Daku <daku.sandor@gmail.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

В списке pgsql-novice по дате отправления:

Предыдущее
От: Sándor Daku
Дата:
Сообщение: Re: How to create a View of geometry type equals point?
Следующее
От: Simon Connah
Дата:
Сообщение: Database migrations