I have a javascript code that worked well , but when convert to python it's doesn't work and raise invalid geojson error . my code in java script is :

var point = ee.Geometry.Point([52.55845586988192,29.853906673142543])
var dataset = ee.Image("KNTU/LiDARLab/IranLandCover/V1")
var collection = dataset.sample({
 geometries: true,

My code in python is :

point = ee.Geometry.Point([52.55845586988192,29.853906673142543])
dataset = ee.Image("KNTU/LiDARLab/IranLandCover/V1")

collection = dataset.sample({'region':point,'geometries': True})
  • I think the python api will expect a python dictionary as the point.. also, maybe you want to print(collection) ? – Sam Murphy Jan 7 at 18:44

Your Answer

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

Browse other questions tagged or ask your own question.