I am new to DBA and PostGIS. I am developing an application using PostgreSQL and PostGIS where nearby locations need to be queried.
I created a sample table as below:
CREATE TABLE foo (geog geography);
Inserting like:
INSERT INTO foo (geog)
VALUES (ST_MakePoint(12.234,23.22));
But in some tutorials,insertion is like:
INSERT INTO foo (geog) VALUES (ST_SetSRID(ST_MakePoint(-122.079513,45.607703), 4326));
I can't clearly understand what ST_SetSRID
does.
What does it do?
Do I need to use it If I am going to find nearby places, etc?
If I should use it, what value should I go with in the place of 4326
?