Goal
Access and analyze Wyoming LiDAR elevation rasters directly from cloud storage without downloading the entire file first. Cloud Optimized GeoTIFFs (COGs) allow compatible GIS software and scripting tools to request only the portions of a raster needed for visualization or analysis, making large elevation datasets easier to use in desktop, scripted, and cloud-based workflows.
What Is a COG?
A Cloud Optimized GeoTIFF (COG) is a standard GeoTIFF organized internally for efficient access over the web. Instead of downloading a complete raster before it can be used, compatible software can request only the portions and resolutions needed for the current map view or analysis.
This makes COGs especially useful for large elevation datasets. You can preview a raster, inspect an area of interest, or perform supported raster operations directly against the cloud-hosted file while avoiding unnecessary transfer of the entire dataset.
Finding COG URLs
Wyoming LiDAR COGs are available through direct HTTPS URLs. Individual files can be located using the S3 Data Explorer, where you can browse the repository, navigate to the appropriate product folder, and copy or download individual files.
Example DTM COG URL:
https://wyolidar.s3.arcc.uwyo.edu/COG_Mosaic/dtm/W104N041_Deg_Cog.tif
For multiple files, use the Wyoming LiDAR Hub to select the desired raster products and choose Download URL list (.txt). The resulting text file contains direct URLs that can be used in scripts, GIS software, command-line tools, or automated workflows.
Recommended Workflow
Identify the raster or area of interest using the Wyoming LiDAR Hub or S3 Data Explorer.
Copy the direct HTTPS URL for a single COG, or create a URL list for multiple selected rasters.
Open the COG directly in compatible GIS software or reference the URL from Python, R, GDAL, or another raster-processing environment.
Visualize or analyze the raster remotely when supported by the software and operation.
Download the file locally only when your workflow requires a complete local copy or when repeated, intensive processing makes local access more practical.
ArcGIS Pro
ArcGIS Pro provides several ways to work with Wyoming LiDAR elevation data, including direct access to cloud-hosted rasters and REST image services. COGs can be incorporated into ArcGIS Pro workflows for visualization, analysis, and integration with other GIS datasets.
For more advanced or automated workflows, leveraging ArcPy within ArcGIS Pro unlocks additional possibilities for working with COG URLs, including scripted raster processing, batch operations, and integration into larger geoprocessing workflows.
Example COG URL:
https://wyolidar.s3.arcc.uwyo.edu/COG_Mosaic/dtm/W104N041_Deg_Cog.tif
Depending on the task, users can choose between working with the underlying COG files directly or connecting to Wyoming LiDAR REST image services for streamlined access to statewide elevation products.
QGIS
QGIS can open a remote COG directly from its HTTPS URL using GDAL's virtual file system. This allows the raster to be displayed without first downloading the entire file.
Use the following format:
/vsicurl/https://wyolidar.s3.arcc.uwyo.edu/COG_Mosaic/dtm/W104N041_Deg_Cog.tif
In QGIS, add the URL as a raster data source. QGIS and GDAL can then request the portions of the COG needed for the current map view.
Python: Read a COG Remotely and Get a Value at a Point
Python can access cloud-hosted COGs directly using Rasterio, which uses GDAL for raster access. By adding /vsicurl/ to the HTTPS URL, GDAL accesses the raster through its virtual file system and requests only the portions of the remote file needed for the operation rather than downloading the entire GeoTIFF first.
The example below opens a Wyoming LiDAR DTM COG directly from cloud storage, transforms a longitude and latitude point into the raster's coordinate system, and returns the elevation value at that location.
Requirements
This example requires the Rasterio and pyproj Python packages. If they are not already installed in your Python environment, install them with:
pip install rasterio pyproj
Example
import rasterio
from pyproj import Transformer
# Direct URL to a Wyoming LiDAR DTM Cloud Optimized GeoTIFF
cog_url = "https://wyolidar.s3.arcc.uwyo.edu/COG_Mosaic/dtm/W104N041_Deg_Cog.tif"
# Tell GDAL to access the COG remotely through its virtual file system
vsi_url = "/vsicurl/" + cog_url
# Example point in longitude and latitude
# Replace these coordinates with your location of interest
lon = -104.50
lat = 41.50
with rasterio.open(vsi_url) as src:
# Transform the longitude/latitude point into the raster's coordinate system
transformer = Transformer.from_crs(
"EPSG:4326",
src.crs,
always_xy=True
)
x, y = transformer.transform(lon, lat)
# Read the raster value at that location
value = list(src.sample([(x, y)]))[0][0]
print("Raster CRS:", src.crs)
print("Elevation value:", value)
The returned value represents the modeled bare-earth elevation stored in the DTM raster cell at that location. The full GeoTIFF does not need to be downloaded first; GDAL requests the raster data needed to answer the query directly from the cloud-hosted COG.
This same approach can be extended beyond a single point. Python workflows can use remote COGs to extract values for many locations, clip rasters to areas of interest, calculate statistics for polygons, or iterate through a URL list to process multiple elevation tiles without first downloading each complete raster.
R: Read a COG Remotely and Get a Value at a Point
R can work with a cloud-hosted COG directly using the terra package. The key option is vsi = TRUE, which tells terra/GDAL to access the raster through GDAL's virtual file system instead of requiring the GeoTIFF to be downloaded first.
The example below opens a Wyoming LiDAR DTM COG from its HTTPS URL, creates a point from longitude and latitude coordinates, projects that point into the raster's coordinate system, and returns the raster value at that location.
library(terra)
# Direct URL to a Wyoming LiDAR DTM Cloud Optimized GeoTIFF
cog_url <- "https://wyolidar.s3.arcc.uwyo.edu/COG_Mosaic/dtm/W104N041_Deg_Cog.tif"
# Open the COG remotely.
# vsi = TRUE allows terra/GDAL to read the raster over HTTPS.
dtm <- rast(cog_url, vsi = TRUE)
# Example point in longitude/latitude.
# Replace these coordinates with your location of interest.
point_lonlat <- data.frame(
lon = -104.50,
lat = 41.50
)
# Convert the coordinate table into a spatial vector.
point <- vect(
point_lonlat,
geom = c("lon", "lat"),
crs = "EPSG:4326"
)
# Project the point into the raster's coordinate system.
point_projected <- project(point, crs(dtm))
# Extract the DTM value at the point.
value <- extract(dtm, point_projected)
print(value)
The returned value represents the raster cell value at the point location. For a DTM, this is the modeled bare-earth elevation value stored in the raster. The exact units depend on the raster dataset.
GDAL
GDAL provides direct access to remote COGs using its /vsicurl/ virtual file system. This is useful for inspecting raster metadata, extracting subsets, converting formats, or incorporating COGs into command-line processing workflows.
Inspect the remote raster:
gdalinfo /vsicurl/https://wyolidar.s3.arcc.uwyo.edu/COG_Mosaic/dtm/W104N041_Deg_Cog.tif
Extract a geographic subset without first manually downloading the complete source raster:
gdal_translate \
-projwin xmin ymax xmax ymin \
/vsicurl/https://wyolidar.s3.arcc.uwyo.edu/COG_Mosaic/dtm/W104N041_Deg_Cog.tif \
subset.tif
Working with Multiple COGs
For workflows involving multiple rasters, create a URL list from the Wyoming LiDAR Hub. Each line in the text file represents a direct COG URL that can be read by a script, passed to GDAL-based tools, or used to build automated processing workflows.
Python example:
with open("dem_urls.txt", "r") as file:
urls = [line.strip() for line in file if line.strip()]
for url in urls:
print(f"Processing: {url}")
R example:
urls <- readLines("dem_urls.txt")
for (url in urls) {
print(paste("Processing:", url))
}
The URL list can therefore serve as more than a download manifest—it can also be used as direct input to automated raster analysis workflows.
When Should You Download the File?
Remote COG access is useful, but downloading locally may still be the better choice for some workflows. Consider keeping a local copy when:
You will repeatedly process the entire raster.
Your analysis requires many passes across the same data.
You need offline access.
Network speed or reliability is limited.
Your software or analysis operation does not efficiently support remote raster access.
For visualization, inspection, targeted subsets, and many scripted workflows, direct COG access can eliminate unnecessary downloads and simplify access to large elevation datasets.
Additional Notes
COGs are standard GeoTIFF files and can still be downloaded and used locally like any other GeoTIFF. Their advantage is that their internal structure also supports efficient partial access over HTTP when used with compatible software.
Performance depends on the software, analysis operation, network connection, raster size, and how the COG was created. Not every operation can be performed efficiently against a remote file, so local downloads may still be preferable for large or computationally intensive analyses.