Esempio n. 1
0
def install_group():
    """Create the argument group for image parameters.

    This function is called automatically when the argument_groups
    module is loaded.

    """

    global GROUP_INSTALLED
    if GROUP_INSTALLED:
        return
    else:
        GROUP_INSTALLED = True

    create_argument_group("image",
                          title="Images",
                          description="Parameters for image size and resolution")

    add_argument("image", [ '--dpi' ],
                 nargs=1,
                 type=int,
                 default=72,
                 help='Dots per inch (DPI) for image.  This determines font height and line width.')

    add_argument("image", [ '--resolution' ],
                 nargs=2,
                 type=int,
                 default=[800,600],
                 help='Image resolution in pixels.')
Esempio n. 2
0
def install_group():
    """Create the argument group for image parameters.

    This function is called automatically when the argument_groups
    module is loaded.

    """

    global GROUP_INSTALLED
    if GROUP_INSTALLED:
        return
    else:
        GROUP_INSTALLED = True

    create_argument_group(
        "image",
        title="Images",
        description="Parameters for image size and resolution")

    add_argument(
        "image", ['--dpi'],
        nargs=1,
        type=int,
        default=72,
        help=
        'Dots per inch (DPI) for image.  This determines font height and line width.'
    )

    add_argument("image", ['--resolution'],
                 nargs=2,
                 type=int,
                 default=[800, 600],
                 help='Image resolution in pixels.')
Esempio n. 3
0
def install_group():
    """Standard method - define the Parallel Movie Rendering argument group"""

    global GROUP_INSTALLED
    if not GROUP_INSTALLED:
        GROUP_INSTALLED = True

        create_argument_group("parallel",
                              title="Multiprocess Parallelism",
                              description="Set the number of processes and (eventually) maximum memory that you want to use when running jobs in parallel.")
        add_argument("parallel",
                     [ "--processors" ],
                     type=int,
                     default=0,
                     help="How many processes to spawn.  The default value (0) means 'one process for each detected core on the system'.")
Esempio n. 4
0
def install_group():
    """Create the argument group for TrajectoryReader.

    This function is called automatically when the argument_groups
    module is loaded.

    """

    global GROUP_INSTALLED
    if GROUP_INSTALLED:
        return
    else:
        GROUP_INSTALLED = True

    create_argument_group("trajectory_reader",
                          title="Trajectory Reader",
                          description="Parameters for loading trajectories from delimited text files")

    add_argument("trajectory_reader", [ '--domain' ],
                 help='Specify point domain for data in file',
                 default='terrestrial')
Esempio n. 5
0
def install_group():
    """Create and populate the argument group for trajectory assembly.
    """

    global GROUP_INSTALLED
    if GROUP_INSTALLED:
        return
    else:
        GROUP_INSTALLED = True

    create_argument_group("trajectory_assembly",
                          title="Trajectory Builder Arguments",
                          description="Set the parameters that govern how we assemble sequences of time-stamped points into continuous trajectories.")

    add_argument("trajectory_assembly", ['--separation-distance'],
                 type=float,
                 default=100,
                 help='Start a new trajectory after a gap of this far between points (measured in KM)')

    add_argument("trajectory_assembly", ['--separation-time'],
                 type=float,
                 default=20,
                 help='Start a new trajectory after a gap of at least this long between points (measured in minutes)')

    add_argument("trajectory_assembly", ['--minimum-length'],
                 type=int,
                 default=10,
                 help='Only return trajectories that contain at least this many points')
def install_group():
    """Create the argument group for TrajectoryReader.

    This function is called automatically when the argument_groups
    module is loaded.

    """

    global GROUP_INSTALLED
    if GROUP_INSTALLED:
        return
    else:
        GROUP_INSTALLED = True

    create_argument_group(
        "trajectory_reader",
        title="Trajectory Reader",
        description=
        "Parameters for loading trajectories from delimited text files")

    add_argument("trajectory_reader", ['--domain'],
                 help='Specify point domain for data in file',
                 default='terrestrial')
