refactor gee_tools #121
Replies: 3 comments 2 replies
-
Interesting! May I inquire about the rationale behind this change? I rarely use Reasons to Reconsider:
I had contemplated implementing this for the Open Earth Engine Library, but ultimately decided against it after careful consideration. If you're still convinced this is beneficial, why not employ function mapping? This would allow both the old and new versions to coexist and eliminating the need for a complete library overhaul. BTW, I like the idea of #79 :) |
Beta Was this translation helpful? Give feedback.
-
the inspiration for me is the eemont and wxee libs. both of them use the accessor mechanic to extend the normal scope of the earthengine-api. In both cases the extension allows the methods to be available for all
Yes that's on purpose because here we want to overload an API that is clearly not Python like. that strategy is commonly used to create xarray plugins.
It's already the case right ? if you are using the current implementation of gee_tools you can't port your code from Python to Javascripts "as is". In a second phase of the refactoring I would like to port the geetools method in a javascript lib. but that's another story (only made possible because we use server-side calls) Also it allows to do more javascript like chain computation like: string = (
ee.FeatureCollection(dicto)
.toList()
.geetools.transpose()
.distinct()
.geetools.delet(1)
.geetools.join(",")
)
I'm not deleting the previous ones, they are all wired to new implementation and decorated with the |
Beta Was this translation helpful? Give feedback.
-
But I can create a If calling JS from Python is possible, the reverse is likely doable in Node.js but not in the Code Editor. I agree that simple computations in Python can be serialized in python and then deserialized in JS, but direct copy-pasting would probably suffice. The whole idea behind OEEL is to write in JS and have a way to access and use the code from Python. I respect your design choices and won't debate them further. I believe I've made my points clear, and the decision is yours to make. After all, progress is better than perfection. We all have design decisions we regret, but only those who take action learn. By the way, |
Beta Was this translation helpful? Give feedback.
-
Dear all,
We recently decided to give gee_tools a spring refresher to make it more stable, useful and fast (see #79 and #96). Multiple tasks are ahead of us but we want to start with a complete refactoring of the lib. The main idea is to transform gee_tools into an extention of the
earthengine-api
making our function available for allee
objects as methods. To avoid issues with gee updates we decided to hide them behind a namespace "geetools".Here is a use case example to create a FeatureCollection from a shapefile:
As the methods are hidden behind the "geetools" namespace they should not conflict with new gee developments nor other extention libs. The exact name of the namespace is not yet completely fixed.
As the amount of methods is collosal, it will take time to migrate everything from v0.x to v1.x but we alrready started in this branch. We realize that some of them are already broken and should thus be dropped and other could be replaced by one liner so maybe don't worth the extra method.
Would you mind telling us in the comments which functions of geetools you are using the most ?
Beta Was this translation helpful? Give feedback.
All reactions