wolfhece.picc ============= .. py:module:: wolfhece.picc .. autoapi-nested-parse:: Author: HECE - University of Liege, Pierre Archambeau Date: 2024 Copyright (c) 2024 University of Liege. All rights reserved. This script and its content are protected by copyright law. Unauthorized copying or distribution of this file, via any medium, is strictly prohibited. Module Contents --------------- .. py:function:: bbox_creation(study_area_path) .. py:function:: adding_layer_to_zone(fn: pathlib.Path, bbox: shapely.geometry.Polygon = None, ZonesPicc: wolfhece.PyVertexvectors.Zones = None) Add other layers informations to the picc zones ! Need GEOREF_ID as principal "name" of the zone ! .. py:class:: Picc_data(idx: str = '', plotted: bool = True, mapviewer=None, need_for_wx: bool = False, data_dir: pathlib.Path = Path('./data/PICC'), bbox: Union[shapely.geometry.Polygon, list[float]] = None, filename_vector: str = 'PICC_Vesdre.shp', filename_point: str = 'PICC_Vesdre_points.shp') Bases: :py:obj:`wolfhece.drawing_obj.Element_To_Draw` .. autoapi-inheritance-diagram:: wolfhece.picc.Picc_data :parts: 1 :private-bases: Read and show PICC data -- see https://geoportail.wallonie.be/georeferentiel/PICC .. py:attribute:: data_dir .. py:attribute:: _filename_vector :value: 'PICC_Vesdre.shp' .. py:attribute:: _filename_points :value: 'PICC_Vesdre_points.shp' .. py:attribute:: zones :value: None .. py:attribute:: cloud :value: None .. py:attribute:: _colors .. py:attribute:: active_vector :value: None .. py:attribute:: active_zone :value: None .. py:method:: read_data(data_dir: pathlib.Path = None, bbox: Union[shapely.geometry.Polygon, list[float]] = None, colorize: bool = True) -> None Read data from PICC directory :param data_dir: directory where PICC data are stored :param bbox: bounding box to select data .. py:method:: read_vectors_cloud_picc(data_dir: pathlib.Path = None, path_vector: str = 'PICC_Vesdre.shp', path_points: str = 'PICC_Vesdre_points.shp', bbox: Union[shapely.geometry.Polygon, list[float]] = None, column: str = 'GEOREF_ID', additional_layers: bool = None) -> None Complete reading of the PICC files : vectors (.shp) and clouds (.shp). For the vectors, read any attributes that exist, a priori : ['NATUR_CODE', 'NATUR_DESC', 'PRECIS_XY', 'PRECIS_Z', 'TECH_LEVE','DATE_LEVE', 'DATE_CREAT', 'DATE_MODIF', 'DATE_TRANS', 'CODE_WALTO'] Pay attention, this uses directly Zone() but may be slow for a large raster. Use "create_zone_picc" .. py:method:: filter_by_name(path_vector: str, path_points: str, name: str = 'Habitation', bbox: Union[shapely.geometry.Polygon, list[float]] = None) Filter the PICC by a name of 'NATUR_DESC' attribute, and only keeps properties ['GEOREF_ID', 'NATUR_CODE', 'NATUR_DESC'] .. py:method:: create_zone_picc(path_vector: str = 'PICC_Vesdre.shp', path_points: str = 'PICC_Vesdre_points.shp', name: str = 'Habitation', bbox: Union[shapely.geometry.Polygon, list[float]] = None, column: str = 'GEOREF_ID') Complete reading of the PICC files : vectors (.shp) and clouds (.shp). For the vectors, read any attributes that exist, among ['NATUR_CODE', 'NATUR_DESC', 'PRECIS_XY', 'PRECIS_Z', 'TECH_LEVE','DATE_LEVE', 'DATE_CREAT', 'DATE_MODIF', 'DATE_TRANS', 'CODE_WALTO'] For now, path_points not used but may be useful later .. py:method:: plot(sx=None, sy=None, xmin=None, ymin=None, xmax=None, ymax=None, size=None) Plot data in OpenGL context :param sx: x scaling factor :param sy: y scaling factor :param xmin: minimum x value :param ymin: minimum y value :param xmax: maximum x value :param ymax: maximum y value :param size: size of the points .. py:method:: check_plot() Generic function responding to check operation from mapviewer .. py:method:: uncheck_plot(unload: bool = True, reset_filename: bool = False) Generic function responding to uncheck operation from mapviewer .. py:method:: show_properties() Showing properties of the object .. py:method:: Active_vector(vector_to_activate: wolfhece.PyVertexvectors.vector) Activate a vector .. py:method:: Active_zone(zone_to_activate: wolfhece.PyVertexvectors.zone) Activate a zone .. py:method:: extrude_polygons(dest_array) Extrude the active polygon along the z-axis .. py:class:: Cadaster_data(idx: str = '', plotted: bool = True, mapviewer=None, need_for_wx: bool = False, data_dir: pathlib.Path = Path('./data/Cadastre'), bbox: Union[shapely.geometry.Polygon, list[float]] = None) Bases: :py:obj:`Picc_data` .. autoapi-inheritance-diagram:: wolfhece.picc.Cadaster_data :parts: 1 :private-bases: Read and show cadaster data .. py:attribute:: _filename_vector :value: 'Cadastre.shp' .. py:attribute:: _filename_points :value: '' .. py:method:: read_data(data_dir: pathlib.Path = None, bbox: Union[shapely.geometry.Polygon, List[float]] = None, colorize: bool = True) -> None Read data from PICC directory :param data_dir: directory where PICC data are stored :param bbox: bounding box to select data