Esempio n. 7
0
def install_group():
    """Create and populate the argument group for trajectory assembly.
    """

    global GROUP_INSTALLED
    if GROUP_INSTALLED:
        return
    else:
        GROUP_INSTALLED = True

    create_argument_group(
        "trajectory_assembly",
        title="Trajectory Builder Arguments",
        description=
        "Set the parameters that govern how we assemble sequences of time-stamped points into continuous trajectories."
    )

    add_argument(
        "trajectory_assembly", ['--separation-distance'],
        type=float,
        default=100,
        help=
        'Start a new trajectory after a gap of this far between points (measured in KM)'
    )

    add_argument(
        "trajectory_assembly", ['--separation-time'],
        type=float,
        default=20,
        help=
        'Start a new trajectory after a gap of at least this long between points (measured in minutes)'
    )

    add_argument(
        "trajectory_assembly", ['--minimum-length'],
        type=int,
        default=10,
        help='Only return trajectories that contain at least this many points')
Esempio n. 8
0
def install_group():
    """Standard method - define the Movie Rendering argument group"""

    global GROUP_INSTALLED
    if GROUP_INSTALLED:
        return
    else:
        GROUP_INSTALLED = True


    create_argument_group("movie_rendering",
                          title="Movie Parameters",
                          description="Movie-specific parameters such as frame rate, encoder options, title and metadata")

    add_argument("movie_rendering", [ "--encoder" ],
                 default="ffmpeg",
                 choices=[ "ffmpeg", "mencoder", "avconv", "imagemagick" ],
                 help="Which encoder to use.  NOTE: All options may not be available on all systems.")

    add_argument("movie_rendering", [ "--duration" ],
                 type=int,
                 default=60,
                 help="How many seconds long the movie should be")

    add_argument("movie_rendering", [ "--fps" ],
                 type=int,
                 default=30,
                 help="Movie frame rate in frames/second")

    add_argument("movie_rendering", [ "--start-time" ],
                 help="Start time for the movie in 'YYYY-MM-DD HH:MM:SS+XX' format (defaults to start time of data)")

    add_argument("movie_rendering", [ "--end-time" ],
                 help="End time for the movie in 'YYYY-MM-DD HH:MM:SS+XX' format (defaults to end time of data)")

    add_argument("movie_rendering", [ "--encoder-args" ],
                 default="-c:v mpeg4 -q:v 5",
                 help="Extra args to pass to the encoder (pass in as a single string)")

    add_argument("movie_rendering", [ "--utc-offset" ],
                 type=int,
                 help="UTC offset for displayed timestamp (will convert to local timezone)")

    add_argument("movie_rendering", [ "--timezone-label" ],
                 help="Timezone label to be added to clock")

    add_argument("movie_rendering", [ '--resolution', '-r' ],
                 nargs=2,
                 type=int,
                 help='Resolution of movie frames.  Defaults to 800 600.')

    add_argument("movie_rendering", [ '--dpi' ],
                 type=int,
                 default=72,
                 help='DPI of movie frames.')
def install_group():
    """Create the argument group for DelimitedTextPointReader.

    This function is called automatically when the argument_groups
    module is loaded.

    """

    global GROUP_INSTALLED
    if GROUP_INSTALLED:
        return
    else:
        GROUP_INSTALLED = True

    create_argument_group("delimited_text_point_reader",
                          title="Delimited Text Point Reader",
                          description="Parameters for parsing points from delimited text files")

    add_argument("delimited_text_point_reader", [ '--delimiter' ],
                 help='Character that separates fields in the input file.  Use any single character.  The string "tab" will be interpreted as the tab character.',
                 default=',' )

    add_argument("delimited_text_point_reader", [ '--comment-character' ],
                 help='Character that indicates comment lines in the input file.  Lines where this is the first non-whitespace character will be ignored.',
                 default='#' )

    add_argument("delimited_text_point_reader", [ '--domain' ],
                 help='Specify point domain for data in file',
                 default='terrestrial')

