Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bgr-apis

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bgr-apis

Soil quality API covering Germany with data from BGR

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

BGR Soil Information

The Bundesanstalt für Geowissenschaften und Rohstoffe (BGR) provides information on soil quality, types and other factors significant for agricultural use in Germany. As the information is solely available as a mapping service, this repo is aimed at providing a Node-JS client API to the information available.

Installation

Node.js / module bundlers

npm install bgr-apis

Browser

Download the minified file, and include it in a script tag. This will expose a global variable named bgr. This module requires the global variable turf exported from @turf/turf to be available, as well as browser support for the fetch API.

<script src="https://cdn.jsdelivr.net/npm/@turf/turf@5/turf.min.js"></script>
<script src="bgr.min.js" charset="utf-8"></script>

Methods

sqr(point,layer)

bgr.sqr({
  type: 'Point',
  coordinates: [6.9977272,50.778018]
}, 32)
.then(res => {
  // res = 72
})
.catch(err => {
  console.log(err)
})

Returns the soil quality rating (float) at a given point (see Mueller et al. (2007) for infomation on the SQR method).

Point can either be a GeoJSON point, an array of the form [lng, lat] or a GeoJSON feature (e.g. a plot). When a plot (GeoJSON feature) is entered, the centroid of the plot is used.

Optional parameters
layer You can specify another layer if you need information other than the soil quality index (defaults to 32)

LayerDescription (German)
32Soil Quality Index (default)
31Bewertung der Bodenarten
29Bewertung des Humusvorrats
27Bewertung der Bodenstruktur
25Bewertung der Packungsdichte
23Bewertung der effektiven Durchwurzelungstiefe
21Bewertung des Bodenwasserdargebots
19Bewertung des mittleren Grundwassertiefstands
17Bewertung der Hangneigung
15Bewertung der standörtlichen Bodengüte
12Bewertung der Versauerungsgefährdung
10Bewertung der Gründigkeit
8Bewertung der Trockenheitsgefährdung
6Bewertung des Steingehaltes im Wurzelraum
4Ertragslimitierende Faktoren
2Gefährdungsindikatorwerte

soilType(point)

bgr.soilType({
  type: 'Point',
  coordinates: [6.9977272,50.778018]
})
.then(res => {
  // res = 'Lehmsande (ls)'
})
.catch(err => {
  // handle errors
})

Returns the soil type (string, UTF-8, german) at a given point.
Possible categories are:

Soil Types
Reinsande (ss)
Lehmsande (ls)
Schluffsande (us)
Sandlehme (sl)
Normallehme (ll)
Tonlehme (tl)
Lehmschluffe (lu)
Tonschluffe (tu)
Schlufftone (ut)
Moore (mo)
Watt
Siedlung
Abbauflächen
Gewässer

Point can either be a GeoJSON point, an array of the form [lng, lat] or a GeoJSON feature (e.g. a plot). When a plot (GeoJSON feature) is entered, the centroid of the plot is used.

humusContent(point)

bgr.humusContent({
  type: 'Point',
  coordinates: [8.350689,52.087511]
})
.then(res => {
  // res = '2 - <3%'
})
.catch(err => {
  // handle errors
})

Return the humus content (string, UTF-8, german) for a given point. Possible categories are:

Humus content
1 - <2%
2 - <3%
3 - <4%
4 - <6%
6 - <8%
8 - <11,5%
11,5 - <15%
15 - <30%
≥30%
Wattflächen
Gewässerflächen
Siedlungen
Abbauflächen
nicht bestimmt

Point can either be a GeoJSON point, an array of the form [lng, lat] or a GeoJSON feature (e.g. a plot). When a plot (GeoJSON feature) is entered, the centroid of the plot is used.

Contribution

Contribution is highly appreciated 👍!
Please open an issue in case of questions / bug reports or a pull request if you implemented a new feature / bug fix.
In the latter case, please make sure to run npm test (and adapt test/test.js to your changes) and / or update the README 🙂

License

MIT @Christoph Pahmeyer

This software is crafted with :heart: at the University of Bonn - EMAS Group

Keywords

FAQs

Package last updated on 23 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc