@dataforsyningen/saul

中文文档
5.0.1发布于 2026/10/22MITES Module构建来源已验证近 30 天下载 2万

This is a collection of stand-alone methods for photogrammetry calculations and API interactions for 'Danske Skråfotos'.

原始使用文档
文档目录6 节
  1. Installation
  2. How to use
  3. API docs
  4. How to test
  5. Updating local terrain model
  6. Acknowledgements

SAUL

This is a collection of stand-alone methods for photogrammetry calculations and API interactions that are primarily used by https://github.com/Klimadatastyrelsen/skraafoto_frontend

You can use these as building blocks for your own web application that wants to interface with STAC API for Danske Skråfotos.

Installation

  1. Install via NPM:
npm i --save @dataforsyningen/saul
  1. Create a configuration file or Javascript object with proper values and make sure to load it into your application before using any of the SAUL utilities. This package ships with an example configuration file at config.js.example

How to use

This is an example of how to import and use those utilities in Javascript:

import auth from './config.js' // This is the path to your configuration file
import {getSTAC} from '@dataforsyningen/saul'

let response = await getSTAC('/some-stac-endpoint', auth)
console.log(response)

API docs

To read the docs, first build the documentation with JSDoc:

npm run docs

A docs directory will be created with a bunch of HTML files containing the documentation.

How to test

From within node_modules/@dataforsyningen/saul you can run the test command to check that saul core features are still working.

npm run test

Or if you have Docker, you may run the test in a container:

docker compose run --rm saul

Updating local terrain model

The Saul package includes a terrain elevation model hosted as a single GeoTiff file for events where terrain data from Datafordeler service is unavailable. To update the terrain model, simply download a new GeoTiff from Datafordeler with the following URL (supply your own username/password) and save it to /assets/dk-terrain.tiff in the package directory.

https://wcs.datafordeler.dk/DHMNedboer/dhm_wcs/1.0.0/WCS?SERVICE=WCS&COVERAGE=dhm_terraen&RESPONSE_CRS=epsg:25832&CRS=epsg:25832&FORMAT=GTiff&REQUEST=GetCoverage&VERSION=1.0.0&apikey=xxx&height=1000&width=1260&bbox=430000,6040000,900000,6413000

Acknowledgements

SAUL is made available under the MIT license by The Skråfoto Team @ KDS

版本与发布记录

@dataforsyningen/saul 共发布 26 个版本,首次发布于 2022/10/19;过去 12 个月发布了 5 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
5.0.1latest2026/10/2220 天前
5.0.1-betapre-release2026/10/2220 天前
5.0.1-alpha2026/10/2220 天前
5.0.02026/10/2121 天前
5.0.0-alpha2026/10/071 个月前
4.2.02025/01/081.8 年前

关于 @dataforsyningen/saul 的常见问题

@dataforsyningen/saul 是什么?

This is a collection of stand-alone methods for photogrammetry calculations and API interactions for 'Danske Skråfotos'.

如何安装 @dataforsyningen/saul?

在项目目录运行 npm install @dataforsyningen/saul,或使用 pnpm add / yarn add / bun add。

@dataforsyningen/saul 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/dataforsyningen__saul 是否存在。

@dataforsyningen/saul 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@dataforsyningen/saul 可以商用吗?

@dataforsyningen/saul 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@dataforsyningen/saul 的下载量有多少?

根据 npm 官方下载统计,@dataforsyningen/saul 在 2026/10/12 – 2026/11/10 这 30 天内被下载 19,765 次,日均约 659 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@dataforsyningen/saul 还在维护吗?

最新版本 5.0.1 发布于 2026/10/22(20 天前);至今共发布 26 个版本,其中过去 12 个月发布了 5 个;首次发布于 2022/10/19。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。