#    add_argument("delimited_text_point_reader", [ '--coordinate-column' ],
#                 nargs=2,
#                 action='append',
#                 help='Populate coordinate X using the contents of column Y.  You probably want to use "--x-column", "--y-column", "--longitude-column" and "--latitude-column" instead.')

    add_argument("delimited_text_point_reader", [ '--longitude-column' ],
                 type=int,
                 dest='coordinate0',
                 help="Use column N in the file for longitude values")

    add_argument("delimited_text_point_reader", [ '--latitude-column' ],
                 type=int,
                 dest='coordinate1',
                 help="Use column N in the file for latitude values")

    add_argument("delimited_text_point_reader", [ '--x-column' ],
                 type=int,
                 dest='coordinate0',
                 help="Use column N in the file for X coordinate values")

    add_argument("delimited_text_point_reader", [ '--y-column' ],
                 type=int,
                 dest='coordinate1',
                 help="Use column N in the file for Y values")

    add_argument("delimited_text_point_reader", [ '--z-column' ],
                 type=int,
                 dest='coordinate2',
                 help="Use column N in the file for Y values")

    add_argument("delimited_text_point_reader", [ '--string-field-column' ],
                 nargs=2,
                 action='append',
                 help='Populate field X using the contents of column Y as a string')

    add_argument("delimited_text_point_reader", [ '--numeric-field-column' ],
                 nargs=2,
                 action='append',
                 help='Populate field X using the contents of column Y as a number')

    add_argument("delimited_text_point_reader", [ '--time-field-column' ],
                 nargs=2,
                 action='append',
                 help='Populate field X using the contents of column Y as a timestamp')

    add_argument("delimited_text_point_reader", [ '--object-id-column' ],
                 help='Column in input files containing the ID associated with each moving object',
                 default=None,
                 type=int )

    add_argument("delimited_text_point_reader", [ '--timestamp-column' ],
                 help='Column in input file containing the timestamp for each point',
                 default=None,
                 type=int )
def install_group():
    """Standard method - define the Trajectory Rendering argument group"""

    global GROUP_INSTALLED
    if GROUP_INSTALLED:
        return
    else:
        GROUP_INSTALLED = True

    create_argument_group("trajectory_rendering",
                          title="Trajectory Appearance",
                          description="Parameters for trajectory color, linewidth and decoration")

    add_argument("trajectory_rendering", [ "--trajectory-color-type" ],
                 default="scalar",
                 choices=[ "scalar", "constant" ],
                 help="Whether to use a function or a constant to color trajectories")

    add_argument("trajectory_rendering", [ "--trajectory-color", "--trajectory-color-function" ],
                 default="progress",
                 help="Trajectory color.  This must be the name of a color or a hex string if --trajectory-color-type is 'constant' and the name of a function (options are {}) if --trajectory-color-type is 'scalar'.".format(annotations.available_annotations()))

    add_argument("trajectory_rendering", [ "--trajectory-colormap" ],
                 default="gist_heat",
                 help="Colormap to use to color trajectories.  Use one of the Matplotlib standard colormaps or one of Tracktable's color maps from tracktable.render.colormaps.")

    add_argument("trajectory_rendering", [ "--trajectory-zorder" ],
                 default=10,
                 type=int,
                 help="Z-order (layer) for rendered trajectories")

    add_argument("trajectory_rendering", [ "--decorate-trajectory-head" ],
                 action='store_true',
                 help="If set, draw a dot at the head of each trajectory")

    add_argument("trajectory_rendering", [ "--trajectory-head-dot-size" ],
                 type=int,
                 default=2,
                 help="Size (in points) of dot to render at the head of each trajectory.  Requires --decorate-trajectory-head.")

    add_argument("trajectory_rendering", [ "--trajectory-head-color" ],
                 default="white",
                 help="Color name for trajectory color.  You can also specify 'body' to use the same color as the first segment of the trajectory.")

    add_argument("trajectory_rendering", [ "--trajectory-linewidth" ],
                 default=0.5,
                 help="Trajectory linewidth in points.  You can also specify 'taper', in which case trajectory linewidth will start at the value of '--trajectory-initial-linewidth' and end at '--trajectory-final-linewidth'.")

    add_argument("trajectory_rendering", [ "--trajectory-initial-linewidth" ],
                 default=0.5,
                 type=float,
                 help="Initial trajectory linewidth in points.  Requires '--trajectory-linewidth taper'.")

    add_argument("trajectory_rendering", [ "--trajectory-final-linewidth" ],
                 default=0.01,
                 type=float,
                 help="Final trajectory linewidth in points.  Requires '--trajectory-linewidth taper'.")

    add_argument("trajectory_rendering", [ "--scalar-min" ],
                 default=0,
                 type=float,
                 help="Scalar value to map to bottom of colormap.  Requires '--trajectory-color-type scalar'.")

    add_argument("trajectory_rendering", [ "--scalar-max" ],
                 default=1,
                 type=float,
                 help="Scalar value to map to top of colormap.  Requires '--trajectory-color-type scalar'.")
