by Marc Compte
Last Updated January 11, 2019 12:22 PM - source

I am trying to expand a polygon in a particular manner with PostGIS. I need a new geometry that is a bit like a Buffer, except Buffer produces rounded corners (lots of vertices) when using it on a square and I need a new square whose sides are N meters away from the inner/original square (and still have only 4 vertices).

My first approach was to use a Buffer and then Simplify, but that is not producing the desired result.

I checked ST_Expand but this returns a BBOX, so it does not work either when the square is not perfectly N-S/E-W oriented nor will it work on irregular polygons.

I also looked into ST_Scale, but this uses a multiplying factor which I don't know how to find out based on a metric distance.

Another function I've looked into is ST_Affine to see if I can scale and translate in one go, but I got no clue how to find out the values I should use in this function.

I have searched and found out nothing. Has anyone done this with PostGIS? then, how?

- Serverfault Help
- Superuser Help
- Ubuntu Help
- Webapps Help
- Webmasters Help
- Programmers Help
- Dba Help
- Drupal Help
- Wordpress Help
- Magento Help
- Joomla Help
- Android Help
- Apple Help
- Game Help
- Gaming Help
- Blender Help
- Ux Help
- Cooking Help
- Photo Help
- Stats Help
- Math Help
- Diy Help
- Gis Help
- Tex Help
- Meta Help
- Electronics Help
- Stackoverflow Help
- Bitcoin Help
- Ethereum Help