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

Python client library for calling the Google Earth Engine API.

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 views

Problem with Earth Engine Python API Implementation

I am trying to use the Python Earth Engine API to run an application. This application is already in production and I am trying to migrate it to a new server. It runs in a Docker Container and uses ...
user avatar
-4 votes
0 answers
22 views

Python code for downloading Nittrogen di oxide (No2) tiff data from Google Earth Engine (GGE) [closed]

Can you provide Python code to download monthly Nitrogen dioxide (NO2) data in tiff format for Abuja in Nigeria from Google Earth Engine?
user avatar
0 votes
1 answer
24 views

Converting GEE Javascript to Python using geemap not working

I'm looking to convert my code to calculate the mean 30 year precipitation from ERA5 in GEE into Python so that I can run it in the ee python command line tool. I tried using the geemap conversion ...
user avatar
0 votes
0 answers
11 views

How to get a mask with null pixels [closed]

Some images have parts where the pixels are null. I want to mask it so that I can use another image to fill it. However, I can't find a specific method to do such thing. Is there actually a feature ...
user avatar
1 vote
0 answers
16 views

Can I uninitalize earthengine?

I'm benchmarking different implementation of a workflow based on the GEE Python API. The code does something as the following: %%timeit ee.Initialize() # do ee related stuff I would assume that ...
user avatar
1 vote
0 answers
14 views

Error Showing With Python-"ee.ee_exception.EEException: Image.select: Pattern 'B4' did not match any bands."

I'm working on estimation chlorophyll-a using a Landsat 8 image woth python code and then I’m trying to build an web-app which is using streamlit and geemap library. But my map doesn’t showing when I ...
user avatar
0 votes
0 answers
28 views

Mosaic images in an image collection based on date of acquisition

I have an image collection which has undergone certain processes such as resampling and rescaling. Now I am trying to mosaic the images based on the date of acquisition. I tried the code from ...
user avatar
0 votes
1 answer
60 views

Converting raster GeoTIFF or NetCDF to image in Google Earth Engine

I try to convert raster tif or netcdf file to ee.Image Google Earth Engine object in Python. The netcdf raster testing data (5-bands) is in this link. Here I converted the first band from raster file ...
user avatar
  • 171
0 votes
1 answer
26 views

Calculate monthly Modis NDVI of multiple regions using GEE Python API and export the results to a Pandas DataFrame

This is more or less the second part of Calculate monthly Modis NDVI using GEE Python API applied to one or multiple regions and export the results to a Pandas DataFrame. I have a list of point ...
user avatar
  • 173
0 votes
0 answers
25 views

Water Area calculation giving unexpected results

I'm trying to calculate the total area of land locked water bodies in countries. The following is my code: #aoi is obtained using the GeoJson coordinates for Kenya aoi = ee.Geometry.Polygon(coords['...
user avatar
1 vote
0 answers
52 views

Antarctic data in Earth Engline Landsat 8/9 collections

I am trying to use Landsat collection 8, to look at a feature in Antarctica. Specifically this collection https://developers.google.com/earth-engine/datasets/catalog/LANDSAT_LC08_C02_T1_L2 although I ...
user avatar
0 votes
1 answer
59 views

Calculating monthly Modis NDVI using GEE Python API applied to one or multiple regions and exporting results to Pandas DataFrame [closed]

I want to obtain a monthly-year time series of the NDVI inside certain region defined by a polygon. I think I could made it using JavaScript. But I would like to translate to the Python API. I'm a bit ...
user avatar
  • 173
1 vote
0 answers
31 views

Google Earth Engine: Computation timed out error while extracting time-series of values to points

I am using the python API of the google earth engine and geemap library to work with sentinel-2 imagery for the contiguous United States. Here is the code I am using: def maskS2clouds(image): &...
user avatar
1 vote
0 answers
52 views

Google Earth Engine: Output too large when reducing resolution and exporting to Google Cloud

I'm calculating a bareground layer for Africa using Sentinel-2 at 10m resolution. I want to reduce the resolution to 1000m and then export it to Google Cloud Storage. However, this gives me an error ...
user avatar
  • 85
1 vote
1 answer
19 views

Temporally reduce image collection (daily > monthly) using map() within custom class method with GEE Python API

I have defined a class in BoundaryWiseStats.py that handles a daily ImageCollection, and reduces it to a monthly collection \\ BoundaryWiseStats.py import ee ee.Initialize() class BoundaryWiseStats: ...
user avatar
0 votes
1 answer
54 views

Spatial Data on Python - "EEException: Can't encode object"

I'm working on estimation chlorophyll-a using a Landsat 8 image on Python. But the result doesn't showing the image. I've tried to changing it but it doesn't work. I don't know how to fix it. This is ...
user avatar
0 votes
2 answers
54 views

