← All procedures

geo.soilAtPoint

Give the soil at a point from USDA Soil Data Access (SSURGO): the major components of the map unit, with the septic rating, the slope, the drainage and the hydric rating

CLI
Package
@procedures/geo · README
Path
["geo","soilAtPoint"]
CLI
mark geo soilAtPoint --lat <number> --lon <number> --userAgent <string>
As data
{"$proc":["geo","soilAtPoint"],"input":{}}

Use it

In TypeScript

import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/geo/register"; // registers its procedures

const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["geo","soilAtPoint"], { lat: 1, lon: 1, userAgent: "<userAgent>" });
console.log(JSON.stringify(result));

From the command line

$ mark geo soilAtPoint --lat <number> --lon <number> --userAgent <string>

As data, in a program

{
  "$proc": ["geo", "soilAtPoint"],
  "input": { "lat": 1, "lon": 1, "userAgent": "<userAgent>" }
}

Input

FieldTypeRequiredDefaultDescription
latnumberyesThe latitude of the point, in degrees (WGS84)
lonnumberyesThe longitude of the point, in degrees (WGS84)
userAgentstringyesThe User-Agent that names your application and a contact. The policies of the public servers require it
timeoutMsintegernoThe time limit of the request, in milliseconds (default: 30000)

Output

FieldTypeRequiredDefaultDescription
componentsobject[]yesThe major components of the map unit at the point, the largest first. An empty list: the survey has no map unit at the point
attributionstringyesThe citation of the soil data (SSURGO, public domain)
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "lat": {
        "type": "number",
        "minimum": -90,
        "maximum": 90,
        "description": "The latitude of the point, in degrees (WGS84)"
      },
      "lon": {
        "type": "number",
        "minimum": -180,
        "maximum": 180,
        "description": "The longitude of the point, in degrees (WGS84)"
      },
      "userAgent": {
        "type": "string",
        "minLength": 3,
        "maxLength": 300,
        "pattern": "^[\\x20-\\x7e]+$",
        "description": "The User-Agent that names your application and a contact. The policies of the public servers require it"
      },
      "timeoutMs": {
        "description": "The time limit of the request, in milliseconds (default: 30000)",
        "type": "integer",
        "exclusiveMinimum": 0,
        "maximum": 120000
      }
    },
    "required": [
      "lat",
      "lon",
      "userAgent"
    ]
  },
  "output": {
    "type": "object",
    "properties": {
      "components": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "mukey": {
              "type": "string",
              "description": "The key of the map unit"
            },
            "mapUnit": {
              "type": "string",
              "description": "The name of the map unit"
            },
            "component": {
              "type": "string",
              "description": "The name of the component"
            },
            "percent": {
              "description": "The percent of the map unit that the component covers",
              "type": [
                "number",
                "null"
              ]
            },
            "septic": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "Not limited",
                    "Somewhat limited",
                    "Very limited"
                  ]
                },
                {
                  "type": "null"
                }
              ],
              "description": "The rating class for septic tank absorption fields"
            },
            "septicValue": {
              "description": "The septic rating from 0 (no limit) to 1 (the most limit)",
              "type": [
                "number",
                "null"
              ]
            },
            "slope": {
              "type": "object",
              "properties": {
                "low": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "representative": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "high": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "required": [
                "low",
                "representative",
                "high"
              ],
              "additionalProperties": false,
              "description": "The slope of the component, in percent"
            },
            "drainage": {
              "description": "The drainage class, for example Somewhat poorly drained",
              "type": [
                "string",
                "null"
              ]
            },
            "hydric": {
              "description": "The hydric rating: Yes, No or Unranked",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "mukey",
            "mapUnit",
            "component",
            "percent",
            "septic",
            "septicValue",
            "slope",
            "drainage",
            "hydric"
          ],
          "additionalProperties": false
        },
        "description": "The major components of the map unit at the point, the largest first. An empty list: the survey has no map unit at the point"
      },
      "attribution": {
        "type": "string",
        "description": "The citation of the soil data (SSURGO, public domain)"
      }
    },
    "required": [
      "components",
      "attribution"
    ],
    "additionalProperties": false
  }
}