random.md

January 12, 2021 ยท View on GitHub

Random Examples :

  • Random Position : Generates a random position, if bbox provided then the generated position will be in the bbox.
ArgumentTypeDescription
bboxlistBounding Box in which position to be generated
ReturnTypeDescription
positionlistA position as coordinates
from turfpy.random import random_position

random_position(bbox=[11.953125, 18.979025953255267, 52.03125, 46.558860303117164])
  • Random Points : Generates geojson random points, if bbox provided then the generated points will be in the bbox.
ArgumentTypeDescription
countintNumber of points to be generated, default value is one
bboxlistBounding Box in which points are to be generated
ReturnTypeDescription
pointsFeatureCollectionA FeatureCollection of generated points
from turfpy.random import random_points

random_points(count=3, bbox=[11.953125, 18.979025953255267, 52.03125, 46.558860303117164])