What's correct order of resampling, reprojecting and composing ImageCollection in GEE?

I want to resample, reproject and compose an image collection in python using the GEE API. My script now is this adm0 = ee.FeatureCollection("FAO/GAUL/2015/level0"); filter = ee.Filter....
user avatar
0 votes
0 answers
15 views

Making subplots with cartoee and cartopy

I try to plot four MODIS LST maps in each subplots (my case is 4 plots), but I can only be able to plot one and also not properly position. Here is my code. import ee import geemap import matplotlib....
user avatar
  • 171
0 votes
0 answers
24 views

Unable to visualize the complete overlap of shapefile with the image in GEE

My issue is somewhat similar to the issue described here. Except that I am using a shape file. I have a shapefile of Telangana State (a state in India). The shapefile can be downloaded from here "...
user avatar
  • 1
1 vote
1 answer
22 views

Check if one date before or after another date in Google Earth Engine

How do I check if one date is before or after another date using the Google Earth Engine Python API? In other words, I want to compare two dates like datetime object in Python. import ee firstDate=ee....
user avatar
  • 171
0 votes
1 answer
26 views

Weighted overlay in Google Earth Engine Python API

I am trying to work on weighted overlay analysis in Google Earth Engine Python API. I have reclassified my layers and tryting to assign weights for each of my selected indicators. Getting errors. ...
user avatar
0 votes
1 answer
82 views

How to .map reproject on Image Collection with Python API for Google Earth Engine?

I want to reproject an Image Collection with .map(). This is what I tried: import ee ee.Authenticate() ee.Initialize() import geetools # Outline of lower 48 U.S. usbound = ee.Image("Q:My Drive/...
user avatar
1 vote
1 answer
17 views

Get list mapped over featureCollection for multiple regions