Esempio n. 11
0
def install_group():
    """Register the Mapmaker argument group.

    This function is called when the argument_groups module is
    imported by dint of being listed in __init__.py.

    """

    global GROUP_INSTALLED
    if GROUP_INSTALLED:
        return
    else:
        GROUP_INSTALLED = True

    create_argument_group(
        "mapmaker",
        title="Create and annotate a geographic map",
        description=
        "Here you can set all of the options for creating and annotating your map.  These include asking for a predefined map of a region of the world, a map around an airport, a map of the whole world, whether or not to draw continents, country borders, state/province borders (in the US and Canada), cities and longitude/latitude lines.  The ability to specify a fully arbitrary map will come eventually."
    )

    add_argument(
        "mapmaker", ["--domain"],
        default="terrestrial",
        help=
        "Point domain for your data.  This should be 'terrestrial' if your points are in longitude/latitude format or 'cartesian' if your points are in regular 2D space."
    )

    add_argument(
        "mapmaker", ["--map"],
        default="world",
        dest='map_name',
        help=
        "Which map do you want to use?  This must be one of {} or else a string of the form 'airport:XXX' where XXX is the 3- or 4-letter abbreviation for that airport."
        .format(list(maps.available_maps()) + ["custom"]))

    add_argument("mapmaker", ["--omit-coastlines"],
                 action='store_false',
                 dest='draw_coastlines',
                 help='Do not draw coastlines on the map (drawn by default)')

    add_argument(
        "mapmaker", ["--omit-countries"],
        action='store_false',
        dest='draw_countries',
        help='Do not draw country borders on the map (drawn by default)')

    add_argument(
        "mapmaker", ["--omit-states"],
        action='store_false',
        dest='draw_states',
        help='Do not draw US/Canada state borders on the map (drawn by default)'
    )

    add_argument(
        "mapmaker", ['--omit-lonlat'],
        action='store_false',
        dest='draw_lonlat',
        help='Do not draw longitude/latitude lines (drawn by default)')

    add_argument("mapmaker", ['--lonlat-spacing'],
                 type=float,
                 default=10,
                 help="Spacing (in degrees) between longitude/latitude lines")

    add_argument("mapmaker", ['--draw-largest-cities'],
                 type=int,
                 help='Draw the N largest cities (by population) on the map')

    add_argument(
        "mapmaker", ['--draw-cities-larger-than'],
        type=int,
        help=
        'Draw all cities in the visible part of the map with population larger than N.'
    )

    add_argument("mapmaker", ['--city-label-size'],
                 type=int,
                 default=12,
                 help='Size for city names (in points)')

    add_argument("mapmaker", ['--city-dot-size'],
                 type=float,
                 default=2,
                 help='Size for dots representing cities (in points)')

    add_argument("mapmaker", ["--coastline-color"],
                 default="#808080",
                 help="Color for coastlines (either color name or hex string)")

    add_argument("mapmaker", ["--coastline-linewidth"],
                 default=1,
                 help="Width (in points) for coastlines")

    add_argument(
        "mapmaker", ["--coastline-zorder"],
        default=3,
        help="Layer (z-order) for coastlines - higher layers are on top")

    add_argument(
        "mapmaker", ["--country-color"],
        default="#606060",
        help="Color for country borders (either color name or hex string)")

    add_argument("mapmaker", ["--country-linewidth"],
                 default=0.5,
                 help="Linewidth (in points) for country borders")

    add_argument(
        "mapmaker", ["--country-zorder"],
        default=2,
        help="Layer (z-order) for coastlines - higher layers are on top")

    add_argument("mapmaker", ["--land-color"],
                 default="#303030",
                 help="Color for land masses (color name or hex string)")

    add_argument("mapmaker", ["--sea-color"],
                 default="#000000",
                 help="Color for bodies of water (color name or hex string)")

    add_argument(
        "mapmaker", ["--state-color"],
        default="#404040",
        help="Color for state borders (either color name or hex string")

    add_argument("mapmaker", ["--state-linewidth"],
                 default=0.3,
                 help="Line width (in points) for state borders")

    add_argument(
        "mapmaker", ["--state-zorder"],
        default=1,
        help="Layer (z-order) for state borders - higher layers are on top")

    add_argument("mapmaker", ['--city-label-size'],
                 type=int,
                 default=12,
                 help='Size for city names (in points)')

    add_argument("mapmaker", ['--city-dot-size'],
                 type=float,
                 default=2,
                 help='Size for dots representing cities (in points)')

    add_argument("mapmaker", ["--city-dot-color"],
                 default="white",
                 help="Color (name or hex string) for cities on map")

    add_argument("mapmaker", ["--city-label-color"],
                 default="white",
                 help="Color (name or hex string) for city labels on map")

    add_argument("mapmaker", ["--map-bbox"],
                 type=float,
                 nargs=4,
                 help="Custom bounding box for map")

    add_argument("mapmaker", ["--map-projection"],
                 default="mill",
                 help="Custom projection for map")

    add_argument("mapmaker", ["--map-scale-length"],
                 type=float,
                 default=None,
                 help="Length of map scale indicator in km")

    add_argument("mapmaker", ["--region-size"],
                 type=float,
                 nargs=2,
                 default=None,
                 help="Width of box for maps near airport")
