{"id":16704216,"url":"https://github.com/aazuspan/geetools","last_synced_at":"2025-10-12T17:51:59.718Z","repository":{"id":54837656,"uuid":"262252031","full_name":"aazuspan/geeTools","owner":"aazuspan","description":"Remote sensing and spatial analysis tools for Google Earth Engine","archived":false,"fork":false,"pushed_at":"2022-09-13T00:50:15.000Z","size":111,"stargazers_count":26,"open_issues_count":2,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-04T16:46:52.605Z","etag":null,"topics":["burn-severity","cloud-masking","google-earth-engine","hli","radiometric-correction","rdnbr","remote-sensing","tpi"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aazuspan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-08T07:07:15.000Z","updated_at":"2024-08-03T09:43:12.000Z","dependencies_parsed_at":"2023-01-18T05:31:16.900Z","dependency_job_id":null,"html_url":"https://github.com/aazuspan/geeTools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aazuspan/geeTools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aazuspan%2FgeeTools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aazuspan%2FgeeTools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aazuspan%2FgeeTools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aazuspan%2FgeeTools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aazuspan","download_url":"https://codeload.github.com/aazuspan/geeTools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aazuspan%2FgeeTools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279012193,"owners_count":26085079,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["burn-severity","cloud-masking","google-earth-engine","hli","radiometric-correction","rdnbr","remote-sensing","tpi"],"created_at":"2024-10-12T19:11:53.107Z","updated_at":"2025-10-12T17:51:59.700Z","avatar_url":"https://github.com/aazuspan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# geeTools\n\nRemote sensing and spatial analysis tools for Google Earth Engine.\n\n![Fire Perimeter example](https://i.imgur.com/yzDB6Ii.gif)\n\n## Table of Contents\n\n- [Usage](https://github.com/aazuspan/geeTools#Usage)\n- [Examples](https://github.com/aazuspan/geeTools#Examples)\n  - [Burn Severity](https://github.com/aazuspan/geeTools#Burn-Severity)\n  - [Fire Perimeter Detection](https://github.com/aazuspan/geeTools#Fire-Perimeter-Detection)\n  - [Cloud Probability Masking](https://github.com/aazuspan/geeTools#Cloud-Probability-Masking)\n  - [Heat Load Index](https://github.com/aazuspan/geeTools#Heat-Load-Index)\n  - [Slope Position](https://github.com/aazuspan/geeTools#Slope-Position)\n  - [Dark Object Subtraction](https://github.com/aazuspan/geeTools#Dark-Object-Subtraction)\n- [References](https://github.com/aazuspan/geeTools#References)\n\n## Usage\n\nTo import a module, include the following code in your GEE script:\n\n```javascript\nvar foo = require(\"users/aazuspan/geeTools:{module name}\");\nfoo.bar();\n```\n\nFor example:\n\n```javascript\nvar fire = require(\"users/aazuspan/geeTools:fire.js\")\nfire.calculateBurnSeverity( ... );\n```\n\n## Examples\n\n### Burn Severity\n\nCalculate pre- and post-fire NBR, dNBR (Key \u0026 Benson, 2005), RdNBR (Miller \u0026 Thode, 2007), and basal area mortality (Reilly et. al., 2017) using prefire and postfire imagery.\n\n```javascript\nvar fire = require(\"users/aazuspan/geeTools:fire.js\");\n\n// L8 imagery prior to the fire\nvar prefire = ee.Image(\"LANDSAT/LC08/C01/T1_TOA/LC08_046031_20170628\");\n// L8 imagery one year after the fire\nvar postfire = ee.Image(\"LANDSAT/LC08/C01/T1_TOA/LC08_046031_20180701\");\n\n// Specify relevant band labels for imagery\nvar nir = \"B5\";\nvar swir = \"B6\";\n\n// Calculate various burn severity metrics\nvar severity = fire.calculateBurnSeverity(prefire, postfire, nir, swir);\n```\n\n![Burn Severity example](https://i.imgur.com/wEaOgaQ.png)\n\n### Fire Perimeter Detection\n\nMap active burning area or cumulative area burned at customizable time intervals over a time period, such as area burned every 6 hours over 10 days. This implementation uses GOES-16 and GOES-17 imagery, so fire dates are restricted based on availability of that data.\n\n```javascript\nvar fire = require(\"users/aazuspan/geeTools:fire.js\");\n\n// Set the date range\nvar start = \"2020-09-05\";\nvar end = \"2020-09-15\";\n\n// Apply a majority filter to smooth the GOES data\nvar smooth = true;\n// Use the default kernel (or pass any ee.Kernel)\nvar smoothKernel = null;\n// Generate cumulative area burned since start rather than instantaneous area burned.\nvar cumulative = true;\n// Set the time interval in hours\nvar timeDelta = 6;\n\n// Generate an image collection showing cumulative area burned since the start at each time interval\nvar burnedAreaImg = fire.periodicFireBoundaries(\n  start,\n  end,\n  aoi,\n  smooth,\n  smoothKernel,\n  cumulative,\n  timeDelta\n);\n\n// Desired pixel size in meters\nvar scale = 500;\nvar maxPixels = 1e12;\n// Simplify the polygon perimeter to remove stairstep effect and reduce size\nvar simplify = true;\n// Max error, in meters, for simplifcation. Higher error will increase the level of simplification\nvar maxError = 500;\n\n// Convert the image collection into vector fire perimeters\nvar burnedAreaPoly = fire.vectorizeBoundaryCollection(\n  collection,\n  scale,\n  aoi,\n  maxPixels,\n  simplify,\n  maxError\n);\n```\n\n![Fire perimeter example](https://i.imgur.com/HtAJPle.gif)\n\n### Cloud Probability Masking\n\nUse cloud probability data to mask clouds in imagery.\n\n```javascript\nvar cloudMasking = require(\"users/aazuspan/geeTools:cloudMasking.js\");\n\n// Load a Sentinel-2 image (1C or 2A)\nvar s2 = ee.Image(\"COPERNICUS/S2/20190113T190741_20190113T190736_T10TEK\");\n// Load the corresponding cloud probability image\nvar prob = ee.Image(\n  \"COPERNICUS/S2_CLOUD_PROBABILITY/20190113T190741_20190113T190736_T10TEK\"\n);\n\n// Mask clouds in the original image\nvar cloudMasked = cloudMasking.probabilityCloudMask(s2, prob);\n```\n\n![Cloud masking example](https://i.imgur.com/P4oyNTH.png)\n\n### Heat Load Index\n\nCalculate Heat Load Index (HLI) from elevation (McCune, 2007).\n\n```javascript\nvar hli = require(\"users/aazuspan/geeTools:HLI.js\");\n\n// Load elevation data\nvar srtm = ee.Image(\"CGIAR/SRTM90_V4\");\n\n// Generate HLI data\nvar h = hli.hli(srtm);\n```\n\n![Heat Load Index example](https://i.imgur.com/nIe6Jcb.png)\n\n### Slope Position\n\nCalculate TPI and slope position from elevation (Weiss, 2001).\n\n```javascript\nvar tpi = require(\"users/aazuspan/geeTools:TPI.js\");\n\n// Load elevation data\nvar srtm = ee.Image(\"CGIAR/SRTM90_V4\");\n\n// Define an area of interest\nvar aoi = ee.Geometry.Polygon(\n  [\n    [\n      [-123.92382561385939, 42.39507820959633],\n      [-123.92382561385939, 41.57642883612384],\n      [-122.83343254745314, 41.57642883612384],\n      [-122.83343254745314, 42.39507820959633],\n    ],\n  ],\n  null,\n  false\n);\n\n// Calculate slope in degrees\nvar slope = ee.Terrain.slope(srtm);\n\n// Set TPI window parameters. These have a significant impact on output results.\nvar radius = 300;\nvar shape = \"square\";\nvar units = \"meters\";\n\n// Calculate a TPI image\nvar tpi300 = tpi.tpi(srtm, radius, shape, units);\n\n// Use the default \"flat\" definition of 5 degrees\nvar flat = null;\n// Set the output pixel size in meters\nvar scale = 100;\n\n// Reclassify TPI to discrete slope positions\nvar slopePosition300 = tpi.slopePosition(tpi300, slope, flat, aoi, scale);\n```\n\n![Slope Position example](https://i.imgur.com/v7ZqBfR.png)\n\n### Dark Object Subtraction\n\nUse dark object subtraction (DOS) to perform radiometric normalization and atmospheric correction.\n\n```javascript\nvar radCor = require(\"users/aazuspan/geeTools:radiometricCorrection.js\");\n\n// Identify a reference dark object, such as deep water\nvar darkObject = ee.Geometry.Polygon(\n  [\n    [\n      [-124.74266276966597, 42.12268590007055],\n      [-124.74266276966597, 41.93396768286303],\n      [-124.52705608021284, 41.93396768286303],\n      [-124.52705608021284, 42.12268590007055],\n    ],\n  ],\n  null,\n  false\n);\n\n// Load any image\nvar img = ee.Image(\"LANDSAT/LC08/C01/T1_TOA/LC08_046031_20170628\");\n\n// Pixel size in meters\nvar scale = 30;\nvar maxPixels = 1e13;\n\n// Use Dark Object Subtraction to correct for atmospheric distortion\nvar imgDOS = radCor.darkObjectSubtraction(img, darkObject, scale, maxPixels);\n```\n\n![Dark Object Subtraction example](https://i.imgur.com/lVY156s.png)\n\n## References\n\n- Key, C. H., \u0026 Benson, N. C. (2005). Landscape assessment: Remote sensing ofseverity, the Normalized Burn Ratio. In D. C. Lutes (Ed.), FIREMON: Fireeffects monitoring and inventory system. General Technical Report, RMRS-GTR-164-CD:LA1-LA51. (pp.) Ogden, UT: USDA Forest Service, Rocky Mountain Research Station.\n- McCune, B. (2007). Improved estimates of incident radiation and heat load using non- parametric regression against topographic variables. Journal of Vegetation Science, 18(5), 751–754. doi:10.1111/j.1654-1103.2007.tb02590.x\n- Miller, J. D., \u0026 Thode, A. E. (2007). Quantifying burn severity in a heterogeneous landscape with a relative version of the delta Normalized Burn Ratio (dNBR). Remote Sensing of Environment, 109(1), 66–80. doi:10.1016/j.rse.2006.12.006\n- Reilly, M. J., Dunn, C. J., Meigs, G. W., Spies, T. A., Kennedy, R. E., Bailey, J. D., \u0026 Briggs, K. (2017). Contemporary patterns of fire extent and severity in forests of the Pacific Northwest, USA (1985-2010). Ecosphere, 8(3), e01695. doi:10.1002/ecs2.1695\n- Weiss, A.D., 2001. Topographic position and landforms analysis. Poster Presentation,\n  ESRI Users Conference, San Diego, CA.\n\n---\n\n[Top](https://github.com/aazuspan/geeTools#geeTools)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faazuspan%2Fgeetools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faazuspan%2Fgeetools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faazuspan%2Fgeetools/lists"}