@lists.sourceforge.net
Onderwerp: Re: [Geoserver-users] Non-geometrytype column
Just for the archives: I used the following SQL to add my table with
text as geometry to Geoserver as posted by David:
CREATE VIEW spatial_mytable AS SELECT id, name,
(ST_PointFromText('POINT(' || geometry
Hello,
Got an interesting question here at our company. Would it be possible to
get a table from a datasource like PostGIS or Oracle without a real
geometry column into Geoserver? The situation can be seen as one has a
table with ID, Name and Geometry, but the last colum is a normal
character
Would it be possible for you to use a VIEW?
CREATE VIEW spatial_mytable AS SELECT id, msg, ST_PointFromText(POINT( ||
coordinates || ), 4326) AS the_geom FROM mytable;
INSERT INTO geometry_columns(f_table_catalog, f_table_schema, f_table_name,
f_geometry_column, coord_dimension, srid, type)
[mailto:dwins...@opengeo.org]
Verzonden: dinsdag 12 juli 2011 14:48
Aan: Martijn Coenen
CC: geoserver-users@lists.sourceforge.net
Onderwerp: Re: [Geoserver-users] Non-geometrytype column
Would it be possible for you to use a VIEW?
CREATE VIEW spatial_mytable AS SELECT id, msg, ST_PointFromText