Package 'nycterrain'

Title: NYC Bare-Earth Terrain Elevation
Description: Bare-earth digital elevation model for New York City, derived from 2010 LiDAR. Provides 50-foot and 100-foot resolution rasters masked to the NYC borough boundaries, plus contour lines suitable for ggplot2 overlays.
Authors: Kieran Healy [aut, cre] (ORCID: <https://orcid.org/0000-0001-9114-981X>)
Maintainer: Kieran Healy <[email protected]>
License: MIT + file LICENSE
Version: 0.0.1.9000
Built: 2026-06-04 06:36:21 UTC
Source: https://github.com/kjhealy/nycterrain

Help Index


Get the NYC bare-earth elevation raster at 100ft or 50ft resolution

Description

Returns a terra::SpatRaster of bare-earth elevation in feet above sea level (NAVD88), masked to the New York City borough boundaries. The single layer is named elev. CRS is EPSG:2263 (NAD83 / New York Long Island, ftUS). Cells outside the city boundary are NA.

Usage

nyc_terrain_100ft()

nyc_terrain_50ft()

Details

These rasters are mean-aggregated from the City of New York's 1-foot Digital Elevation Model derived from 2010 LiDAR.

Value

A terra::SpatRaster with one layer (elev).

Examples

## Not run: 
library(terra)
r <- nyc_terrain_100ft()
plot(r)

# Hillshade with terra
slp <- terrain(r, "slope", unit = "radians")
asp <- terrain(r, "aspect", unit = "radians")
hs <- shade(slp, asp, angle = 35, direction = 315)
plot(hs, col = grey(0:100 / 100), legend = FALSE)

## End(Not run)

NYC bare-earth elevation contours

Description

Contour lines derived from the 100-foot bare-earth Digital Elevation Model. Useful as a lightweight elevation overlay for ggplot2 maps. EPSG:2263, NAD83 / New York Long Island (ftUS).

Usage

nyc_terrain_contours_sf

Format

nyc_terrain_contours_sf

A simple feature collection of multilinestrings:

elev_ft

Contour level, in feet above sea level (NAVD88).

geometry

MULTILINESTRING geometry in EPSG:2263.

Details

Contours are computed from the 100-foot mean-aggregated DEM via terra::as.contour() at 50 evenly spaced levels covering the city's elevation range. For higher-resolution work, derive your own contours from nyc_terrain_50ft.

Author(s)

Kieran Healy

Source

City of New York, 1-foot Digital Elevation Model (DEM): https://data.cityofnewyork.us/City-Government/1-foot-Digital-Elevation-Model-DEM-/dpc8-z3jc


Get the file path to a bundled NYC terrain GeoTIFF

Description

Returns the path to a GeoTIFF bundled with the package. Useful when you want to read the raster with another tool (e.g. stars, GDAL, rayshader) instead of terra.

Usage

nyc_terrain_path(resolution = c("100ft", "50ft"))

Arguments

resolution

Either "100ft" (default) or "50ft".

Value

A character string file path.

Examples

nyc_terrain_path()
nyc_terrain_path("50ft")