Cross Section at Endpoints
Overview
The cross section at endpoints process (nldi-xsatendpts) constructs a
cross-sectional elevation transect between two user-provided points. Unlike
the single-point cross section
,
this process gives full control over both ends of the transect. It samples
3DEP elevation data at a configurable resolution along the connecting line.
How It Works
- The user supplies two coordinates as paired
latandlonarrays, defining the endpoints of the transect. - The user specifies
numpts(the number of elevation sample points along the transect) and optionally3dep_res(the 3DEP elevation data resolution in meters: 1, 3, 5, 10, or 30; default is 10). - The process samples elevation data at evenly spaced points along the straight line between the two endpoints.
- The process returns a JSON response containing the elevation profile.
Because the algorithm operates on user-specified endpoints, it can represent features such as:
- Wide channel sections
- Floodplain cross sections
- Custom transects for modeling or design
Example Request
Construct a cross section with 101 points between two endpoints in Colorado, using 1-meter 3DEP elevation data:
POST https://api.water.usgs.gov/nldi/pygeoapi/processes/nldi-xsatendpts/execution?f=json
Content-Type: application/json
{
"inputs": {
"lat": [40.26772, 40.270568],
"lon": [-103.801086, -103.80097],
"numpts": 101,
"3dep_res": 1
}
}
3dep_res controls the resolution of the 3DEP elevation data used for
sampling. Available resolutions are 1, 3, 5, 10, and 30 meters. Higher
resolution (lower number) provides finer detail but may increase processing
time. The default is 10 meters.
Explore the Full Parameter Schema
The pygeoapi process description provides the complete parameter schema:
/processes/nldi-xsatendpts?f=json