@dataforsyningen/saul 4.1.0 → 4.1.1

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/config.js.example CHANGED
@@ -2,7 +2,7 @@ export default {
2
2
 
3
3
  // STAC TOKEN can be aquired from https://dataforsyningen.dk/
4
4
  API_STAC_TOKEN: "", // Dataforsyningen token
5
- API_STAC_BASEURL: "https://api.dataforsyningen.dk/rest/skraafoto_api/v1.0",
5
+ API_STAC_BASEURL: "https://api.dataforsyningen.dk/rest/skraafoto_api/v2",
6
6
 
7
7
  // DHM URL and auth can be aquired from https://datafordeler.dk/dataoversigt/danmarks-hoejdemodel-dhm/koter/
8
8
  API_DHM_WCS_BASEURL: "https://services.datafordeler.dk/DHMNedboer/dhm_wcs/1.0.0/WCS",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataforsyningen/saul",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
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",
@@ -1,9 +1,8 @@
1
1
  import auth from '../config.js'
2
- import { getElevation, visualizeGeotiff } from '../modules/saul-elevation.js'
3
- import { getImageXY, getWorldXYZ } from '../modules/saul-core.js'
4
- import { getDenmarkGeoTiff, consumeGeoTIFF } from '../modules/api.js'
2
+ import { getElevation, getDenmarkGeoTiff, visualizeGeotiff } from '../modules/elevation.js'
3
+ import { getImageXY, getWorldXYZ } from '../modules/image.js'
5
4
 
6
- const geoTiffResolution = 1000
5
+ const geoTiffResolution = 60
7
6
 
8
7
  const worldxy = [533344, 6172951] // World XY Point in all images near Vejle
9
8
  const image1xy = [8566,4105] // Point/Image XY in `image1`
@@ -44,11 +43,6 @@ function fetchImageData(imageId) {
44
43
  })
45
44
  }
46
45
 
47
- /*
48
- * Example request to get terrain data for all of DK
49
- * 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=QKJBQATHVS&password=ytxCA8UGM5n0Z*zi&height=1000&width=1000&bbox=430000,6040000,900000,6413000
50
- */
51
-
52
46
  console.log('-------------------------------------------------------')
53
47
  console.log('-- Experiments with pan-Danish GeoTiff terrain model --')
54
48
  console.log('-------------------------------------------------------')
@@ -66,10 +60,10 @@ It should
66
60
  */
67
61
 
68
62
  // Get GTiff from API
69
- // const DKGeoTiff = await getDenmarkGeoTiff({auth: auth, size: geoTiffResolution})
63
+ const DKGeoTiff = await getDenmarkGeoTiff({auth: auth, size: geoTiffResolution})
70
64
 
71
65
  // Get big GTiff
72
- const DKGeoTiff = await getDenmarkGeoTiff({src: 'http://localhost:7701/dk-terrain.tiff'})
66
+ //const DKGeoTiff = await getDenmarkGeoTiff({src: 'http://localhost:7701/dk-terrain.tiff'})
73
67
 
74
68
  // Get tiny GTiff
75
69
  //const DKGeoTiff = await getDenmarkGeoTiff({src: 'http://localhost:7701/tiny-dk-terrain.tiff'})
@@ -247,4 +241,4 @@ console.table({
247
241
 
248
242
  console.log('got DKGeotiff', (DKGeoTiff.source.arrayBuffer.byteLength / 1024), 'Kb', pointø)
249
243
 
250
- //visualizeGeotiff(DKGeoTiff)
244
+ visualizeGeotiff(DKGeoTiff)