I've downloaded from the official repository the UTM 5x5 km grid of Spain and uploaded it to a PostgreSQL/PostGIS database (vv. 14 & 3.1.4).
I need to obtain the coordinates of every cell vertices, but my attempts using st_dumppoints()
return more than 4 points for each one:
select path, ST_AsText(geom) from (
select (st_dumppoints(geom)).* from referencia.malla_5x5_p) a
{1,1} "POINT(158179.43709999975 4135320.7804000005)"
{1,2} "POINT(158147.76989999972 4134822.7887999993)"
{1,3} "POINT(158144.77589999977 4134822.9791)"
{1,4} "POINT(158125.79449999984 4134824.1861000005)"
{1,5} "POINT(157646.78249999974 4134854.6448999997)"
{1,6} "POINT(157627.35280000046 4134855.8804)"
[...]
From the excellent contribution of @geozelot, I now know that I can't get the "four" vertices of each polygon but how could I get the intersection points of the UTM grid?