Hi Don,
I used the following command to enter the test geometry:
INSERT INTO atest(
the_geom)
VALUES (geomfromtext(‘POLYGON((480400 5967500,481400 5967500,481400 5968500,480400 5968500,480400 5967500))’,25832));
To create the table:
CREATE TABLE atest
(
gid serial NOT NULL,
fc character varying(50),
uri character varying(255),
rotation double precision DEFAULT 0,
txtrotation double precision DEFAULT 0,
txtdx double precision DEFAULT 0,
txtdy double precision DEFAULT 0,
fid integer DEFAULT 0,
editor integer DEFAULT 0,
constructor integer DEFAULT 0,
created date DEFAULT (‘now’::text)::date,
lastupdate date DEFAULT (‘now’::text)::date,
mandant integer DEFAULT 0,
parentinfo character varying(255),
parentformel integer DEFAULT 0,
parent character varying(50),
text01 character varying(50),
text02 character varying(50),
text03 character varying(50),
the_geom geometry,
CONSTRAINT atest_pk PRIMARY KEY (gid),
CONSTRAINT enforce_dims_the_geom CHECK (st_ndims(the_geom) = 2),
CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 25832)
)
WITH (
OIDS=FALSE
);
ALTER TABLE atest OWNER TO postgres;
– Index: atest_fid_idx
– DROP INDEX atest_fid_idx;
CREATE INDEX atest_fid_idx
ON atest
USING btree
(fid);
– Index: atest_geom_idx
– DROP INDEX atest_geom_idx;
CREATE INDEX atest_geom_idx
ON atest
USING gist
(the_geom);
That should work with Postgres 9.x.
Hope that helps.
Regards
Hardy