From b695b0bf30ba724e0fe6a6ae4fb401e00fa67c52 Mon Sep 17 00:00:00 2001 From: Google Earth Engine Community Authors Date: Thu, 12 Dec 2024 02:44:37 -0800 Subject: [PATCH] Add DD for AHN3 and AHN4 datasets PiperOrigin-RevId: 705431909 --- catalog/AHN/AHN_AHN3.jsonnet | 11 ++++ catalog/AHN/AHN_AHN4.jsonnet | 12 ++++ catalog/AHN/ahn_new.libsonnet | 100 +++++++++++++++++++++++++++++++ catalog/AHN/catalog.jsonnet | 2 + examples/AHN/AHN_AHN3.js | 8 +++ examples/AHN/AHN_AHN3_preview.js | 48 +++++++++++++++ examples/AHN/AHN_AHN4.js | 8 +++ examples/AHN/AHN_AHN4_preview.js | 48 +++++++++++++++ 8 files changed, 237 insertions(+) create mode 100644 catalog/AHN/AHN_AHN3.jsonnet create mode 100644 catalog/AHN/AHN_AHN4.jsonnet create mode 100644 catalog/AHN/ahn_new.libsonnet create mode 100644 examples/AHN/AHN_AHN3.js create mode 100644 examples/AHN/AHN_AHN3_preview.js create mode 100644 examples/AHN/AHN_AHN4.js create mode 100644 examples/AHN/AHN_AHN4_preview.js diff --git a/catalog/AHN/AHN_AHN3.jsonnet b/catalog/AHN/AHN_AHN3.jsonnet new file mode 100644 index 000000000..79772316d --- /dev/null +++ b/catalog/AHN/AHN_AHN3.jsonnet @@ -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) \ No newline at end of file diff --git a/catalog/AHN/AHN_AHN4.jsonnet b/catalog/AHN/AHN_AHN4.jsonnet new file mode 100644 index 000000000..8213c3604 --- /dev/null +++ b/catalog/AHN/AHN_AHN4.jsonnet @@ -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) \ No newline at end of file diff --git a/catalog/AHN/ahn_new.libsonnet b/catalog/AHN/ahn_new.libsonnet new file mode 100644 index 000000000..4c2f75b98 --- /dev/null +++ b/catalog/AHN/ahn_new.libsonnet @@ -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). + |||, + }, +} diff --git a/catalog/AHN/catalog.jsonnet b/catalog/AHN/catalog.jsonnet index 9f8672c32..9034f1415 100644 --- a/catalog/AHN/catalog.jsonnet +++ b/catalog/AHN/catalog.jsonnet @@ -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), ], } diff --git a/examples/AHN/AHN_AHN3.js b/examples/AHN/AHN_AHN3.js new file mode 100644 index 000000000..ca9ecff94 --- /dev/null +++ b/examples/AHN/AHN_AHN3.js @@ -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'); diff --git a/examples/AHN/AHN_AHN3_preview.js b/examples/AHN/AHN_AHN3_preview.js new file mode 100644 index 000000000..b0bb2b36d --- /dev/null +++ b/examples/AHN/AHN_AHN3_preview.js @@ -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, +})); diff --git a/examples/AHN/AHN_AHN4.js b/examples/AHN/AHN_AHN4.js new file mode 100644 index 000000000..36bf2b129 --- /dev/null +++ b/examples/AHN/AHN_AHN4.js @@ -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'); \ No newline at end of file diff --git a/examples/AHN/AHN_AHN4_preview.js b/examples/AHN/AHN_AHN4_preview.js new file mode 100644 index 000000000..f041cfcf1 --- /dev/null +++ b/examples/AHN/AHN_AHN4_preview.js @@ -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, +}));