Skip to main content

Overview

In this section we demonstrate how to use the Geoconnex Reference Feature server API. We'll explore various use cases for working with hydrological and related spatial data. These use cases can be groups into three categories:

  1. Finding identifiers and spatial geometries for real-world features
  2. Finding features that are hydrologically related to a feature of interest (if that information is available)
  3. Finding datasets related to a feature of interest
tip

The R examples can also be found formatted as one longer Quarto notebook here

Throughout all examples, we will be using the following libraries/constants:

library(sf)
library(dplyr)
library(httr)
library(mapview)
library(jsonlite)
library(knitr)
library(DT)
base_url <- "https://reference.geoconnex.us"

Useful resources for Geoconnex queries

The Geoconnex reference feature server implements the OGC API - Features specification, and its full API documentation is available here for those who wish to explore its capabilities further than what is demonstrated in these examples.

Although we do not use them in these examples, there are additional client libraries that provide wrappers over the Geoconnex reference feature server API for easier querying.

  • HyRiver provides a Python client library and allows for queries by spatial areas, by ID, and using CQL filters. Documentation for using HyRiver with Geoconnex can be found here.
  • nhdplusTools is an R package for accessing and working with the NHDPlus and other US hydrographic data. It contains helper functions for working with Geoconnex.