enter image description here

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.

  • 1
    SInce 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 6 '16 at 0:59

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));

 POLYGON((-4 -4,-4 4,4 4,4 -4,-4 -4))
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.