I have a column named 'location' and it is of type geometry in my Postgres db. My table has a primary key, and my location srid is set to 4326. My insertion script contains st_geomfromtext('POINT(1.300966 103.838473)', 4326)
.
When I click on the viewer (the 'eye' icon) in pgAdmin, the map is not showing and I notice there is a lock icon for my location column in the table. All other columns do not have the lock icon.
Geometry viewer doesn't show map properly
Location column locked
What am I missing?
The issue is with your data. In PostGIS, coordinates are expressed as longitude first, then latitude.
You have inserted a point with latitude 103, which is out of the -90;90 domain of validity. How it is represented (or not) by various map viewers is another question (some fails, some will wrap around the earth, some will remove 90 etc), but the result can be considered as artistic.
==> try changing the order:
st_geomfromtext('POINT(103.838473 1.300966)', 4326)