USACE / USACE/cwms-data-api

Catalog Endpoint for Location doesn't respect the unit-system argument

Open
#1,534 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
28
Forks
25
Avg merge
4d 22h
Merged PRs (30d)
20

Description

During the documentation meeting the Catalog end-point was demoed

When requesting Locations in EN the results can include Locations with "m" Elevation.

For example, this query:

curl -X 'GET'
'https://cwms-data.usace.army.mil/cwms-data/catalog/LOCATIONS?unit-system=EN&office=SPK'
-H 'accept: application/json;version=2'

Includes in the response this location:
{
"office": "SPK",
"name": "Farmington Dam",
"nearest-city": "Oakdale",
"public-name": "Farmington Dam & Reservoir",
"long-name": "Farmington Pool Farmington Pool",
"description": "FRM - Farmington Dam Pool Elevation Station",
"kind": "PROJECT",
"time-zone": "US/Pacific",
"latitude": 37.915,
"longitude": -120.935,
"elevation": 54.860952000000005,
"unit": "m",
"vertical-datum": "NGVD29",
"nation": "United States",
"state": "CA",
"county": "San Joaquin",
"bounding-office": "SPK",
"active": true,
"aliases": [
{
"name": "Agency Aliases-NIDID",
"value": "CA10104"
}
]
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Catalog Locations endpoint using the documented curl request and inspect how the unit-system=EN argument is handled. Verify the Farmington Dam response and related locations, then confirm that elevation values and their unit are consistently converted for EN requests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.