Skip to main content

Vyperdatum with built-in regional datums, proj.db, and vdatum vector files.

Project description


PyPI version DOI Read the Docs

Vyperdatum

Vyperdatum [definition]

Installation

Vyperdatum requires GDAL which can be installed from the conda's conda-forge channel. Below, we first create a conda environment, install GDAL and Vperdatum.

conda create -n vd python=3.11
conda activate vd
conda install -c conda-forge gdal=3.8.4
conda install -c conda-forge python-pdal
pip install vyperdatum

Before running vyperdatum, you need to copy NOAA's datum files and the updated proj.db into the PROJ data directory [download link will be added here]. This process may get automated in the future. The Proj data directory path can be found here:

import pyproj as pp
pp.datadir.get_data_dir()

Usage

Vyperdatum offers a Transformer class to handle the transformation of point and raster data. The Transformer class applies transformation from crs_from to crs_to coordinate reference systems. The transformation steps can be prescribed manually or let the Pipeline class to infer:

from vyperdatum.transformer import Transformer
from vyperdatum.pipeline import Pipeline

crs_from = "EPSG:6346"
crs_to = "EPSG:6346+NOAA:5224"
tf = Transformer(crs_from=crs_from,
                 crs_to=crs_to,
                 steps=["EPSG:6346", "EPSG:6319", "EPSG:6318+NOAA:5224", "EPSG:6346+NOAA:5224"]
                 #  steps=Pipeline(crs_from=crs_from, crs_to=crs_to).transformation_steps()
                 )

Once an instance of the Transformer class is created, the transform() method can be called. Vyperdatum supports all GDAL-supported drivers, variable resolution BAG, LAZ and NPZ point-cloud files.

transform

tf.transform(input_file=<PATH_TO_INPUT_RASTER_FILE>,
             output_file=<PATH_TO_OUTPUT_RASTER_FILE>
             )

You may also, directly call the file-specific transform methods instead of the generic Transformer.transform() method:

Click to see pseudo-code examples
# dircet point transformation. x, y, z can be arrays, too.
x, y, z = 278881.198, 2719890.433, 0
xt, yt, zt = tf.transform_points(x, y, z, always_xy=True, allow_ballpark=False)

# GDAL-supported raster transform  
tf.transform_raster(input_file=<PATH_TO_INPUT_RASTER_FILE>,
                    output_file=<PATH_TO_OUTPUT_RASTER_FILE>
                    )

# VRBAG transform
tf.transform_vrbag(input_file=<PATH_TO_INPUT_VRBAG_FILE>,
                   output_file=<PATH_TO_OUTPUT_VRBAG_FILE>
                   )

# LAZ transform
tf.transform_laz(input_file=<PATH_TO_INPUT_LAZ_FILE>,
                 output_file=<PATH_TO_OUTPUT_LAZ_FILE>
                 )

# NPZ transform
tf.transform_npz(input_file=<PATH_TO_INPUT_NPZ_FILE>,
                 output_file=<PATH_TO_OUTPUT_NPZ_FILE>
                 )

Documentation

For a quick start, more detailed descriptions or search through the API, see Vyperdatums's documentation at: https://vyperdatum.readthedocs.io.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vyperdatum-0.3.14.tar.gz (194.2 kB view details)

Uploaded Source

Built Distribution

vyperdatum-0.3.14-py3-none-any.whl (237.4 kB view details)

Uploaded Python 3

File details

Details for the file vyperdatum-0.3.14.tar.gz.

File metadata

  • Download URL: vyperdatum-0.3.14.tar.gz
  • Upload date:
  • Size: 194.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.8

File hashes

Hashes for vyperdatum-0.3.14.tar.gz
Algorithm Hash digest
SHA256 8efdf245c7bd54ea20a8bbc39960ddc4596c4565b7b01338297a93a582f2ccd7
MD5 5f66b1ff950d7af8ae73943f08b9855b
BLAKE2b-256 c50163556eeabe2f1f37742f5a5af783ef323404749fe0185ab491d4b307ddcd

See more details on using hashes here.

File details

Details for the file vyperdatum-0.3.14-py3-none-any.whl.

File metadata

  • Download URL: vyperdatum-0.3.14-py3-none-any.whl
  • Upload date:
  • Size: 237.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.8

File hashes

Hashes for vyperdatum-0.3.14-py3-none-any.whl
Algorithm Hash digest
SHA256 d510dc562ad899dfb6e733b68f22bc4d358a0e8157e5c9cca53e080611840a84
MD5 60612afd4ad53dc3f4c234dfa95527a1
BLAKE2b-256 50cf739a48774d1c48e5757ed62ed6fb76d6cffd5af164e5e8858c6ffb5c1983

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page