onstove.OnStove.add_mask_layer#
- OnStove.add_mask_layer(path: str, category: str = 'Other', name: str = None, query: str = None, postgres: bool = False, save_layer: bool = False)#
Adds a vector layer to self.mask_layer.
This layer is used to mask all other layers.
- Parameters:
- category: str
Category the dataset.
- name: str
Name of the dataset.
- path: str
The relative path of the datafile. This file can be of any type that is accepted by geopandas.read_file.
- query: str, optional
A query string to filter the data. For more information refer to pandas.DataFrame.query.
- postgres: bool, default False
Whether to use a PostgreSQL database connection to read the layer from. The connection needs be already created and stored in the
conn
attribute using theset_postgres()
method.- save_layer: bool default False
Whether to save the dataset to disc or not
See also
mask_layer