Logo Lanfrica

vt-park/kenya-app

Domaine:

geospatial

Type de record:

software
Créateur:
vt-
Hôte:
# kenya-app Android app that visualizes NDVI polygon data on Google Maps (satellite view) and can compute routes to target polygons using the Google Directions API. The UI is built with Jetpack Compose and loads polygon/NDVI data from a CSV asset. **Quick Launch** Prerequisites 1. Android Studio (recent version) with Android SDK installed. 2. JDK 11 (matches project `jvmTarget`). 3. A device or emulator running API 24+. API keys (local only) 1. Add the following entries to `local.properties` (this file is gitignored): ``` # local.properties (do not commit) MAPS_API_KEY=YOUR_GOOGLE_MAPS_API_KEY DIRECTIONS_API_KEY=YOUR_GOOGLE_DIRECTIONS_API_KEY ``` 2. Update the map key in `app/src/main/AndroidManifest.xml`. Replace the `com.google.android.geo.API_KEY` value with your Maps key, or wire it to `MAPS_API_KEY` via the Google Secrets Gradle Plugin. 3. You can also copy `local.properties.example` to `local.properties` as a starting point. Run (Android Studio) 1. Open the project. 2. Sync Gradle. 3. Choose a device/emulator and press Run. Run (CLI) 1. `./gradlew :app:installDebug` 2. Launch from the device launcher, or use `adb shell am start -n com.example.kapp/.MainActivity` **What It Does** 1. Loads polygon geometry + NDVI values from `app/src/main/assets/ndvi_polygons1.csv`. 2. Renders polygons on a Google Map in satellite mode. 3. Provides routing strategies: Closest polygon, Highest NDVI polygon, All polygons (manual cycling). 4. Draws a route polyline using the Google Directions API. **Data Format** The CSV file must include these columns (case-insensitive): 1. `area` 2. `mean_ndvi` 3. `geometry` (GeoJSON Polygon string) **Configuration Notes** 1. The app currently uses a fixed default location in Kenya for the map camera. Location-permission logic is present but commented out in `app/src/main/java/com/example/kapp/MainActivity.kt`. 2. Directions API key is read from `local.properties` into `BuildConfig.DIRECTIONS_API_KEY` (see `app/build.gradle.kts`). 3. Gemi …