I want to create a regular grid of polygons/squares from this point knowing that between two successive points 100 meters, so each square would have 100*100 m2 in its area.
Asked
Active
Viewed 2,881 times
4
-
1SInce you have this tagged with PostgreSQL, I'm assuming you want to do this in SQL. If you take the Tour, you'll see that coding questions are expected to contain code. Please edit this question to include at least the query which results in the points, then start working on the insert component (hint: corners are at +/- half the side offsets) – Vince Apr 06 '16 at 00:59
1 Answers
6
Assuming that the coordinate system of your points uses meters, you can produce boxes centered around those points with ST_Expand. For example:
SELECT ST_AsText(ST_Expand('POINT (0 0)'::geometry, 4));
st_astext
--------------------------------------
POLYGON((-4 -4,-4 4,4 4,4 -4,-4 -4))
dbaston
- 13,048
- 3
- 49
- 81
