The USGS recently released high resolution elevation data as a lidar point cloud called USGS 3DEP in a public dataset on Amazon. This dataset is essential to build models of water flow and predict plant health and maize harvest.
The purpose of this package (usgslidar) is to produce an easy to use, reliable and well designed python module that domain experts and data scientists can use to fetch, visualise, and transform publicly available satellite and LIDAR data. In particular, it interfaces with USGS 3DEP and fetches data available in the s3 instance.
To build our pipeline we actually use PDAL under the hood. Since PDAL doesnt build properly with pip in the current version, you need to use conda to manage your dependencies.
- Install Anaconda
- In a conda environment install PDAL and python-pdal
conda install -c conda-forge pdal python-pdal
- Install usgslidar
pip install usgslidar
-
From the get_data module lets import the get_geopandas_dataframe module
from usgslidar.get_data import get_geopandas_dataframe
-
We will get back the elevation and geometry dataframe when we call the get_geopandas_dataframe function
elevation_df = get_geopandas_dataframe()
-
Lets now import the plot_3d_map function from the visualize module to help us plot the 3d map
from usgslidar.visualize import plot_3d_map
-
We can now plot the 3d map calling the function and passing in the elevation dataframe we got above
plot_3d_map(df=elevation_df)
-
We will get an output of a 3d plot like below that we can play around with