Esempio n. 12
0
def install_group():
    """Standard method - define the Movie Rendering argument group"""

    global GROUP_INSTALLED
    if GROUP_INSTALLED:
        return
    else:
        GROUP_INSTALLED = True

    create_argument_group(
        "movie_rendering",
        title="Movie Parameters",
        description=
        "Movie-specific parameters such as frame rate, encoder options, title and metadata"
    )

    add_argument(
        "movie_rendering", ["--encoder"],
        default="ffmpeg",
        choices=["ffmpeg", "mencoder", "avconv", "imagemagick"],
        help=
        "Which encoder to use.  NOTE: All options may not be available on all systems."
    )

    add_argument("movie_rendering", ["--duration"],
                 type=int,
                 default=60,
                 help="How many seconds long the movie should be")

    add_argument("movie_rendering", ["--fps"],
                 type=int,
                 default=30,
                 help="Movie frame rate in frames/second")

    add_argument(
        "movie_rendering", ["--start-time"],
        help=
        "Start time for the movie in 'YYYY-MM-DD HH:MM:SS+XX' format (defaults to start time of data)"
    )

    add_argument(
        "movie_rendering", ["--end-time"],
        help=
        "End time for the movie in 'YYYY-MM-DD HH:MM:SS+XX' format (defaults to end time of data)"
    )

    add_argument(
        "movie_rendering", ["--encoder-args"],
        default="-c:v mpeg4 -q:v 5",
        help="Extra args to pass to the encoder (pass in as a single string)")

    add_argument(
        "movie_rendering", ["--utc-offset"],
        type=int,
        help=
        "UTC offset for displayed timestamp (will convert to local timezone)")

    add_argument("movie_rendering", ["--timezone-label"],
                 help="Timezone label to be added to clock")

    add_argument("movie_rendering", ['--resolution', '-r'],
                 nargs=2,
                 type=int,
                 help='Resolution of movie frames.  Defaults to 800 600.')

    add_argument("movie_rendering", ['--dpi'],
                 type=int,
                 default=72,
                 help='DPI of movie frames.')
