R
R
Roman Rakzin2021-06-15 10:22:40
PostgreSQL
Roman Rakzin, 2021-06-15 10:22:40

How to store map coordinates in Postgresql?

Tell me, what is the best way to store the coordinates of points for maps in Postgresql, and is there a way to also store not a point, but an area?
The fact is that I want to do so that the person who wants to indicate the address would indicate the address (point or street), and the person who does not want to display the address could limit himself to the city.
How can this be done? Do you need several fields or can you do it in one field of the table?
Thanks

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Shitskov, 2021-06-15
@Zarom

Look towards PostGIS for geocoordinates https://postgis.net/

V
Vladimir Korotenko, 2021-06-15
@firedragon

Geosparital Explore this topic there are both points and polygons and much more

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question