dotmap icon indicating copy to clipboard operation
dotmap copied to clipboard

Samples are biased

Open jeffkaufman opened this issue 9 years ago • 1 comments

In generating samples, makedots.py does:

for i in range(pop):
  while True:
    samplepoint = make_ogr_point( uniform(ll,rr), uniform(bb,tt) )
    if geom.Intersects( samplepoint ):
      break
  x, y = merc.LatLonToMeters( samplepoint.GetY(), samplepoint.GetX() )

This samples uniformly in lat-lng space, but that's not actually quite uniform over the surface of the globe since that's a sphere. I think it's too minor to be worth fixing, but it was still bugging me.

jeffkaufman avatar Sep 13 '16 18:09 jeffkaufman

Nice observation. If you can come up with a fix for that, go for it.

robert-chiniquy avatar Sep 19 '16 17:09 robert-chiniquy