I have a problem on how I am able to retrieve a geometry data from postgres using geoserver. I am new to this. The latitude and longitude are on separate columns. So I'm trying to figure this out by concatenating this two columns at the same time converting their format with this SQL view like this.
SELECT *, ST_AsEWKB(ST_GeomFromText('POINT ('||latitude||' '||longitude||')',4326)) as geom FROM mytable
where latitude and longitude are columns in my database.
Now my the problem is that I can't see the points. Is there another way to make this solve?
Best Answer
I'm assuming that you have a table defined something like this:
What I would do, is to use the following query, for the GeoServer's Create new SQL View functionailty.
Using this, you can then publish the table as a layer, and then view the WMS in your preferd client.