I'm trying to import WKT (http://polygons.openstreetmap.fr/get_wkt.py?id=2413177¶ms=0 - boundary of one of districts of Łódź) into PostGIS database and convert it to geometry. I've created table 'districts' with 'the_geom geometry', id and name of the district. When I tried to insert data with
INSERT INTO districts (name, the_geom) VALUES ('Polesie', ST_GeomFromText('<<<WKT goes here>>>', 4326))
the the_geom field is left empty. In fact, even query like SELECT ST_GeomFromText('...', 4326)
returns empty query. I also tried to create text field in the table, insert WKT data in there and then run UPDATE districts SET the_geom=ST_GeomFromText('...', 4326)
but it doesn't work.
I tried to use query from http://www.postgis.org/docs/ST_GeomFromText.html and it worked.
Could anyone help me with this one? Am I doing something wrong, or the WKT is just too big?
Definition of my table:
CREATE TABLE dzielnice
(
name character varying(30),
the_geom geometry,
wkt text,
id bigserial NOT NULL,
CONSTRAINT dzielnice_pkey PRIMARY KEY (id),
CONSTRAINT dzielnice_id_key UNIQUE (id)
)
SELECT ST_GeomFromText('POINT (1 1)',4326);
does not return anything you must have something wrong in your installation.