public inbox for [email protected]  
help / color / mirror / Atom feed
From: Sándor Daku <[email protected]>
To: Nicholas G Lawrence <[email protected]>
Cc: [email protected]
Subject: Re: How to create a View of geometry type equals point?
Date: Fri, 14 Jun 2024 06:36:26 +0200
Message-ID: <CAKyoTgYyrrDCUL=G5DoiWByS9cO3uCBVHZa6CvotwYhvHq_BVQ@mail.gmail.com> (raw)
In-Reply-To: <SY6P282MB3816FC60EBF8F7E10D2CB99AD3C22@SY6P282MB3816.AUSP282.PROD.OUTLOOK.COM>
References: <SY6P282MB3816FC60EBF8F7E10D2CB99AD3C22@SY6P282MB3816.AUSP282.PROD.OUTLOOK.COM>

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


view thread (3+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: How to create a View of geometry type equals point?
  In-Reply-To: <CAKyoTgYyrrDCUL=G5DoiWByS9cO3uCBVHZa6CvotwYhvHq_BVQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox