We are working on a project that used shapefiles in order to build our first PostGIS database, through a tool called “PostGIS Shapefile Import/Export Manager”.
The problem is that now we need to create new tables onto that same PostGIS DB, through executing SQL commands line, as detailing bellow.
0 – VERSIONS:
a – PostGIS: 2.0.7 r13406
b – Geoserver: 2.12.1
1 – CREATING TABLE QUERY:
CREATE TABLE tabela (gid serial, nome varchar, geom geometry(Point, 32724));
2 – INSERTING A POINT QUERY:
INSERT INTO tabela (nome, geom) VALUES('Teste Renan', ST_GeomFromText('POINT(-40.388527 -20.339450)', 32724));
By inserting that point via command line, Geoserver cannot correctly calculate “Lat/Long Bounding Box”, when I press the “Compute from native bounds” button, at the “New Layer” screen.
It give strange values, denoting some problem.
P.S.: I have properly set up EPSG 32724 (WGS84 24S).
By doing this process, when I try to preview that specific layer, nothing appear.
Another strange thing that I have noticed is different values for GEOM field, for the “almost” same place:
a - When created by “PostGIS Shapefile Import/Export Manager”:
b – When created by command line:
Any thoughts on how to solve this problem or how to properly create the query for add point to TABELA table?