// Load a building footprint dataset (example: Microsoft or OSM via GEE) var buildingFootprints = ee.FeatureCollection("TIGER/2016/Buildings"); // Load DSM and DTM (example using Copernicus) var dsm = ee.Image("COPERNICUS/DEM/GLO30"); var dtm = ee.Image("USGS/NED"); // Calculate building height (DSM - DTM) var buildingHeight = dsm.subtract(dtm).rename('height'); // Add height to building footprints var buildingsWithHeight = buildingFootprints.map(function(feature) { var height = buildingHeight.reduceRegion({ reducer: ee.Reducer.mean(), geometry: feature.geometry(), scale: 30, }).get('height'); return feature.set('height', height); }); // Export to a CSV Export.table.toDrive({ collection: buildingsWithHeight, description: "Building_Height_Export", fileFormat: "CSV" });
I got this error message Collection.loadTable: Collection asset 'TIGER/2016/Buildings' not found. Please help me in downloading building height google building data . Thanks
@@surbhat The error you’re encountering indicates that the asset ID TIGER/2016/Buildings doesn't exist or is inaccessible in Google Earth Engine. This may be due to an incorrect asset ID or the dataset no longer being available.
Nice tutorial. how to export building footprint data with height?
// Load a building footprint dataset (example: Microsoft or OSM via GEE)
var buildingFootprints = ee.FeatureCollection("TIGER/2016/Buildings");
// Load DSM and DTM (example using Copernicus)
var dsm = ee.Image("COPERNICUS/DEM/GLO30");
var dtm = ee.Image("USGS/NED");
// Calculate building height (DSM - DTM)
var buildingHeight = dsm.subtract(dtm).rename('height');
// Add height to building footprints
var buildingsWithHeight = buildingFootprints.map(function(feature) {
var height = buildingHeight.reduceRegion({
reducer: ee.Reducer.mean(),
geometry: feature.geometry(),
scale: 30,
}).get('height');
return feature.set('height', height);
});
// Export to a CSV
Export.table.toDrive({
collection: buildingsWithHeight,
description: "Building_Height_Export",
fileFormat: "CSV"
});
Thank you for the GEE Code
I got this error message Collection.loadTable: Collection asset 'TIGER/2016/Buildings' not found. Please help me in downloading building height google building data . Thanks
@@surbhat The error you’re encountering indicates that the asset ID TIGER/2016/Buildings doesn't exist or is inaccessible in Google Earth Engine. This may be due to an incorrect asset ID or the dataset no longer being available.
unfortunately this product doesn't support Iran
yes of course