Questions tagged [google-earth-engine-python-api]

Python client library for calling the Google Earth Engine API.

Filter by
Sorted by
Tagged with
1
vote
0answers
26 views

Getting maximum value of a cumulativeCost Image in Earth Engine

I'm trying to get the max value of a generated cumulativeCost Image in Earth Engine, via the Python API. I thought reduceRegion should work, but it dies. My relevant code: malawi = ee....
0
votes
1answer
26 views

Changing image min max values Google Earth Engine Python Api [closed]

How can I change values within an image object in Google Earth Engine with Python API for example the Min or Max values Image.getInfo() {'type': 'Image', 'bands': [{'id': 'B1', 'data_type': {'...
-1
votes
1answer
39 views

Export images with new bands from Google Earth Engine Python API

I'm trying to export images from an image collection after adding NDVI band with no success. def addNDVI(image):# add NDVI band to collection return image.addBands(image.normalizedDifference(['B4',...
0
votes
1answer
37 views

Getting NDVI values from ee.Image using Google Earth Engine Python API

I am using Google Colab and Earth Engine Python API to extract NDVI value according to date and coordinate. I was trying to follow the guide code from https://gis.stackexchange.com/q/360278; and used ...
-1
votes
1answer
30 views

Source Code for Eigen-Analysis in GEE using .eigen()?

I have been performing a PCA in Earth Engine for some time now, but I am having some trouble with the .eigen() call available in the API. Specifically, I am noticing some inconsistencies in the signs ...
1
vote
1answer
34 views

how to get the value from ui.Chart.image.series

I print a chart in the Earth Engine code editor using ui.Chart.series. I would like to extract the values of this chart using the Earth Engine API in Python to produce my own chart with matplotlib. ...
0
votes
0answers
19 views

GEE Python API Resample Image Collection from 3 hr to 1 day temporal resolution

Is there a way to resample an image collection to a different temporal resolution in GEE? I am extracting points from several bands in the GLDAS asset, which has a 3hr temporal resolution. I have a ...
1
vote
1answer
41 views

Exporting GEE satellite imagery to Numpy array

I'm trying to extract LANDSAT-8 images around a lat/lon location, using the Google Earth Engine API for Python. Specifically, I want to generate a bounding box of 1km by 1km around my point, and ...
0
votes
1answer
18 views

EarthEngine save TIFF - Python API Changes?

This code used to work using the Python API: url = ee.data.makeDownloadUrl(ee.data.getDownloadId({ 'image': image.serialize(), 'scale': '%d' % scale, 'filePerBand': '...
0
votes
1answer
87 views

Downloading RGB Sentinel-2 with Google Earth Engine and Python

I am fairly new to the Google Earth Engine platform, and I want to create a dataset for my machine learning project using the aforesaid platform. As far I have this code for downloading a single ...
0
votes
0answers
35 views

Error with filterMetadata of FeatureCollection in Google Earth Engine Python API

I tried to filter a FeatureCollection based on a property i.e. where "Condition" == "Suitable", and count the number of features returned. This is the code I tried. ...
0
votes
0answers
18 views

Error: Unable to open image while ingesting into earth engine

I am trying to upload and ingest a raster file of TIF format into the earth engine. The data is stored in GCS and I used CLI to make the upload. Upload is complete, but ingestion is interrupted ...
0
votes
1answer
52 views

how to upload big files to GEE as assets with the API?

I try to upload big files to Google Earth Engine (10 000 points on the surface of a medium country) as assets. If I go through the code editor and Assets -> New -> .csv file It work like a charm....
1
vote
1answer
182 views

Authentication error when initializing Google EE in QGIS 3.16.1

As stated in the title, I'm having a hard time initializing GEE in QGIS - I've tried this on many different machines and tried to find an answer here but no luck. I've successfully installed Google ...
0
votes
1answer
75 views

Delete asset with GEE API

In the Python API of GEE, is it possible to delete a known asset ? I can crawl in but don't know how to delete one : assets = ee.data.listAssets({'parent': folder}) for asset in assets: # ...
0
votes
0answers
21 views

Export from earthengine API using a Gservice account?

In earthengine Python API, I connect using a Google service account : service_account = 'test-sepal-ui@sepal-ui.iam.gserviceaccount.com' credentials = ee.ServiceAccountCredentials(service_account, '...
3
votes
1answer
48 views

How to de-authenticate from Earth Engine API

Question I am using the Python API of Google Earth Engine and I authenticated myself a long time ago with : import ee ee.Authenticate() I can now connect myself directly using ee.Initialize() My ...
0
votes
1answer
56 views

Accessing personal assets if connected through service account to Google Earth Engine

I'm connecting to the Earth Engine API through a service account : service_account = 'test-sepal-ui@sepal-ui.iam.gserviceaccount.com' credentials = ee.ServiceAccountCredentials(service_account, 'test....
0
votes
0answers
24 views

Export Google Earth Engine to Google Drive with service account (Python API)

I am trying to build an application with Earth Engine's Python application. I first authenticate Earth Engine with a service account, then export the image to drive using the ee.batch.Export.image....
1
vote
0answers
15 views

How to load a module in earthengine Python API?

I want to translate an analysis JavaScript file from JS to Python. It starts with the loading of a module : var temporalSegmentation = require('users/wiell/temporalSegmentation:temporalSegmentation') /...
0
votes
1answer
38 views

Improving execution time of Task.start()

I need to export lots of images from earthengine using the Python API. I use the following code. Here everything is pretty fast but the execution of task.start() take ages. satellites = {} #contain ...
1
vote
1answer
58 views

Error in exporting table from Python API service account— Asset does not exist or doesn't allow this operation

I am trying to export a table using the Python API and am getting the following error: Asset 'my_asset_Path' does not exist or doesn't allow this operation The exact same code works in both the code ...
0
votes
0answers
42 views

Exporting district level precipitation data for series of months using Google Earth Engine Python API

I am trying to export precipitation data for a range of months at the district level of Somalia using GEE's phython api. I'm using the following code #import Somalia district shape file and convert to ...
1
vote
1answer
32 views

Check if Google Earth Engine Python API is initialized

In Google Earth Engine Python API, you need to start with an initialization : import ee ee.Initialize() Is there a way to check if the ee has already been Initialized ?
0
votes
1answer
135 views

Creating automated tests using Google Earth Engine Python API

I'm creating a lib using the Google Earth Engine Python API. I need to test this script in travis CI. When I'm launching the unittest into my env it work but when I push to Github the test fail ...
0
votes
1answer
149 views

Export multiple Images from collection to Google Drive not working with Google Earth Engine Python API 0.1.238

I am struggling with Google Earth Engine Python API version 0.1.238 to export images from the Landsat EVI collection (from 2002 to 2020, but i started with a small sample) to my Google Drive, which ...
1
vote
1answer
37 views

Error in map(ID=0) — Cannot Interpret <Image> as a date

I am refactoring code from the Javascript API to the Python API to aid in exporting. The following code works in the Javascript API: var banded_images = ee.ImageCollection(ee_dates.map(...
0
votes
1answer
37 views

Nested functions in EE python API

I am trying to divide a feature collection into a mosaic of different cells in order to aid with exporting over a large area. I found the following script which is mentioned in this stack overflow ...
0
votes
1answer
116 views

Obtaining yealy maximum NDVI values from Landsat, Earth Engine code editor vs rgee package

I am trying to obtain the Landsat yearly maximum NDVI values for a region using Earth Engine through the R package rgee (an implementation of Earth Engine Python API for R). So far, I had success in ...
0
votes
0answers
12 views

Time indexing image collections in GEE

I've been trying to list a ee.ImageCollection() in GEE but by using time indexing and I came up with this solution: var geometry = ee.Geometry.Polygon([[-86.036445612425396, 11.175779794553685 ], ...
3
votes
1answer
298 views

Google Earth Engine: Javascript API vs. Python API

Google Earth Engine seems to be most commonly used through either the Python API, or the Javascript API on the browser. Trying to decide for one, I have come across this comparison, from a Tyler ...
-1
votes
1answer
33 views

Google Earth Engine Python API Filter.or Invalid Snytax

I am trying to filter a MODIS image collection for two date ranges with the Python API of Google Earth Engine, but I'm encountering the following problem. In the Google Code Editor, I would do ...
0
votes
0answers
137 views

Looping FeatureCollection and ImageCollection in Google Earth Engine editor

I have an image collection and feature collection. In my image collection, I have filtered the dates and a specific band by this: ''' var imagecollectionL8 = ee.ImageCollection("MODIS/006/MOD11A1&...
2
votes
1answer
143 views

Translate JavaScript to Python API GEE

I found this code from Google Earth Engine. /* Author: Sofia Ermida (sofia.ermida@ipma.pt; @ermida_sofia) this function mask clouds and cloud shadow using the Quality band to call this function use: ...
0
votes
1answer
30 views

How to use nextPageToken to check all files under one folder with more than 1000 files in Earth Engine?

Recently I carried land cover classification and export around 3000 files into one folder of the asset. However there were only 1000 files displayed on the code editor. I also used ee.data.listAssets()...
2
votes
1answer
42 views

Get feature values from ImageCollection to list

I am calculating the mean precipitation value over a given area from CHIRPS precipitation data. My goal is to get a list containing a date and precipitation value for every Image of the ...
4
votes
1answer
101 views

Clipped Image has wrong shape in Google Earth Engine

In the Google Earth Engine Python API, when I select a polygon around a high latitude region and use .clip() to clip an image to the polygon (in my example I used MODIS landcover data, but it seems to ...
0
votes
0answers
71 views

Export.image.toDrive keeps failing for certain shapefiles in GEE

I am new to GIS. I had been trying to obtain village level images from kgis. But the GEE code to export images keeps failing with an error message of 'Internal error'. The code(Jupyter notebook) has ...
0
votes
0answers
24 views

Landsat image not found

This is the example code to load a Landsat 7 image img = ee.Image('LANDSAT/LE07/C01/T1_SR/LE07_137044_20200813') print(img.getInfo()) I got this error: HttpError ...
1
vote
1answer
61 views

How to add a dummy band to selected images in an image collection?

I'm using the GEE Python API. The Hansen & Al. glad alert dataset is currently broken and the 20 last images are missing the 'conf19' band. In my process I need to use it whatever the image so I'd ...
1
vote
0answers
84 views

View images for different dates/location in Google Earth Pro

I have been working with Google Earth Engine Code Editor/Google Maps API to view and analyze information surrounding specific points. I am interested in analyzing these images from different dates. ...
3
votes
1answer
141 views

How to handle large data exports (>100,000 tables)

I'd like to export time-series data for many different lakes across the U.S. However, I run into memory issues when trying to start the process. To handle my processes, I'm using the Python API and ee....
0
votes
0answers
31 views

ee.FeatureCollection.distinct() not working on certain properties

I did a batch download of the National Hydrography Dataset, and I have reason to believe that many lakes are found in many state datasets due to extending past state boundaries. I want to filter these ...
1
vote
2answers
207 views

Import JavaScript Google Earth Engine function scripts in a Python API script

I have external scripts in the JavaScript API for the purpose of keeping the functions needed for a mass export of data separate. For example, when I would like to reference these functions in other ...
3
votes
1answer
37 views

Is it possible to add layers onto a static image in Google Earth Engine Python API?

This is my first question on this site, so I apologize if my question's unclear or if it's an oversight on my part. I'm pretty new to Google Earth Engine and am still trying to learn as much as I can. ...
0
votes
1answer
201 views

Access the assets list through GEE API

I'm using the Python GEE API. I'm able to crawl in my tasks through this : #search for the task in task_list filename = construct_filename(country_code, year) tasks_list = ee.batch.Task.list()...
0
votes
1answer
45 views

Retrieve all files created by a task to my local folder

I'm exporting a map to my drive using the GEE python API, I'm looking for a way to retreive all the created files automatically to a local folder. my current code create a image on my drive : def ...
2
votes
1answer
288 views

Using featureCollection to define geometry in Google Earth Engine

I'm starting to use the GEE Python API and I'm struggling with the translation of some instructions from JavaScript to Python. I'm using the following code in JS: var all_alerts = ee.ImageCollection('...
1
vote
0answers
121 views

Issues converting image to numpy array in Earth Engine

I am trying to build a numpy array fromm the values of an image band in GEE to export for analysis. The roi is quite large (over the South Pacific), so several images make up each day. I have adapted ...
0
votes
1answer
76 views

Is there a more direct approach to time series correlation in the Google Earth Engine?

I want to know how the time attributes of ee.Image and ee.ImageCollectionobjects exist in Google Earth Engine. I am looking for whether there are operations on time series in GEE, such as resampling, ...