Comments (4)
Hi Andres!
I have checked your script, and now I know what's happening: The problem is associated to the _get_platform function. This function uses the getInfo()
client method in order to get the ID of the ee.Image (or ee.ImageCollection) so different eemont
methods such as scale()
, maskClouds()
or index()
can be computed according to the parameters of the specific satellite platform.
Since getInfo()
is a client method and not a server method, it can't be mapped (it can't be used within a map()
function). Check the Debugging Guide.
In this case, the problem can be solved by working in the client-side and not in the server-side. This works perfectly:
countries = ['Ethiopia','Ghana','Nicaragua'] # client-side object, don't use here an ee.List since it is a server-side object
features = []
for country in countries: # client-side loop
# Here, the name of each country (a client-side object)
# is used to filter the feature collection and a
# server-side object is retrieved (an ee.Feature)
# and it is appended to the list
features.append(getStats(AOIs.filterMetadata('WB_ADM0_NA', 'equals',country)))
# Here, the list of ee.Feature objects is converted into an ee.FeatureCollection
ee.FeatureCollection(features)
I'll close this issue for now and I'll open a new issue regarding the use of the getInfo()
method inside the _get_platform
function. I hope to find a way to use just server-side methods inside eemont soon.
Thank you very much for your time and attention here!
Cheers!
from eemont.
Hi Andres!
Thank you very much for pointing this out, I will check it. Is there any chance I can get access to the feature collection to try it?
In the meantime, let me tell you that you can get the time series from a feature collection by using the getTimeSeriesByRegions()
method from eemont 0.1.9 (example here):
oliCol = (ee.ImageCollection('LANDSAT/LC08/C01/T1_SR')
.filterBounds(featurecollection)
.filterDate('2013-01-01','2015-01-01')
.scale()
.index('NDVI'))
ts = oliCol.getTimeSeriesByRegions(collection = featurecollection,
reducer = ee.Reducer.mean(),
bands = 'NDVI',
scale = 1000,
tileScale = 4)
Let me know if it works! And I will check the error to see what's happening.
Cheers!
from eemont.
Thanks, I'll look into getTimeSeriesByRegions. I am doing a bit of harmonization prior (merging different Landsat collections) and running this for multiple countries, which is why I was implementing a custom function - if I don't use filterBounds for each country it will probably time out.
Sure, send me your gmail and I'll share the feature collection.
from eemont.
Hi Andres!
Ok, now I understand.
You can share your feature collection to this gmail.
Thanks!
from eemont.
Related Issues (20)
- Update `tasseledCap` docstrings HOT 1
- Extended methods for the ee.Image class cannot be thrown to map HOT 4
- Would it be nice to expose the s2cloudless algorithm to Sentinel-2 Level 1C data? HOT 1
- ee.Geometry.Point does not accept varargs after importing eemont HOT 4
- COPERNICUS/S2_HARMONIZED HOT 3
- MODIS/061/MOD09A1 HOT 4
- What visParams should i use for al lthe indices available in spectral indices? HOT 1
- index() function not working HOT 1
- getTimeSeriesByRegion returns empty and repeated dates in dataframe HOT 1
- MODIS/061/MOD09A1 HOT 2
- tasseled cap transformation for COPERNICUS/S2_SR HOT 1
- Pixel calculation after cloud masking HOT 3
- Support for computing indices for Sentinel-1 HOT 3
- "system:id" disappears following maskClouds() that subsequently leads to the error of scaleAndOffset() HOT 1
- some methods and modules do not work HOT 5
- getTimeSeriesByRegion returns repeated and empty dates in time series HOT 2
- preprocess() left quite a few cloud shaddow HOT 1
- Timeseries in Sentinel S1 Index HOT 11
- .preprocess() failed for the new COPERNICUS/S2_SR_HARMONIZED HOT 4
- Add HLSL30 Data HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eemont.