Skip to main content

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Beta

The current list of use cases is a snap shot of what this page will contain in the future. The team is working on improving the use case pages to provide meaningful examples of how active WMA projects are using data and tools. Tell us about your experience using the catalog!

Use Cases


Dockerized Deployment of Data Services Through Pygeoapi

Keywords: pygeoapi

Domain: Domain Agnostic

Language: API

Description:

Using Pygeoapi to distribute custom analysis-ready data services to the public.


Dockerized Deployment of Custom Data Services Through Pygeoapi

Introduction/Background:
The Water Mission Area division of the USGS has numerous projects that are creating analysis-ready data for consumption by other scientists and the general public. Our team needed a way to make analysis-ready data available as custom geoprocessing services. The complex, geographical nature of our data and services seemed to fit well in a customizable Python server environment. We decided to use the open source Python server implementation Pygeoapi as our engine, along with custom-made service endpoints.

Implementation:
The NHGF team practices setting up all enterprise solutions as IAC (Infrastructure as Code). Our implementation uses Docker to manage the Pygeoapi environment. We deploy our Dockerized Pygeoapi using CDK (Amazon’s Cloud Development Kit) along with GitLab’s CI/CD deploy pipeline, where it is hosted in a cluster. The Pygeoapi project is developed and maintained by the open source geospatial community. Our team uses the pygeoapi code base and builds in a templated method of publishing additional custom API (Application Programming Interface) endpoints. This templated approach allows USGS software specialists to easily add any number of new custom API endpoints. Our CI/CD deployment process also ensures we stay up-to-date with the latest stable version of Pygeoapi. Our production Pygeoapi is at:
https://api.water.usgs.gov/nldi/pygeoapi

image

Our custom, analysis-ready data processing endpoints (NLDI Flow Trace process, NLDI Split Catchment process, NLDI xsatendpts process, and NLDI xsatpoint process) are here .