tracktable.data_generators.point module

Module contents

tracktable.data_generators.point - Ways to generate points around a seed point

tracktable.data_generators.point.random_box_uniform(min_corner, max_corner, num_points=100)[source]

Generate points uniformly within a bounding box

This will generate points according to a uniform random distribution within a specified bounding box.

Note that the uniformity is with respect to each dimension, not the underlying metric. You will only get spatially uniform points if (1) the bounding box is square and (2) the coordinate system is isotropic with respect to the underlying surface. Cartesian coordinate systems are such. Geographic coordinates (longitude/latitude) are not – the width of 1 degree of longitude changes as a function of latitude.

Parameters
  • min_corner (Tracktable point type) – lower left / SW corner of bounding box

  • max_corner (Tracktable point type) – upper right / NE corner of bounding box

  • num_points (int) – How many points you want

Returns

Iterable of points

tracktable.data_generators.point.random_circle_linear_falloff(seed_point, num_points=100, max_radius_km=100)[source]

Generate points within a certain radius of a seed point

Point density falls off linearly with distance from the seed point.

Note

Right now this function is specialized for terrestrial coordinates. That will be fixed in an upcoming point release.

Parameters
  • seed_point (tracktable.domain.terrestrial.BasePoint) – Center of point cloud

  • num_points (integer, default 100) – Number of points to generate

  • max_radius (float, non-negative) – How far the points can be from the center (default 100km)

Returns

Iterable of points of same type as seed point

Note

Formula from www.movable-type.co.uk/scripts/latlong.html