Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sHygF-00BvJH-4L for pgsql-novice@arkaria.postgresql.org; Fri, 14 Jun 2024 04:36:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sHygA-00Cz1D-Qx for pgsql-novice@arkaria.postgresql.org; Fri, 14 Jun 2024 04:36:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sHygA-00Cz15-Fj for pgsql-novice@lists.postgresql.org; Fri, 14 Jun 2024 04:36:47 +0000 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sHyg4-001E9V-Oo for pgsql-novice@lists.postgresql.org; Fri, 14 Jun 2024 04:36:46 +0000 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2eaea316481so2171021fa.2 for ; Thu, 13 Jun 2024 21:36:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718339798; x=1718944598; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9Jv1h/df6wPlhvXJHnuGPUD+nGIJO14h1sRonpwgDd8=; b=Kgx0cEZUoKPIz4BLtTT5VmrvtwPplJC4/qhSUfjUgz1TmpbKfYZe4kO8okZlpY8O+2 1l37iVe3+KhsjSBy1xqmD3+X7mkmgctl6+DAZkeKvvikQmx8kljrEN2rP/cJ+n26fx3B EcFaY2sKOOA3/8HkdwE/K6VXtHIbrcvx70VasCiygJr0DI8VJzrb4VV9p47DVDPf76lL 97mxDNoHNwDGVXZ1EAc4sDgfNxx3BG9K83zwyLebiMXk+9zjufkuZ6QBT7dGnO6ZzmqV bvHSZplRFleKLSPFN21Mpo3/N7rWf+scq+De8WzbvLLHThaf3f0RUtVyie9XYaTMWGVg yEWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718339798; x=1718944598; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9Jv1h/df6wPlhvXJHnuGPUD+nGIJO14h1sRonpwgDd8=; b=UZuiNvEOSnuzT9eI8G7cK+dSJrsQRtPf5b3auxVRoLJIauhJIavWp/+j3Mv0cd0LLc i5ex6mzxEcXYPBjcBeuDpjAIN/u7zTbvoNia3wC1x9UQYtHAwmMcVciUXmKcDF0IZSoY S0hDerie6N37/UmIvnpOlyv76cbCWgrBipWShcRdTRB6ZQ+u18Ace5srJNPKNupy478P 9OlJubsUOS0F+yqO25m9eEsbg9PxzYQvs7l+5qG9hRI1PbHy8q5NWItavWKTBPP3NMN6 K/jK29MYSrfzdAUB8s/dGrMPXd9jEgFt1hJx3OuOutl8hwLoH5RsDnYW90dyhHoTe0Jh DSlg== X-Gm-Message-State: AOJu0YzCCglm4i78OUofv1PZusXQamuMQm/L6E58k7tz5K4ASF1eAj/1 SE8Xo0Ty83clRrD1SHTQm25EsLHgbeYttw22kdONY0lbVhLb16wHER2fp3moLPQuOVg6ZrDLwKw OmJrZsgCce4X8pHt5PCOwpUc4AP4TYQ== X-Google-Smtp-Source: AGHT+IE3aKRmEDn1Kq9CowuI5FwcfM5XVMHTTiM3jyPlXiypZH0Hgwx+QfettL0O0StcezARidLGdY65ZJDsJ3G0GDU= X-Received: by 2002:a2e:be9c:0:b0:2eb:e49c:45df with SMTP id 38308e7fff4ca-2ec0e5c37c6mr12152991fa.4.1718339797916; Thu, 13 Jun 2024 21:36:37 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?B?U8OhbmRvciBEYWt1?= Date: Fri, 14 Jun 2024 06:36:26 +0200 Message-ID: Subject: Re: How to create a View of geometry type equals point? To: Nicholas G Lawrence Cc: pgsql-novice@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000004222a2061ad229d1" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000004222a2061ad229d1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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) =3D 0 Regards, S=C3=A1ndor --0000000000004222a2061ad229d1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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 Pol= ygon)

What SELECT statement achieves this?

=

I'm no= t familiar with PostGIS, but based on a quick glance at the docs I think th= e ST_Dimension function is what you need. Something like: ...where ST_Dimen= sion(geometry_field) =3D 0


Regards,

S=C3=A1ndor

--0000000000004222a2061ad229d1--