Skip to content

Nodata issue #34

@giswqs

Description

@giswqs

I am trying to display an elevation dataset, but it seems pyvista-xarray somehow uses the nodata value as the minimum value to render the data, making it look like a long vertical column. Is it possible to specify a minimum value to prevent pyxarray from using the nodata value for rendering?

import rioxarray

da = rioxarray.open_rasterio("madison.tif")
da = da.rio.reproject("EPSG:3857")

# Grab the mesh object for use with PyVista
mesh = da[dict(band=0)].pyvista.mesh(x="x", y="y")

# plot in 3D
mesh.warp_by_scalar().plot()

image

Rendering the original lidar point cloud

import leafmap
leafmap.view_lidar('madison.las', cmap='terrain')

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions