Accessing Public Data Sources

PointClouds.jl aims to provide easy access to public databases of lidar point-cloud data. Several countries have commissioned projects to produce comprehensive lidar scans of their territory and make the resulting point-cloud data freely available. While these projects usually have an online interface to browse, query, and download their data, PointClouds.jl also includes such functionality. This makes it possible to write code that takes target coordinates as input and processes the local point-cloud data for any location covered by the available databases.

Querying the databases

The gettiles function sends a spatial query to the available data sources to obtain a list of point-cloud tiles that cover the area of interest.

PointClouds.DataSources.gettilesFunction
gettiles([src::DataSource]; lat, lon, limit = 100)

Query the available data sources or a specific source src for tiles of point-cloud data. This returns an array of PointCloudTiles, which only contain the database entries. These value can be passed to the LAS constructor to download and load the point data itself. They can also be passed to minimum/maximum/extent to get the coordinate range covered by each tile.

The lat and lon keyword arguments specify the latitude and longitude values for the spatial query, specified in the WGS 84 coordinate reference system, which is also used by GPS and many online maps. The query will search for tiles at a point, within a box, or within a polygon, depending on whether one, two, or multiple coordinate values are provided.

The limit argument specifies the maximum number of tiles that are requested from each data source. The APIs that are queried may have their own limits that cannot be exceeded (1000 for ScienceBase). Beyond those paging is required (i.e. requesting more results with an offset), which is not currently supported by gettiles.

source

Currently, PointClouds.jl supports downloading data from the USGS 3D Elevation Program (3DEP), which covers most of the continental United States. The DataSource argument of gettiles can be omitted for now, as ScienceBase is the only available option. Support for further databases is planned.

Downloading point-cloud data

Tiles can be passed to the LAS constructor to load the point-cloud data.

PointClouds.IO.LASMethod
LAS(t::PointCloudTile; kws...)

Load the point-cloud data of a PointCloudTile, downloading the file if necessary. Downloaded files are saved to the user’s cache directory as provided by BaseDirs.jl and loaded from there in the future.

source

USGS 3D Elevation Program (3DEP)

The USGS 3D Elevation Program (3DEP) aims to provide nationwide coverage of the United States with high-resolution lidar scans. The raw point-cloud data is made available in the ScienceBase catalog as the Lidar Point Cloud (LPC) dataset.

Note

The ScienceBase service does not always have the best availability. If the queries time out, check whether the ScienceBase catalog website is currently unavailable. If this is the case, try again later or fall back to manual browsing on the USGS file server. Note that other USGS services such as the 3DEP Lidar Explorer and TNM Access also depend on ScienceBase to function.

PointClouds.DataSources.ScienceBaseType
ScienceBase <: DataSource

Lidar Point Cloud (LPC) dataset in the ScienceBase catalog of the United States Geological Survey (USGS). This dataset contains raw point-cloud data produced as part of the USGS 3D Elevation Program (3DEP), which is approaching nationwide coverage of the United States.

According to the USGS website, “all 3DEP products are available free of charge and without use restrictions” (see also: Terms of Use for The National Map). Note however that the ScienceBase User Agreement asks API users “to adhere to practices of responsible use in accordance to web convention”.

Pass this type to the gettiles function to query the ScienceBase dataset. As per the query instructions, each query can return a maximum of 1000 items. You can also obtain the PointCloudTile of a specific ScienceBase item with ScienceBase(id), where the id can be obtained e.g. from the ScienceBase URL.

source