I am reading the PostGIS in Action book now and I have a problem with one example:
I have created a table:
CREATE TABLE my_geometries (id serial NOT NULL PRIMARY KEY, name varchar(20));
I have added some points to this table:
SELECT AddGeometryColumn('public','my_geometries', 'my_points',-1,'POINT',2);
INSERT INTO my_geometries (name,my_points) VALUES ('Home',ST_GeomFromText('POINT(0 0)'));
INSERT INTO my_geometries (name,my_points) VALUES ('Pizza 1',ST_GeomFromText('POINT(1 1)')) ;
And some linestrings as well:
SELECT AddGeometryColumn ('public','my_geometries', 'my_linestrings',-1,'LINESTRING',2);
INSERT INTO my_geometries (name,my_linestrings) VALUES ('Linestring Open', ST_GeomFromText('LINESTRING(0 0,1 1,1 -1)'));
INSERT INTO my_geometries (name,my_linestrings) VALUES ('Linestring Closed', ST_GeomFromText('LINESTRING(0 0,1 1,1 -1, 0 0)'));
The problem is that for some reason I do not see the linestrings in the OpenLayers window of GeoServer, but all the points are on their place.
The GeoServer's 'Edit layer' page for my_workspace:my_geometries shows Feature Type Details having both my_points and my_linestrings columns.
What is the problem here? How can I see both points and linestrings that I have added to my database in GeoServer's OpenLayers window?