-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
237 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
local ahn = import 'ahn_new.libsonnet'; | ||
|
||
local id = 'AHN/AHN3'; | ||
local title = 'AHN3: Netherlands AHN 0.5m'; | ||
local description_detail = ||| | ||
AHN3 Dataset contains the Netherlands AHN 0.5m DSM and DTM variables. | ||
AHN3 was measured between 2014 and 2019. | ||
|||; | ||
local extent_from = '2014-01-01T00:00:00Z'; | ||
local extent_to = '2019-01-01T00:00:00Z'; | ||
ahn.ahn_dataset(id, title, description_detail, extent_from, extent_to) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
local ahn = import 'ahn_new.libsonnet'; | ||
|
||
local id = 'AHN/AHN4'; | ||
local title = 'AHN4: Netherlands AHN 0.5m'; | ||
local description_detail = ||| | ||
AHN4 Dataset contains the Netherlands AHN 0.5m DSM and DTM variables. | ||
AHN4 was measured between 2020 and 2022. | ||
|||; | ||
local extent_from = '2020-01-01T00:00:00Z'; | ||
local extent_to = '2022-01-01T00:00:00Z'; | ||
|
||
ahn.ahn_dataset(id, title, description_detail, extent_from, extent_to) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
local subdir = 'AHN'; | ||
|
||
local ee_const = import 'earthengine_const.libsonnet'; | ||
local ee = import 'earthengine.libsonnet'; | ||
local spdx = import 'spdx.libsonnet'; | ||
local units = import 'units.libsonnet'; | ||
|
||
local license = spdx.cc0_1_0; | ||
local self_ee_catalog_url(id) = | ||
ee_const.ee_catalog_url + std.strReplace(id, '/', '_'); | ||
|
||
{ | ||
ahn_dataset(id, title, description_detail, extent_from, extent_to):: { | ||
stac_version: ee_const.stac_version, | ||
type: ee_const.stac_type.collection, | ||
stac_extensions: [ | ||
ee_const.ext_eo, | ||
], | ||
id: id, | ||
title: title, | ||
'gee:type': ee_const.gee_type.image, | ||
description: ||| | ||
The Actueel Hoogtebestand Nederland (AHN) is a file with detailed and | ||
precise height data for the whole of the Netherlands. 3D height | ||
information was collected from helicopters and aircraft using laser | ||
technology. In this way, the height at ground level of every square metre | ||
in the Netherlands is known to an accuracy of 5 centimetres. Information | ||
is also available about buildings and vegetation. | ||
||| + description_detail + ||| | ||
|
||
The Digital Terrain Model (DTM) product represents the elevation of the | ||
ground, while the Digital Surface Model (DSM) product represents the | ||
elevation of the tallest surfaces at that point. | ||
|||, | ||
license: license.id, | ||
links: ee.standardLinks(subdir, id), | ||
keywords: [ | ||
'ahn', | ||
'dem', | ||
'elevation', | ||
'geophysical', | ||
'lidar', | ||
'netherlands', | ||
], | ||
providers: [ | ||
ee.producer_provider('AHN', 'https://www.ahn.nl'), | ||
ee.host_provider(self_ee_catalog_url(id)), | ||
], | ||
extent: ee.extent(3.35, 50.74, 7.24, 53.55, extent_from, extent_to), | ||
summaries: { | ||
gsd: [ | ||
0.5, | ||
], | ||
'eo:bands': [ | ||
{ | ||
name: 'dtm', | ||
description: 'Elevation of the ground', | ||
'gee:units': units.meter, | ||
}, | ||
{ | ||
name: 'dsm', | ||
description: 'Elevation of the tallest surfaces at that point', | ||
'gee:units': units.meter, | ||
}, | ||
], | ||
'gee:visualizations': [ | ||
{ | ||
display_name: 'AHN Netherlands', | ||
lookat: { | ||
lat: 52.39, | ||
lon: 4.78, | ||
zoom: 12, | ||
}, | ||
image_visualization: { | ||
band_vis: { | ||
min: [ | ||
0.0, | ||
], | ||
max: [ | ||
30.0, | ||
], | ||
bands: [ | ||
'dsm', | ||
], | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
'gee:terms_of_use': ||| | ||
The datasets of the AHN are available as Open Data. | ||
This means that the data can be used by anyone for free and without | ||
restrictions. For more information visit the | ||
[Open Data](https://www.ahn.nl/open-data/) page. Downloads are available | ||
under the terms of the | ||
[CC-0 license](https://data.overheid.nl/licenties-voor-hergebruik). | ||
|||, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var dataset = ee.Image('AHN/AHN3/AHN3_20140101'); | ||
var elevation = dataset.select('dsm'); | ||
var elevationVis = { | ||
min: -5.0, | ||
max: 30.0, | ||
}; | ||
Map.setCenter(5.76583, 51.855276, 16); | ||
Map.addLayer(elevation, elevationVis, 'AHN3 dsm'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
var image = ee.Image('AHN/AHN3/AHN3_20140101'); | ||
|
||
var greyBackground = ee.Image.constant([128, 128, 128]) | ||
.rename(['red', 'green', 'blue']) | ||
.visualize({ | ||
min: 0, | ||
max: 255, | ||
bands: ['red', 'green', 'blue'] | ||
}); | ||
|
||
var combinedImage = image.visualize({ | ||
bands: ['dsm', 'dtm', 'dsm'], | ||
min: 0, | ||
max: 30 | ||
}); | ||
|
||
// Merge the grey background with the combined image | ||
var finalImage = ee.ImageCollection([ | ||
greyBackground, | ||
combinedImage | ||
]).mosaic(); | ||
|
||
// Define the area of interest for the thumbnail | ||
var pixels = 256; | ||
var centerLon = 4.91; | ||
var centerLat = 52.34; | ||
var areaOfInterest = ee.Geometry.Rectangle( | ||
[centerLon - 0.02, centerLat - 0.02, centerLon + 0.02, centerLat + 0.02] | ||
); | ||
|
||
// Define thumbnail parameters | ||
var thumbnailParams = { | ||
dimensions: [pixels, pixels], | ||
region: areaOfInterest, | ||
crs: 'EPSG:4326', | ||
format: 'png' | ||
}; | ||
|
||
// Display the map | ||
Map.setCenter(centerLon, centerLat, 13); | ||
Map.addLayer(finalImage, {}, 'Combined DSM and DTM with Grey Background'); | ||
|
||
// Generate and display the thumbnail | ||
print('Combined DSM and DTM Thumbnail with Grey Background:'); | ||
print(ui.Thumbnail({ | ||
image: finalImage, | ||
params: thumbnailParams, | ||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var dataset = ee.Image('AHN/AHN4/AHN4_20200101'); | ||
var elevation = dataset.select('dsm'); | ||
var elevationVis = { | ||
min: -5.0, | ||
max: 30.0, | ||
}; | ||
Map.setCenter(5.76583, 51.855276, 16); | ||
Map.addLayer(elevation, elevationVis, 'AHN4 dsm'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
var image = ee.Image('AHN/AHN4/AHN4_20200101'); | ||
|
||
var greyBackground = ee.Image.constant([128, 128, 128]) | ||
.rename(['red', 'green', 'blue']) | ||
.visualize({ | ||
min: 0, | ||
max: 255, | ||
bands: ['red', 'green', 'blue'] | ||
}); | ||
|
||
var combinedImage = image.visualize({ | ||
bands: ['dsm', 'dtm', 'dsm'], | ||
min: 0, | ||
max: 30 | ||
}); | ||
|
||
// Merge the grey background with the combined image | ||
var finalImage = ee.ImageCollection([ | ||
greyBackground, | ||
combinedImage | ||
]).mosaic(); | ||
|
||
// Define the area of interest for the thumbnail | ||
var pixels = 256; | ||
var centerLon = 6.21; | ||
var centerLat = 52.13; | ||
var areaOfInterest = ee.Geometry.Rectangle( | ||
[centerLon - 0.02, centerLat - 0.02, centerLon + 0.02, centerLat + 0.02] | ||
); | ||
|
||
// Define thumbnail parameters | ||
var thumbnailParams = { | ||
dimensions: [pixels, pixels], | ||
region: areaOfInterest, | ||
crs: 'EPSG:4326', | ||
format: 'png' | ||
}; | ||
|
||
// Display the map | ||
Map.setCenter(centerLon, centerLat, 13); | ||
Map.addLayer(finalImage, {}, 'Combined DSM and DTM with Grey Background'); | ||
|
||
// Generate and display the thumbnail | ||
print('Combined DSM and DTM Thumbnail with Grey Background:'); | ||
print(ui.Thumbnail({ | ||
image: finalImage, | ||
params: thumbnailParams, | ||
})); |