As a bonus challenge, try to compute the population center of Brazil :) One way of finding the center is minimizing the integral of all distances to a point, but for population, these points now have weight.
Like Michael above, I spent years working on Google Earth, and the code running in the latest Earth client app for doing label placement, polygon placement and center finding is my code. It's fun stuff! -- Marcin On Sat, Dec 7, 2019 at 11:05 AM JuciÊ Andrade <oju...@gmail.com> wrote: > Yes, I understand it is impossible to chose the "correct way" of > determining the center. This week I learnt there are at least a handful of > places claiming to be the "center" of Brazil, with monuments and whatnot. > > The search for a solution is an interesting endeavor per se. Programming > is supposed to be fun after all. > > Several things amazed me: > . the variety of proposed methods. A guy in Germany collected the position > and area of every county in Brazil and proceeded with the math. Another guy > proposed to draw a map on carton paper, cut it and find the center of > gravity. Etc; > . the rich geographical data available for anyone to use; > . the language packages and libraries to handle geographical data; > . the enviable knowledge some people have on the matter; > . the willing to learn a new topic just for the sake of it; > . the unwillingness to learn a new topic just for the sake of it; > > Anyway, it was a delightful experience. Thanks > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/26ee692b-1807-46cd-b211-90f07af9d631%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/26ee692b-1807-46cd-b211-90f07af9d631%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CA%2Bv29LsRcs66O7B7zq9xx%3DEbdJSHDZLty4Q1srE%3DXZW0VJhhxA%40mail.gmail.com.