Step-by-step guide to publish your Curve Number application as a public Google Earth Engine App on cloud/ee-osmangeomatics1993
First, save the App-ready script to your GEE repository.
Sudan_GCN_APP.js
Sudan_Hydrologic_CN_Appusers/osmangeomatics1993/)
Sudan_GCN_APP.js file (NOT the Sudan_GCN_CodeEditor.js). The APP version has print() and Export.image.toDrive() removed because they don't work in GEE Apps.
Before publishing, run the script to make sure everything works.
Verify these work correctly:
| Test | Expected Result |
|---|---|
| Map loads CN Average layer | Full Sudan in green-yellow-red colors |
| State dropdown populated | 18 Sudan states listed |
| Select "Khartoum" → Apply State | Map zooms to Khartoum State |
| Click on map | Point query shows CN + State + Locality |
| Legend appears | Color bar with labels below layer selector |
| Change layer to "Land Cover" | Legend updates to categorical classes |
| Draw rectangle → Apply | Map clips to drawn area |
| Generate Download Link | Blue download URL appears |
You should see your existing cloud project: cloud/ee-osmangeomatics1993
A "New App" form will appear with these fields:
| Field | What to Enter |
|---|---|
| App Name | Sudan Hydrologic Curve Number Application |
| Project | Select: cloud/ee-osmangeomatics1993 |
| App ID (auto-generated) | Will auto-fill something like:cloud/ee-osmangeomatics1993/sudan-hydrologic-curve-number-applicationYou can edit the slug if you want a shorter URL |
| Source Code | Should automatically point to your currently open script If not, browse to: users/osmangeomatics1993/Sudan_Hydrologic_CN_App |
| Setting | Recommended Value |
|---|---|
| Access | Select: "Anyone with the link" (for public research access) Or: "Anyone" (to appear in the GEE App Gallery) |
| Earth Engine App Visibility | Check "Show in Gallery" if you want public discovery |
After publishing, you'll get your app URL:
Open the URL in a new browser tab (or incognito window) and verify:
| # | Test | Pass? |
|---|---|---|
| 1 | App loads and shows CN Average map | ☐ |
| 2 | Left panel visible with all sections | ☐ |
| 3 | State dropdown shows 18 states | ☐ |
| 4 | Selecting state → map zooms and clips | ☐ |
| 5 | Locality populates after state selected | ☐ |
| 6 | Click on map → shows query with State + Locality | ☐ |
| 7 | Legend updates when switching layers | ☐ |
| 8 | Draw tools work (rectangle/polygon/point) | ☐ |
| 9 | Runoff calculator produces results | ☐ |
| 10 | GPM rainfall fetches and displays | ☐ |
| 11 | Download link generates for selected product | ☐ |
| 12 | Reset to Full Sudan works | ☐ |
To update your app after making code changes:
The URL stays the same — users always see the latest version.
| Feature | Code Editor (Sudan_GCN_CodeEditor.js) | App (Sudan_GCN_APP.js) |
|---|---|---|
print() | Console messages | ❌ Removed (not available in Apps). Welcome message shown in result panel instead. |
Export.image.toDrive() | 5 export tasks to Google Drive | ❌ Replaced with getDownloadURL() — generates direct download links for GeoTIFF files. User selects product + scale. |
| Download | Tasks tab required | ✅ Direct download link in the panel. User clicks link → browser downloads GeoTIFF. |
| Scale selection | Fixed 250m | ✅ User can choose 250m / 500m / 1000m / 5000m (smaller scale = faster for large AOIs). |
| All other features | Identical: State/Locality, Draw, Asset, 12 layers, Legend, Runoff, GPM, Click query, Statistics | |
Sudan_GCN_CodeEditor.js for your own research (with Export to Drive), and Sudan_GCN_APP.js for the published App (with download links).