Skip to main content

Main navigation

  • Manual
  • Tutorials
  • Trainings
  • Conference
  • EN
    • DE
Table of contents

Programm

  • Handbook
    • Basics
      • Introduction
      • Basic workflow
    • Data model
      • Introduction
      • Data types
      • Depots
      • Layer
      • Views
    • Magazine
      • Introduction
      • Import data
      • Export data
      • Delete data
      • Edit data in the magazine
      • Supported file formats
    • Switchboard
      • Introduction
      • Principels
      • Disclaimer
      • Functions
      • Create new Switchboard
      • Shortcuts
      • Call Switchboard via API
    • Layer
      • Introduction
      • Create Layer
      • Update Layer automatically
      • Display options in the layer tree
      • Style Selection Window
      • Create contours for 3D city models
      • Layertypes
        • 2D Features
        • 3D Tiles
        • Address Search
        • Area search
        • Billboard (Cesium)
        • Billboard Tiles (Cesium)
        • External 3D Tiles
        • External Terrain
        • Files for Download
        • Map Service Relay
        • MapProxy (Raster data)
        • Oblique aerial images
        • PMTiles
        • Spherical panoramas
        • Terrain Proxy
        • Terrain
        • Tour
        • Universal JSON
        • WFS
    • Views
      • Introduction
      • View setup
      • Call a view
      • Publish a view
      • Freeze View
    • Workflow
      • What are Workflows?
      • Create a Workflow
      • Define input and output
      • Publishing Workflows
    • Viewer
      • PlexMap Viewer
      • Toolbox
      • PlexMap Planer
      • Shortcuts
    • User management
      • Create users and user groups
      • Rights management
      • Access for external users
      • Single Sign-on
    • FAQ
      • PlexMap 3D FAQ
      • Solar Energy Register FAQ
      • Green Roof cadastre FAQ

Funktionen

  • Functions
    • 2D
      • address
      • bbox
      • feature
      • grid
    • 3D
      • bbox3d
      • billboard
      • cityobject
      • ifcobject
      • oriented-image
      • mesh
      • oblique
      • pointcloud
      • spheres
    • Attributes
      • properties
      • row
    • Other
      • heatcalc
      • profile
      • solar
      • tour
    • Services
      • livedataset
      • ogcapicollection
      • osm
      • tileset
      • wfs
      • wms
      • wmts
    • Simple data types
      • color
      • datetime
      • math
      • string
      • style
    • System
      • depot
      • layer
      • switchboard
      • user
      • view
    • Tools
      • smapshot
      • assert
      • file
      • gen
      • mail
      • mapproxy
      • report
      • spatialfunctionobject
      • terrainproxy
    • glstyleservice
      • Import GL Style

Datentypen

  • Data types
    • Anything
      • Base-Model
        • Layer-Store-Config
        • Glstyleservice
    • Bbox
    • Bbox3d
    • Billboard
    • Bool
    • Color
    • Datetime
    • File
    • Grid
    • Label
    • Spatial-Function-Object
    • Number
    • Float
    • Int
    • Pointcloud
    • Feature
    • Schema-Feature
      • Address
      • Infiltration-Feature
      • Oriented-Image
      • Oblique-Trapeze
      • Panorama-Sphere
      • Region
      • Solar-Border
      • Solar-Building
      • Solar-Roof
    • CityObject
    • IfcObject
    • Mesh
      • Schema-Mesh
        • Heatcalc-Building
    • Row
    • Depot
    • Layer
    • Switchboard
    • View
    • String
      • Portal
      • Type
    • Style
Table of contents

Funktionen (LVL2)

  • Cast
    gen.cast
  • Choose by Condition
    gen.switch
  • Clone
    gen.clone
  • Compare
    gen.cmp
  • Concatenate
    gen.concat
  • Count
    gen.count
  • Create Index
    gen.index
  • Duplicates
    gen.duplicates
  • Enumerate
    gen.enumerate
  • Load JSON from file
    gen.from_json
  • Map
    gen.map
  • Negation
    gen.negate
  • Repeat
    gen.repeat
  • Replace
    gen.replace
  • Reverse Order
    gen.reverse
  • Sample
    gen.sample
  • Save as Text File
    gen.save_txt
  • Search
    gen.search
  • Selection
    gen.select
  • Set Compare
    gen.set_compare
  • Shuffle
    gen.shuffle
  • Sleep
    gen.delay
  • Sort
    gen.sort
  • Take Subset
    gen.take
  • Unique Objects
    gen.unique

Breadcrumb

  1. Manual
  2. Functions
  3. Namespaces
  4. gen
  5. Sample
Table of contents

Sample

  • gen.sample
Input:
  • objects – Anything
  • count – Int
  • seed – String
Output:
  • output – Anything

Returns a random subset from the given objects. The default behavior is to return a single random object. If you want to return more than one object, you can specify the count parameter.

The seed parameter can be used to make the random selection reproducible. If you want to select the same random object every time, you can specify the same seed.

© GEOPLEX

Footer navigation

  • Imprint
  • Privacy Policy
  • Geoplex
Typ
Wählen Sie einen beliebigen Filter und klicken Sie auf Anwenden, um Ergebnisse zu sehen