vyperdatum.drivers.xyz
Attributes
Classes
Handle loading and parsing of a generic .xyz. |
Module Contents
- vyperdatum.drivers.xyz.logger
- class vyperdatum.drivers.xyz.XYZ(input_file: str, invalid_error: bool = True, skiprows: int | None = None, col_names: List[str] | None = None, negate_z: bool = False, unit_conversion: float = 1.0)
Bases:
vyperdatum.drivers.base.DriverHandle loading and parsing of a generic .xyz.
- invalid_error
If True, throws an error when the input file has an unexpected format.
- Type:
bool = True
- col_names
The names of the columns in the file. If None, defaults to [‘x’, ‘y’, ‘z’].
- Type:
Optional[List[str]] = None
- negate_z
If True, negates the z values in the file.
- Type:
bool = False
- unit_conversion
A factor to convert the z values to the desired unit.
- Type:
float = 1.0
- Pseudo Example
- --------
- >>> xyz = XYZZ('PATH_TO_NPZ_FILE')
- >>> df = xyz.transform(crs_from=crs_from, crs_to=crs_to, steps=steps)
- >>> print(df.head())
- >>> xyz.to_gpkg(crs=crs_to, output_file=output_file)
- input_file
- abstract wkt() str
Return wkt stored in the xyz file. Will raise NotImplementedError as xyz files do not have a dedicated attribute for WKT.
- 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.
- Parameters:
- Returns:
True if successful, otherwise False.
- Return type:
- property is_valid