Esempio n. 13
0
def install_group():
    """Register the Mapmaker argument group.

    This function is called when the argument_groups module is
    imported by dint of being listed in __init__.py.

    """

    global GROUP_INSTALLED
    if GROUP_INSTALLED:
        return
    else:
        GROUP_INSTALLED = True

    create_argument_group("mapmaker",
                          title="Create and annotate a geographic map",

                          description="Here you can set all of the options for creating and annotating your map.  These include asking for a predefined map of a region of the world, a map around an airport, a map of the whole world, whether or not to draw continents, country borders, state/province borders (in the US and Canada), cities and longitude/latitude lines.  The ability to specify a fully arbitrary map will come eventually.")

    add_argument("mapmaker", [ "--domain" ],
                 default="terrestrial",
                 help="Point domain for your data.  This should be 'terrestrial' if your points are in longitude/latitude format or 'cartesian' if your points are in regular 2D space.")

    add_argument("mapmaker", [ "--map" ],
                 default="world",
                 dest='map_name',
                 help="Which map do you want to use?  This must be one of {} or else a string of the form 'airport:XXX' where XXX is the 3- or 4-letter abbreviation for that airport.".format(list(maps.available_maps()) + ["custom"]))

    add_argument("mapmaker", [ "--omit-coastlines" ],
                 action='store_false',
                 dest='draw_coastlines',
                 help='Do not draw coastlines on the map (drawn by default)')

    add_argument("mapmaker", [ "--omit-countries" ],
                 action='store_false',
                 dest='draw_countries',
                 help='Do not draw country borders on the map (drawn by default)')

    add_argument("mapmaker", [ "--omit-states" ],
                 action='store_false',
                 dest='draw_states',
                 help='Do not draw US/Canada state borders on the map (drawn by default)')

    add_argument("mapmaker", [ '--omit-lonlat' ],
                 action='store_false',
                 dest='draw_lonlat',
                 help='Do not draw longitude/latitude lines (drawn by default)')

    add_argument("mapmaker", [ '--lonlat-spacing' ],
                 type=float,
                 default=10,
                 help="Spacing (in degrees) between longitude/latitude lines")

    add_argument("mapmaker", [ '--draw-largest-cities' ],
                 type=int,
                 help='Draw the N largest cities (by population) on the map')

    add_argument("mapmaker", [ '--draw-cities-larger-than' ],
                 type=int,
                 help='Draw all cities in the visible part of the map with population larger than N.')

    add_argument("mapmaker", [ '--city-label-size' ],
                 type=int,
                 default=12,
                 help='Size for city names (in points)')

    add_argument("mapmaker", [ '--city-dot-size' ],
                 type=float,
                 default=2,
                 help='Size for dots representing cities (in points)')

    add_argument("mapmaker", [ "--coastline-color" ],
                 default="#808080",
                 help="Color for coastlines (either color name or hex string)")

    add_argument("mapmaker", [ "--coastline-linewidth" ],
                 default=1,
                 help="Width (in points) for coastlines")

    add_argument("mapmaker", [ "--coastline-zorder" ],
                 default=3,
                 help="Layer (z-order) for coastlines - higher layers are on top")

    add_argument("mapmaker", [ "--country-color" ],
                 default="#606060",
                 help="Color for country borders (either color name or hex string)")

    add_argument("mapmaker", [ "--country-linewidth" ],
                 default=0.5,
                 help="Linewidth (in points) for country borders")

    add_argument("mapmaker", [ "--country-zorder" ],
                 default=2,
                 help="Layer (z-order) for coastlines - higher layers are on top")

    add_argument("mapmaker", [ "--land-color" ],
                 default="#303030",
                 help="Color for land masses (color name or hex string)")

    add_argument("mapmaker", [ "--sea-color" ],
                 default="#000000",
                 help="Color for bodies of water (color name or hex string)")

    add_argument("mapmaker", [ "--state-color" ],
                 default="#404040",
                 help="Color for state borders (either color name or hex string")

    add_argument("mapmaker", [ "--state-linewidth" ],
                 default=0.3,
                 help="Line width (in points) for state borders")

    add_argument("mapmaker", [ "--state-zorder" ],
                 default=1,
                 help="Layer (z-order) for state borders - higher layers are on top")

    add_argument("mapmaker", [ '--city-label-size' ],
                           type=int,
                           default=12,
                           help='Size for city names (in points)')

    add_argument("mapmaker", [ '--city-dot-size' ],
                           type=float,
                           default=2,
                           help='Size for dots representing cities (in points)')

    add_argument("mapmaker", [ "--city-dot-color" ],
                 default="white",
                 help="Color (name or hex string) for cities on map")

    add_argument("mapmaker", [ "--city-label-color" ],
                 default="white",
                 help="Color (name or hex string) for city labels on map")

    add_argument("mapmaker", [ "--map-bbox" ],
                 type=float,
                 nargs=4,
                 help="Custom bounding box for map")

    add_argument("mapmaker", [ "--map-projection" ],
                 default="mill",
                 help="Custom projection for map")

    add_argument("mapmaker", [ "--map-scale-length" ],
                 type=float,
                 default=None,
                 help="Length of map scale indicator in km")

    add_argument("mapmaker", [ "--region-size" ],
                 type=float,
                 nargs=2,
                 default=None,
                 help="Width of box for maps near airport")