I am attempting to convert my normal GEE GUI JavaScript code over to Python using a Colab environment. In JavaScript I had successfully been able to display and use in calculations multiple regions (...
user avatar
2 votes
1 answer
92 views

Earth Engine Python API set system:id property with function

I want to change the system:id of images in an image collection based on the system:index. I can do this in the javascript api like this: //read in image collection var l8 = ee.ImageCollection("...
user avatar
0 votes
1 answer
30 views

Compute coverage_fraction using .sampleRegions in GEE

I need to extract pixel values from various ROIs (polygons). I need to extract the pixel values of each band, some properties contained in the attribute table of the polygon and I also need to ...
user avatar
  • 343
0 votes
1 answer
67 views

Elevation figure for geometry with Google Earth Engine Python API

I'm creating an elevation figure with Google Earth Engine for a geometry, but I'm getting an error on the image. At the time of plotting the figure is black and is not getting the elevation data of ...
user avatar
2 votes
1 answer
51 views

Cannot load NICFI data using Google Earth Engine Python API

I want to use the images provided by Planet & NICFI (https://www.planet.com/nicfi/#sign-up). This images are now available on GEE as shown in the dataset catalog in Google Earth engine: https://...
user avatar
0 votes
0 answers
47 views

Nested python function resulting in EEException: Empty date ranges not supported for the current operation

I try to translate JS GEE code to Python. My code basically creates a n day maximum raster ImageCollection from a ImageCollection. Eg. 10 days maximum NDSI ImageCollection for the first 2 months of ...
user avatar
0 votes
1 answer
62 views

Merge a list of ImageCollection into a single ImageCollection in Google Earth Engine Python API

I am learning Earth Engine with Python and I am stuck when I want to split the entire terraclimate Image Collection with province feature collection. admin = ee.FeatureCollection('FAO/...
user avatar
0 votes
1 answer
17 views

GoogleEarth Engine layer in stacking with uint8 dtype changing values

I'm trying to stack an NDWI to a set of Sentinel bands using the Python API for GEE via Colab. The main reason for the NDWI as a band in a stack is that I'm resampling to uint8 and I've found that if ...
user avatar
0 votes
0 answers
32 views

How to extract number of pixels of a polygon in GEE script?

Im working on a time serie for both S1 and S2 in GEE. I created training data for 72 images. For each image I created 2 FeatureCollection, 5 polygons for water and 5 polygons for no water. The ...
user avatar
0 votes
0 answers
30 views

Fitting Line to Shoreline in Google Earth Engine

I need to fit this line to shoreline.I converted the line to vector and I determined the scale factor as 1000 but line doesn't fit the shoreline. When I determined the scale factor as 100,50 or 30 . I ...
user avatar
  • 3
0 votes
0 answers
18 views

Using manifest in GEE to upload multiple tiles from multiple days

For multiple tiles and multiple images (14-15 tiles per day, and 100+ days), is the best option to loop through several manifest commands -- such as using a json for each day, and then adding each ...
user avatar
0 votes
0 answers
63 views

Reshape Google Earth Engine Image Array for deep learning model

Following this example, we'd like to host an "eeified" model on google AI platform for predicting over large areas. Our Tensorflow model is multi-temporal and multispectral. In order to ...
user avatar
  • 101
1 vote
1 answer
167 views

Authenticate earthengine CLI using a service account?

I am trying to upload a CSV to Google Earth Engine as an asset through a Python script. Turns out the only way to do this other than using the GUI (which I need to avoid using) is to use the ...
user avatar
1 vote
1 answer
68 views

Scale Factors application not working on GEE PyQGIS

I'm trying to load some Lansadt 7 Collection 2 images on a QGIS project trought the following script: import ee from ee_plugin import Map ecorregiones = ee.FeatureCollection('users/paullcfias/...
user avatar
0 votes
1 answer
195 views

Google Earth Engine: image no data mask?

I'm pulling GEE images for large areas, for a short time period and with a fairly strict cloud condition. This can leave some parts of the GEE image with gaps where the collection has no images. That'...
user avatar
1 vote
0 answers
109 views

Plotting images from Google Earth Engine?

I am trying to plot GEE images as standalone figures (e.g., JPEG or PNG) for publications, however, I have not been able to find a standard method for doing that. For example, I have a landcover image ...
user avatar
  • 103
1 vote
1 answer
127 views

Visualizing Collection of Pixels as Image in Google Earth Engine

I have a polygon and I want to extract both the value and coordinates of every pixel of a landcover raster within that polygon into a CSV spreadsheet. I will use that to perform computations outside ...
user avatar
  • 103
2 votes
1 answer
40 views

Why is ImageReducer needed here to extract bands from an image?

I'm using Earth Engine with Python, and while I finally managed to find an answer here that helped me troubleshoot my problem, I am not sure why it worked, and that makes me concerned that I may be ...
user avatar
  • 23
2 votes
0 answers
42 views

Batch upload images from GCS to Earth Engine assets

I have 302 processed Landsat images in GCS and I need to use them in Google Colab. All I've found so far is that you can "bring" those images into Google Colab by copying them into Colab, ...
user avatar
1 vote
1 answer
175 views

Google Earth Engine Python Folium Map Inspector

I'm calculating the Enhanced Vegetation Index (EVI) of Sentinel-2 data on Google Earth Engine's Python API, specifically in a Jupyter Notebook. I'd like to check that the calculations are producing ...
user avatar
  • 127
3 votes
1 answer
150 views

Google Earth Engine Python expression syntax

I'm writing out a way to calculate the Enhanced Vegetation Index (EVI) of Sentinel-2 images in the Python API of Google Earth Engine, specifically in Jupyter Notebook. I have the same code written for ...
user avatar
  • 127
0 votes
0 answers
50 views

How to interpret Google Earth Engine's aspect output (ee.Terrain.aspect)

The ee.Terrain.aspect function produces a raster of aspect values in degrees (documentation here). How are the values interpreted? For example, are the cell values (degrees) measured from north? or ...
user avatar
  • 1
3 votes
1 answer
144 views

ReduceRegions doesn't return values in Google Earth Engine

I am trying to reduce the percentage of crops from the CGLS-100 Landcover dataset for a set of points uploaded as asset from a shapefile. This is an operation that I've done tens of times, but for ...
user avatar
  • 117
1 vote
0 answers
30 views

Calculating the intersection are of two featureCollections in Google Earth Engine using Python

A problem I'm trying to solve in Google Earth Engine. I would like to take two separate featureCollections and calculate the area of where they intersect. I'd like to do this in python, but just cant ...
user avatar
  • 225
0 votes
0 answers
65 views

MODIS area burned by day of year using Google Earth Engine

I'm trying to use Google Earth Engine (Python API) to calculate area burned using the MODIS area burned dataset; specifically I want daily area burned (for a single year) over a particular area of ...
user avatar
0 votes
0 answers
27 views

Sampling point neighbors efficiently

I am working on species distribution models based on observations. In order to filter the observations, I want to exclude those that within a 1000km radius have less than 3 neighbors, i.e. the ...
user avatar
  • 27
0 votes
2 answers
39 views

Choose what to drop when .distinct()

I am working on species distribution modelling based on observations and I would like to obtain distinct locations per species in my FeatureCollection. So far easy. However, some of the observations ...
user avatar
  • 27
0 votes
1 answer
114 views

Should my Landsat 8 Imagery be Looking this Dark?

I'm downloading daytime satellite imagery from Landsat 8 and am slightly concerned that I'm doing something wrong because the imagery is so dark. This was a composite image of Indonesia I made: In ...
user avatar