:py:mod:`starling_sim.basemodel.output.geojson_output` ====================================================== .. py:module:: starling_sim.basemodel.output.geojson_output .. autoapi-nested-parse:: This module contains tools for the generation of a geojson output, used for visualisation purposes, after the simulation run Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: starling_sim.basemodel.output.geojson_output.GeojsonOutput starling_sim.basemodel.output.geojson_output.GeojsonOutput1 starling_sim.basemodel.output.geojson_output.GeojsonOutput0 Functions ~~~~~~~~~ .. autoapisummary:: starling_sim.basemodel.output.geojson_output.new_geojson_output Attributes ~~~~~~~~~~ .. autoapisummary:: starling_sim.basemodel.output.geojson_output.ICON_LIST starling_sim.basemodel.output.geojson_output.CURRENT_GEOJSON_VERSION .. py:data:: ICON_LIST :value: ['user', 'user-01', 'user-02', 'user-03', 'user-04', 'user-05', 'user-06', 'user-07', 'user-08',... .. py:data:: CURRENT_GEOJSON_VERSION :value: 1 .. py:class:: GeojsonOutput Bases: :py:obj:`abc.ABC` Manage the generation of a geojson output, mainly for visualisation purposes. .. py:attribute:: VERSION :value: 'X.X.X' .. py:method:: setup(simulation_model, filename, folder) Set the values of the simulation model, topologies and outfile This setup method is called during simulation setup :param simulation_model: :param filename: :param folder: .. py:method:: set_information_factories(information_factories) .. py:method:: add_population_features(population=None) Build and add features for the given population, with additional information provided by the information factories. These are added to the features attributes, used to build the final FeatureCollection. If population is :param population: population key, population list or None. .. py:method:: add_element_feature(element) .. py:method:: init_element_feature(element) .. py:method:: add_factories_information() .. py:method:: generate_geojson() Write the geojson feature collection in a file. .. py:class:: GeojsonOutput1 Bases: :py:obj:`GeojsonOutput` Manage the generation of a geojson output, mainly for visualisation purposes. .. py:attribute:: VERSION :value: '1.0' .. py:method:: init_element_feature(element) Initialise a geojson feature for the element regarding its class. The current_feature attribute is set with a geojson feature or None. :param element: simulation element .. py:method:: add_factories_information() .. py:class:: GeojsonOutput0 Bases: :py:obj:`GeojsonOutput` Manage the generation of a geojson output, mainly for visualisation purposes. .. py:attribute:: VERSION :value: '0.1' .. py:method:: init_element_feature(element) .. py:function:: new_geojson_output() Create a new GeojsonOutput instance. Use the version provided in the 'geojson_version' field of parameters, and the default version if not provided. :return: GeojsonOutput instance