0

I am trying to use some of the functions in the math.js module for JavaScript within Google Earth Engine, but I can't seem to import or cut and paste the math.js script because it is too large. Has anyone used math.js on the client side of Google Earth Engine?

2

You cannot use external libraries on GEE Code Editor, but you can use math.js (lucky you)

var n = Math.log(10000, 10)
print(n)

I am not 100% sure it is math.js, but it seems to be.

  • Why a thumb down? it does work. If you want to know which library is actually calling Math ask GEE developers (groups.google.com/forum/#!forum/google-earth-engine-developers). Who asked wanted to use math.js and I give him/her an option that works. At least tell me why you didn't like the answer – Rodrigo E. Principe Mar 23 '18 at 17:03
  • Thanks Rodrigo. I did not vote it down, but the Math library in GEE does not appear to be the same as math.js. Seems like there should be a way to add external libraries that are larger than 512Kb. – user44796 Mar 26 '18 at 13:35
  • You're welcome @user44796. I did not test all functions to see if it's the same or not, and as I say, developers only know for sure, you can ask them on their forum. Math function is not listed in the Docs, but works on the Code Editor – Rodrigo E. Principe Mar 26 '18 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.