Skip to main content

KyFromAbove LiDAR, DEM, and orthoimagery data access for Python

Project description

PyPI version Python versions CI License Docs

abovepy

KyFromAbove LiDAR, DEM, and orthoimagery data access for Python.

Kentucky's KyFromAbove program provides statewide 2ft DEMs, 3-inch orthoimagery, and COPC LiDAR point clouds — all publicly available on S3 with a STAC API for discovery. abovepy gives you Pythonic access to all of it. No credentials required.

Install

pip install abovepy

Optional extras:

pip install abovepy[lidar]    # COPC/LAZ point cloud support
pip install abovepy[viz]      # leafmap + matplotlib visualization
pip install abovepy[all]      # Everything

Quick Start

Search by county name

import abovepy

# Find DEM tiles covering Franklin County
tiles = abovepy.search(county="Franklin", product="dem_phase3")
print(tiles)

Search by bounding box

tiles = abovepy.search(
    bbox=(-84.9, 38.15, -84.8, 38.25),
    product="dem_phase3"
)

Download tiles

paths = abovepy.download(tiles, output_dir="./data")

Mosaic into a single raster

vrt = abovepy.mosaic(paths, output="frankfort.vrt")

Stream without downloading

data, profile = abovepy.read(
    tiles.iloc[0].asset_url,
    bbox=(-84.85, 38.18, -84.82, 38.21)
)

Explore available products

print(abovepy.info())
#   product        display_name                format  resolution  phase  crs
#   dem_phase1     DEM Phase 1 (5ft)           COG     5ft         1      EPSG:3089
#   dem_phase2     DEM Phase 2 (2ft)           COG     2ft         2      EPSG:3089
#   dem_phase3     DEM Phase 3 (2ft)           COG     2ft         3      EPSG:3089
#   ortho_phase1   Orthoimagery Phase 1 ...    COG     6in         1      EPSG:3089
#   ...

Available Products

Product Resolution Format Collection ID
dem_phase1 5ft COG dem-phase1
dem_phase2 2ft COG dem-phase2
dem_phase3 2ft COG dem-phase3
ortho_phase1 6 inch COG orthos-phase1
ortho_phase2 6 inch COG orthos-phase2
ortho_phase3 3 inch COG orthos-phase3
laz_phase1 Varies LAZ laz-phase1
laz_phase2 Varies COPC laz-phase2
laz_phase3 Varies COPC laz-phase3

All data is natively in EPSG:3089 (Kentucky Single Zone, US feet). abovepy accepts bounding boxes in EPSG:4326 by default.

ArcGIS Pro Toolbox

An ArcGIS Pro Python Toolbox is included in arcgis/AbovePro.pyt with tools for:

  • Find KyFromAbove Tiles — draw extent, pick product, see available tiles
  • Download Tiles — download with progress tracking
  • Download and Load — download + add to map in one step
  • DEM Hillshade — automated DEM → hillshade workflow
  • County Download — download by county name dropdown

See ArcGIS Pro Toolbox Guide for installation and usage.

Web Visualization

abovepy generates TiTiler-compatible URLs for web map integration:

from abovepy.titiler import cog_tile_url

url = cog_tile_url(
    cog_url=tiles.iloc[0].asset_url,
    titiler_endpoint="http://localhost:8000"
)
# Use with MapLibre GL JS or Leaflet

A docker-compose.yml for local TiTiler is in examples/.

Advanced: Direct STAC Access

For power users who need the full pystac-client:

client = abovepy.KyFromAboveClient()
stac_client = client.get_stac_client()

# Full pystac-client API
results = stac_client.search(
    collections=["dem-phase3"],
    bbox=(-84.9, 38.15, -84.8, 38.25),
    datetime="2022-01-01/..",
).item_collection()

Data Source

All data is provided by the KyFromAbove program, managed by the Kentucky Division of Geographic Information.

  • STAC API: https://spved5ihrl.execute-api.us-west-2.amazonaws.com/
  • S3 Bucket: s3://kyfromabove/ (public, us-west-2)
  • STAC Browser: kygeonet.ky.gov/stac

License

GPL-3.0 — see LICENSE.


Developed at the Kentucky Energy & Environment Cabinet

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

abovepy-0.1.0.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

abovepy-0.1.0-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file abovepy-0.1.0.tar.gz.

File metadata

  • Download URL: abovepy-0.1.0.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for abovepy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 afbdb164689cb0d405d82f9f492f38413ac9f764373ec782502d221e07e4def7
MD5 83f092e8f1d23063571be230b7b8ee94
BLAKE2b-256 c7754852f9b3d4b15b7793b908059e1a6b1fab020d743fb1055e24cf95977c13

See more details on using hashes here.

File details

Details for the file abovepy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: abovepy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for abovepy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1f5ece0be8cdb2808f4b96976b87205c39d1877700545af8383084e5b352341c
MD5 788e48e69c18b82102c39e534418ac75
BLAKE2b-256 9eb398dba83ee672760d088ee504cd78e7d7181599487f87f6ec2b05e8b51e68

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page