Determine the centroid of multiple points

前端 未结 6 1747
甜味超标
甜味超标 2020-12-09 01:01

I\'m writing a mapping application that I am writing in python and I need to get the lat/lon centroid of N points. Say I have two locations

a.lat = 101
a.lon         


        
6条回答
  •  醉话见心
    2020-12-09 01:26

    Adding to Andrew Rollings' answer.

    You will also need to make sure that if you have points on either side of the 0/360 longitude line that you are measuring in the "right direction"

    Is the center of (0,359) and (0, 1) at (0,0) or (0,180)?
    

提交回复
热议问题