[postgis-users] a question about post gis

Darafei "Komяpa" Praliaskouski me at komzpa.net
Thu Dec 6 01:49:22 PST 2018


Hi,

I once developed a custom solution for this that I don't have source code
for. Logic for that was the following:

1. unbuffer the polygon by 500m. Now the contour of the unbuffered polygon
is candidate center points.
2. find the most distant point on it. this is a creative task, I just took
a point that is start of ST_LongestLine(geom,geom).
3. record that point as your center.
4. update your shape as  geom = ST_Difference(geom, ST_Buffer(geom,
2*radius).
5. repeat from 2 until contour is empty.

(that's how provinces on ru.wargaming.net/globalmap are generated)

On Thu, Dec 6, 2018 at 1:53 AM Mahdi Kalhor <keloniton at gmail.com> wrote:

> Hello.
> I have read the documentation of post gis and i could not find the answer
> of my question. I want to pass a polygon to post gis and get the list of
> circles with radius=500 meters which can fill that polygon. I need to find
> the center of those circles. I need this for educational purpose for one of
> my papers. Any help is appreciated.
>
>
>
>
> Sincerely Yours
> Mahdi Kalhor
> Phd candidate in Urban Planning
> The Inventor Of GIS Dongle.
>
> my website: www.mahdikalhor.ir <http://www.mahdikalhor.gigfa.com>
>
>
>
> *Sleep tight Xerxes The Great. Your sons promise to revive *
> *Perspolis again, but not physically which can be burnt by *
> *another **Alexander, rather scientifically, which resurrects your *
>
>
>
> *name forever !!!*
> *"Try to be as generous as rain which fills all the empty bowls *
> *and never asks 'whose bowls are these?' " *
> *((Cyrus The Great)) *(Reference: Xenophon's Cyrus the Great: The Arts of
> Leadership and War,Xenophon)
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users



-- 
Darafei Praliaskouski
Support me: http://patreon.com/komzpa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20181206/722cbda8/attachment.html>


More information about the postgis-users mailing list