Skip to content

Commit

Permalink
Add DD for AHN3 and AHN4 datasets
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 705431909
  • Loading branch information
Google Earth Engine Community Authors authored and copybara-github committed Dec 13, 2024
1 parent a9c18b7 commit b695b0b
Show file tree
Hide file tree
Showing 8 changed files with 237 additions and 0 deletions.
11 changes: 11 additions & 0 deletions catalog/AHN/AHN_AHN3.jsonnet
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)
12 changes: 12 additions & 0 deletions catalog/AHN/AHN_AHN4.jsonnet
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)
100 changes: 100 additions & 0 deletions catalog/AHN/ahn_new.libsonnet
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).
|||,
},
}
2 changes: 2 additions & 0 deletions catalog/AHN/catalog.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,7 @@ local self_url = base_url + base_filename;
ee.link.child_collection('AHN_AHN2_05M_INT', base_url),
ee.link.child_collection('AHN_AHN2_05M_NON', base_url),
ee.link.child_collection('AHN_AHN2_05M_RUW', base_url),
ee.link.child_collection('AHN_AHN3', base_url),
ee.link.child_collection('AHN_AHN4', base_url),
],
}
8 changes: 8 additions & 0 deletions examples/AHN/AHN_AHN3.js
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');
48 changes: 48 additions & 0 deletions examples/AHN/AHN_AHN3_preview.js
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,
}));
8 changes: 8 additions & 0 deletions examples/AHN/AHN_AHN4.js
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');
48 changes: 48 additions & 0 deletions examples/AHN/AHN_AHN4_preview.js
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,
}));

0 comments on commit b695b0b

Please sign in to comment.