How to get geometry enabled Tables form Postgresql/postgis
Dear All,
How can i retrieve only spatial enabled tables form the
database(Postgresql/PostGIS).Please let me know.
I am waiting for your great response.
Thanks and Regards,
Venkat
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
All geometric columns in all spatially enabled tables appear in the
table public.geometry_columns, defined as:<br>
<br>
<pre>CREATE TABLE public.geometry_columns</pre>
<pre>(</pre>
<pre> f_table_catalog character varying(256) NOT NULL,</pre>
<pre> f_table_schema character varying(256) NOT NULL,</pre>
<pre> f_table_name character varying(256) NOT NULL,</pre>
<pre> f_geometry_column character varying(256) NOT NULL,</pre>
<pre> coord_dimension integer NOT NULL,</pre>
<pre> srid integer NOT NULL,</pre>
<pre> "type" character varying(30) NOT NULL,</pre>
<pre> CONSTRAINT geometry_columns_pk PRIMARY KEY (f_table_catalog, f_table_schema, f_table_name, f_geometry_column)</pre>
<pre>)</pre>
<pre>WITH (</pre>
<pre> OIDS=TRUE</pre>
<pre>);</pre>
<br>
For tables only, a simple <br>
<pre>SELECT DISTINCT f_table_schema, f_table_name FROM geometry_columns; </pre>
should do the trick. <br>
<br>
--Lee<br>
<br>
On 07/29/2010 08:58 AM, venkat wrote:
<blockquote
cite="mid:AANLkTi=xDoxzM_WZwpBh04zxqj=-GCdxjW1te7DPx3=s@mail.gmail.com"
type="cite"><font color="#3366ff"><span class="Apple-style-span"
style="color: rgb(0, 0, 0);"><font color="#3366ff">Dear All,</font>
<div><font color="#3366ff"><br>
</font></div>
<div><font color="#3366ff"><br>
</font></div>
<div><font color="#3366ff"> How can i retrieve only spatial
enabled tables form the database(Postgresql/PostGIS).Please let me
know. </font></div>
<div><font color="#3366ff"><br>
</font></div>
<div><font color="#3366ff">I am waiting for your great response.</font></div>
<div><font color="#3366ff"><br>
</font></div>
<div><font color="#3366ff">Thanks and Regards,</font></div>
<div><font color="#3366ff"><br>
</font></div>
<div><font color="#3366ff">Venkat</font></div>
</span></font></blockquote>
<br>
<pre class="moz-signature" cols="72">--
Lee Hachadoorian
PhD Student, Geography
Program in Earth & Environmental Sciences
CUNY Graduate Center
</pre>
</body>
</html>
Dear Lee,
Perfect ....Its working fine.... Thanks alot..
Thanks and Regards,
Venkat
On Fri, Jul 30, 2010 at 1:43 AM, Lee Hachadoorian <
lee.hachadoorian@gmail.com> wrote:
Show quoted text
All geometric columns in all spatially enabled tables appear in the table
public.geometry_columns, defined as:CREATE TABLE public.geometry_columns
(
f_table_catalog character varying(256) NOT NULL,
f_table_schema character varying(256) NOT NULL,
f_table_name character varying(256) NOT NULL,
f_geometry_column character varying(256) NOT NULL,
coord_dimension integer NOT NULL,
srid integer NOT NULL,
"type" character varying(30) NOT NULL,
CONSTRAINT geometry_columns_pk PRIMARY KEY (f_table_catalog, f_table_schema, f_table_name, f_geometry_column)
)
WITH (
OIDS=TRUE
);
For tables only, a simple
SELECT DISTINCT f_table_schema, f_table_name FROM geometry_columns;
should do the trick.
--Lee
On 07/29/2010 08:58 AM, venkat wrote:
Dear All,
How can i retrieve only spatial enabled tables form the
database(Postgresql/PostGIS).Please let me know.I am waiting for your great response.
Thanks and Regards,
Venkat
--
Lee Hachadoorian
PhD Student, Geography
Program in Earth & Environmental Sciences
CUNY Graduate Center