Google Earth Engine Launches Ask: Gemini-Powered Geospatial Coding Assistant

Google has launched Ask, a new AI-powered feature in the Google Earth Engine Code Editor that brings Gemini capabilities directly into geospatial scripting. Announced as part of Google Earth AI, Ask is designed to reduce the friction of writing Earth Engine code by helping users write, debug, understand, and optimize geospatial queries without leaving the editor. The feature is available globally today and works with a personal Gemini API key.

The core of Ask is context-aware assistance. When a user asks a question, the model automatically considers the full text of the active script, imported assets and geometries, and the session chat history. This means users do not have to explain their datasets or add extra context. Responses can be inserted into the script with an automatic side-by-side diff view, avoiding copy-pasting. Users can also personalize the experience by choosing which Gemini model to use; at launch the available models are Gemini 3 Flash Preview, Gemini 3.1 Pro Preview, and Gemini 3.5 Flash. Additional optional features include AI-powered documentation search, Earth Engine Data Catalog dataset search, and Google Search grounding through Grounding with Google Search. The documentation search and dataset search are mutually exclusive with Google Search grounding.

The post highlights four quick-start use cases. First, generating code from natural language: for example, a user can ask for a script to load Sentinel-2 imagery for 2025 over Boulder, CO, apply a cloud mask, calculate NDVI, and add a median composite to the map, and Earth Engine will generate JavaScript code that can be inserted or copied. Second, explaining complex code: users can ask “Explain what this script does” to get a step-by-step breakdown of the logic and Earth Engine functions, which is useful for scripts written by colleagues or community examples. Third, one-click troubleshooting: when a script throws an error in the Console, the error message now includes a “Troubleshoot” button that automatically populates the Ask panel with a prompt containing the error message and a request for diagnosis and a fix. Fourth, optimizing queries: for slow-running scripts or errors such as “computation timed out” or “too many concurrent aggregations,” Ask can suggest best practices like early filtering, reducing computation steps, or converting client-side loops to server-side operations.

Getting started requires two steps. Users first obtain a Gemini API key from Google AI Studio; free options exist, and paid-tier usage is billed according to Gemini API terms. Then, in the Code Editor, users open the Ask panel on the right, click the key icon in the bottom left corner, and enter their API key. Google encourages users to share feedback through the Code Editor Feedback button. The announcement is posted under Data Analytics and Maps & Geospatial, positioning Ask as a practical tool for mapping forest cover, detecting built-environment changes, and monitoring agricultural yields.

Accelerate geospatial coding with AI in Google Earth Engine

View Original