vyperdatum.drivers.xyz ====================== .. py:module:: vyperdatum.drivers.xyz Attributes ---------- .. autoapisummary:: vyperdatum.drivers.xyz.logger Classes ------- .. autoapisummary:: vyperdatum.drivers.xyz.XYZ Module Contents --------------- .. py:data:: logger .. py:class:: XYZ(input_file: str, invalid_error: bool = True, skiprows: Optional[int] = None, col_names: Optional[List[str]] = None, negate_z: bool = False, unit_conversion: float = 1.0) Bases: :py:obj:`vyperdatum.drivers.base.Driver` Handle loading and parsing of a generic .xyz. .. attribute:: input_file Full path to the xyz file. :type: str .. attribute:: invalid_error If True, throws an error when the input file has an unexpected format. :type: bool = True .. attribute:: skiprows The number of rows at the beginning of the file to ignore. :type: Optional[int] = None .. attribute:: col_names The names of the columns in the file. If None, defaults to ['x', 'y', 'z']. :type: Optional[List[str]] = None .. attribute:: negate_z If True, negates the z values in the file. :type: bool = False .. attribute:: unit_conversion A factor to convert the z values to the desired unit. :type: float = 1.0 .. attribute:: Pseudo Example .. attribute:: -------- .. attribute:: >>> xyz = XYZZ('PATH_TO_NPZ_FILE') .. attribute:: >>> df = xyz.transform(crs_from=crs_from, crs_to=crs_to, steps=steps) .. attribute:: >>> print(df.head()) .. attribute:: >>> xyz.to_gpkg(crs=crs_to, output_file=output_file) .. py:attribute:: input_file .. py:method:: wkt() -> str :abstractmethod: Return wkt stored in the xyz file. Will raise NotImplementedError as xyz files do not have a dedicated attribute for WKT. .. py:method:: transform(transformer_instance, output_file: str, pre_post_checks: bool, vdatum_check: bool) -> bool Apply point transformation on npz data according to the `transformer_instance`. :param transformer_instance: Instance of the transformer class. :type transformer_instance: vyperdatum.transformer.Transform :param output_file: The output file path where the transformed data will be saved. :type output_file: str :param vdatum_check: If True, performs vertical datum checks after transformation. :type vdatum_check: bool :returns: True if successful, otherwise False. :rtype: bool .. py:method:: to_npy(output_file: str) -> None .. py:method:: to_gpkg(crs: str, output_file: str) -> None .. py:property:: is_valid