techmatters / soil-id-algorithm

GNU Affero General Public License v3.0
1 stars 0 forks source link

bug: surprising output when querying location that is in body of water #107

Open shrouxm opened 5 months ago

shrouxm commented 5 months ago

Description

When querying coordinates that are in a body of water, we sometimes output a list of possible soils. Ideally we would instead return successfully with an indication that the coordinates are in a body of water.

Steps To Reproduce

Query the algorithm with the following coordinates:

    {"lat": 46.43253, "lon": -111.52960},

Expected behavior

The algorithm should return a clear indication that the coordinates are in or near bodies of water.

Actual behavior

The algorithm returns with the following results (abbreviated):

{
  "metadata": {
    "location": "us",
    "model": "v3",
    "unit_measure": {
      "distance": "m",
      "depth": "cm",
      "cec": "cmol(c)/kg",
      "clay": "%",
      "rock_fragments": "cm3/100cm3",
      "sand": "%",
      "ec": "ds/m"
    }
  },
  "AWS_PIW90": 0.37,
  "Soil Data Value": [
    ["texture_0", 0.17763583231581648],
    ["texture_30", 0.0],
    ["rfv_class_0", 0.0],
    ["rfv_class_30", 0.0]
  ],
  "soilList": [
    {
      "id": {
        "name": "Musselshell1",
        "component": "Musselshell",
        "score_loc": 0.133,
        "rank_loc": "1"
      },
      "site": {
        "siteData": {
          "mapunitID": "664422",
          "componentID": "14208727",
          "componentKind": "Series",
          "dataSource": "STATSGO",
          "textureInfill": "No",
          "rfvInfill": "No",
          "componentPct": 30,
          "distance": 2942.40564140935,
          "minCompDistance": 2942.40564140935,
          "slope": 25.0,
          "nirrcapcl": "6",
          "nirrcapscl": "e",
          "nirrcapunit": "None",
          "irrcapcl": "None",
          "irrcapscl": "None",
          "irrcapunit": "None",
          "taxsubgrp": "Aridic Calciustepts",
          "sdeURL": "",
          "seeURL": ""
        },
        "siteDescription": ""
      },
      "esd": { "ESD": { "ecoclassid": "", "ecoclassname": "", "esd_url": "" } },
      "bottom_depth": {
        "0": 8,
        "1": 8,
        "2": 8,
        "3": 74,
        "4": 74,
        "5": 74,
        "6": 152,
        "7": 152
      },
      "sand": {
        "0": 39.2,
        "1": 39.2,
        "2": 39.2,
        "3": 43.0,
        "4": 43.0,
...

Additional context

I would consider this a lower priority issues, since users creating sites in bodies of water is not a high-prio use case.