@dataforsyningen/saul 4.1.1 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -39,12 +39,14 @@ From within `node_modules/@dataforsyningen/saul` you can run the `test` command
39
39
  npm run test
40
40
  ```
41
41
 
42
- ## Publish NPM
42
+ ## Updating local terrain model
43
+
44
+ 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.
45
+
46
+ https://services.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&username=xxx&password=xxx&height=1000&width=1260&bbox=430000,6040000,900000,6413000
43
47
 
44
- Create a new release in Github to publish an updated NPM package.
45
- Details are available in the "Npm" section of SDFI ITU's wiki.
46
48
 
47
49
  ## Acknowledgements
48
50
 
49
51
  SAUL is made available under the MIT license by
50
- The Skråfoto Team @ [SDFI](https://sdfi.dk/)
52
+ The Skråfoto Team @ [KDS](https://kds.dk/)
Binary file
package/modules/api.js CHANGED
@@ -170,13 +170,7 @@ function getDHM(query, auth) {
170
170
  */
171
171
  function getSTAC(query, auth) {
172
172
  let requestUrl = `${auth.API_STAC_BASEURL}${query}`
173
- const queryStr = query.split('?')[1]
174
- if (queryStr) {
175
- requestUrl += `&token=${auth.API_STAC_TOKEN}`
176
- } else {
177
- requestUrl += `?token=${auth.API_STAC_TOKEN}`
178
- }
179
- return get(requestUrl)
173
+ return get(requestUrl, {headers: {token: auth.API_STAC_TOKEN}})
180
174
  .then((data) => data)
181
175
  }
182
176
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataforsyningen/saul",
3
- "version": "4.1.1",
3
+ "version": "4.2.0",
4
4
  "description": "This is a collection of stand-alone methods for photogrammetry calculations and API interactions for 'Danske Skråfotos'.",
5
5
  "main": "index.js",
6
6
  "type": "module",