wolfhece.picc

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

wolfhece.picc.bbox_creation(study_area_path)[source]
wolfhece.picc.adding_layer_to_zone(fn: pathlib.Path, bbox: shapely.geometry.Polygon = None, ZonesPicc: wolfhece.PyVertexvectors.Zones = None)[source]

Add other layers informations to the picc zones ! Need GEOREF_ID as principal “name” of the zone !

class wolfhece.picc.Picc_data(idx: str = '', plotted: bool = True, mapviewer=None, need_for_wx: bool = False, data_dir: pathlib.Path = Path('./data/PICC'), bbox: shapely.geometry.Polygon | list[float] = None, filename_vector: str = 'PICC_Vesdre.shp', filename_point: str = 'PICC_Vesdre_points.shp')[source]

Bases: wolfhece.drawing_obj.Element_To_Draw

Inheritance diagram of wolfhece.picc.Picc_data

Read and show PICC data – see https://geoportail.wallonie.be/georeferentiel/PICC

data_dir[source]
_filename_vector = 'PICC_Vesdre.shp'[source]
_filename_points = 'PICC_Vesdre_points.shp'[source]
zones = None[source]
cloud = None[source]
_colors[source]
active_vector = None[source]
active_zone = None[source]
read_data(data_dir: pathlib.Path = None, bbox: shapely.geometry.Polygon | list[float] = None, colorize: bool = True) None[source]

Read data from PICC directory

Parameters:
  • data_dir – directory where PICC data are stored

  • bbox – bounding box to select data

read_vectors_cloud_picc(data_dir: pathlib.Path = None, path_vector: str = 'PICC_Vesdre.shp', path_points: str = 'PICC_Vesdre_points.shp', bbox: shapely.geometry.Polygon | list[float] = None, column: str = 'GEOREF_ID', additional_layers: bool = None) None[source]

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”

filter_by_name(path_vector: str, path_points: str, name: str = 'Habitation', bbox: shapely.geometry.Polygon | list[float] = None)[source]

Filter the PICC by a name of ‘NATUR_DESC’ attribute, and only keeps properties [‘GEOREF_ID’, ‘NATUR_CODE’, ‘NATUR_DESC’]

create_zone_picc(path_vector: str = 'PICC_Vesdre.shp', path_points: str = 'PICC_Vesdre_points.shp', name: str = 'Habitation', bbox: shapely.geometry.Polygon | list[float] = None, column: str = 'GEOREF_ID')[source]

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

plot(sx=None, sy=None, xmin=None, ymin=None, xmax=None, ymax=None, size=None)[source]

Plot data in OpenGL context

Parameters:
  • sx – x scaling factor

  • sy – y scaling factor

  • xmin – minimum x value

  • ymin – minimum y value

  • xmax – maximum x value

  • ymax – maximum y value

  • size – size of the points

check_plot()[source]

Generic function responding to check operation from mapviewer

uncheck_plot(unload: bool = True, reset_filename: bool = False)[source]

Generic function responding to uncheck operation from mapviewer

show_properties()[source]

Showing properties of the object

Active_vector(vector_to_activate: wolfhece.PyVertexvectors.vector)[source]

Activate a vector

Active_zone(zone_to_activate: wolfhece.PyVertexvectors.zone)[source]

Activate a zone

extrude_polygons(dest_array)[source]

Extrude the active polygon along the z-axis

class wolfhece.picc.Cadaster_data(idx: str = '', plotted: bool = True, mapviewer=None, need_for_wx: bool = False, data_dir: pathlib.Path = Path('./data/Cadastre'), bbox: shapely.geometry.Polygon | list[float] = None)[source]

Bases: Picc_data

Inheritance diagram of wolfhece.picc.Cadaster_data

Read and show cadaster data

_filename_vector = 'Cadastre.shp'[source]
_filename_points = ''[source]
read_data(data_dir: pathlib.Path = None, bbox: shapely.geometry.Polygon | List[float] = None, colorize: bool = True) None[source]

Read data from PICC directory

Parameters:
  • data_dir – directory where PICC data are stored

  • bbox – bounding box to select data