Jump to content

 
Photo

Center of gravity for points

- - - - -

  • Please log in to reply
4 replies to this topic

#1
frax

frax

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 2,309 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Interests:music, hiking, friends, nature, photography, traveling. and maps!
  • Sweden

Hi, I am investigating a little analysis, and what tools to use for that. I have a dataset with points (alternatively a grid/raster with 1/0 values) and I want to calculate the center of gravity for these, possibly with weights as well (optional).

Maybe one can even do that using some math in python/vba even?

I just checked ArcScripts, but I didn't find anything too valuable there...
Hugo Ahlenius
Nordpil - custom maps and GIS
http://nordpil.com/
Twitter

#2
frax

frax

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 2,309 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Interests:music, hiking, friends, nature, photography, traveling. and maps!
  • Sweden

Or is it as simple as just calculating the average x/y coords for the whole set? (with weights, if one desire that)
Hugo Ahlenius
Nordpil - custom maps and GIS
http://nordpil.com/
Twitter

#3
Hans van der Maarel

Hans van der Maarel

    CartoTalk Editor-in-Chief

  • Admin
  • PipPipPipPipPipPipPip
  • 3,881 posts
  • Gender:Male
  • Location:The Netherlands
  • Interests:Cartography, GIS, history, popular science, music.
  • Netherlands

Or is it as simple as just calculating the average x/y coords for the whole set? (with weights, if one desire that)


I think that would do the trick, yes.
Hans van der Maarel - Cartotalk Editor
Red Geographics
Email: hans@redgeographics.com / Twitter: @redgeographics

#4
Tim Stallmann

Tim Stallmann

    Contributor

  • Validated Member
  • PipPip
  • 18 posts
  • Location:Durham, NC, USA
  • United States

For a small area this will work, but otherwise I think there are some problems with just taking an average of the x/y values since depending on where the reference point of your coordinate system is you'll often end up choosing the midpoint of the longer great circle between two points rather than the shorter one. One fix is to calculate x/y/z values on the sphere, then average those points in 3D. You'll get a point somewhere inside the globe, but if you then trace a line from the center of the globe out through that point it will intersect at the centroid of the set.

Somebody has a write-up on this here: http://www.notionpar...ce-of-a-sphere/

-Tim

Or is it as simple as just calculating the average x/y coords for the whole set? (with weights, if one desire that)


I think that would do the trick, yes.



#5
frax

frax

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 2,309 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Interests:music, hiking, friends, nature, photography, traveling. and maps!
  • Sweden

Hi, thanks for the tips. Tim - is not a super small area, it is a region (Baltic Sea region), but I think I can choose a projection carefully and approximate with the planar x/y average. This is not for scientific stuff anyways.
Hugo Ahlenius
Nordpil - custom maps and GIS
http://nordpil.com/
Twitter




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->