@dataforsyningen/saul 3.5.0 → 3.6.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/modules/api.js CHANGED
@@ -229,7 +229,7 @@ function getTerrainGeoTIFF(stac_item, auth, resolution = 0.05, sizeX = 300) {
229
229
  url += `&width=${ width }`
230
230
  url += `&bbox=${ bbox[0]},${ bbox[1]},${ bbox[2]},${ bbox[3]}`
231
231
 
232
- return get(url, {}, false)
232
+ return get(url, {cache: 'force-cache'}, false)
233
233
  .then((response) => {
234
234
  return response.arrayBuffer()
235
235
  })
@@ -62,7 +62,7 @@ async function getElevation(x, y, geoTiff) {
62
62
  return elevation_data[0][0]
63
63
  }
64
64
 
65
- /** Creates an ASCII visualization of a terrain GeoTiff. Useful for display in a terminal.
65
+ /** Creates an ASCII visualization of a GeoTiff with terrain elevation data. Useful for display in a terminal.
66
66
  * NOTE: You may want to use a downsmapled GeoTiff to fit within your terminal window. A GeoTiff pixel is represented by 3 characters each.
67
67
  * @param {object} gTiff - GeoTiff output from getTerrainGeoTIFF() or getDenmarkGeoTiff() method
68
68
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataforsyningen/saul",
3
- "version": "3.5.0",
3
+ "version": "3.6.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",
@@ -37,7 +37,7 @@ function fetchKote(worldXY) {
37
37
  }
38
38
 
39
39
  function fetchImageData(imageId) {
40
- return fetch(`https://api.dataforsyningen.dk/rest/skraafoto_api/v1.0/search?limit=1&crs=http://www.opengis.net/def/crs/EPSG/0/25832&ids=${imageId}&token=e88d7be6754140025ebeb63d57e991ae`)
40
+ return fetch(`https://api.dataforsyningen.dk/rest/skraafoto_api/v1.0/search?limit=1&crs=http://www.opengis.net/def/crs/EPSG/0/25832&ids=${imageId}&token=${ auth.API_STAC_TOKEN }`)
41
41
  .then((response) => response.json())
42
42
  .then((data) => {
43
43
  return data.features[0]