javascript - How to fix "Invalid GeoJSON geometry" error in Google Earth Engine when trying to batch download?

I am trying to use the batch repo provided by Rodrigo Principe that can export all images in a Google E

I am trying to use the batch repo provided by Rodrigo Principe that can export all images in a Google Earth Engine image collection using the GEE API:

He provides an example script at the end of this thread, which I have tried using but I get an error:

Exporting all images in a Google Earth Engine image collection (Google Earth Engine API)

Error is:

Invalid GeoJSON geometry: [[[-73.87879425086899,46.471905677908346],[-70.84547603387989,46.471905677908346],[-70.84547603387989,48.4283626121078],[-73.87879425086899,48.4283626121078],[-73.87879425086899,46.471905677908346]]]

This problem persists whenever trying to use this batch tool to any of my scripts. The example script that Rodrigo provides is the script I have pasted below; I have changed the example image collection to something else.

What is frustrating is that I was able to make this work before, but now it is no longer working. Could there be some environment setting in the GEE API that I have accidentally changed?

I've tried using

var batch = require('users/fitoprincipe/geetools:batch')
batch.Download.ImageCollection.toDrive(col, "Folder",{scale:30});

around my scripts but I get the same Invalid GeoJSON geometry error for all of them.

var batch = require('users/fitoprincipe/geetools:batch')

var col = ee.ImageCollection("LANDSAT/LE07/C01/T1_SR").filterDate("2002-01-01","2002-01-03");
batch.Download.ImageCollection.toDrive(col, "Folder", {scale:30});

When this works I am expecting to get all of these filtered images to individually pop up as a task for me to download onto my Google Drive.

I am trying to use the batch repo provided by Rodrigo Principe that can export all images in a Google Earth Engine image collection using the GEE API:

https://github./fitoprincipe/geetools-code-editor/wiki/Batch

He provides an example script at the end of this thread, which I have tried using but I get an error:

Exporting all images in a Google Earth Engine image collection (Google Earth Engine API)

Error is:

Invalid GeoJSON geometry: [[[-73.87879425086899,46.471905677908346],[-70.84547603387989,46.471905677908346],[-70.84547603387989,48.4283626121078],[-73.87879425086899,48.4283626121078],[-73.87879425086899,46.471905677908346]]]

This problem persists whenever trying to use this batch tool to any of my scripts. The example script that Rodrigo provides is the script I have pasted below; I have changed the example image collection to something else.

What is frustrating is that I was able to make this work before, but now it is no longer working. Could there be some environment setting in the GEE API that I have accidentally changed?

I've tried using

var batch = require('users/fitoprincipe/geetools:batch')
batch.Download.ImageCollection.toDrive(col, "Folder",{scale:30});

around my scripts but I get the same Invalid GeoJSON geometry error for all of them.

var batch = require('users/fitoprincipe/geetools:batch')

var col = ee.ImageCollection("LANDSAT/LE07/C01/T1_SR").filterDate("2002-01-01","2002-01-03");
batch.Download.ImageCollection.toDrive(col, "Folder", {scale:30});

When this works I am expecting to get all of these filtered images to individually pop up as a task for me to download onto my Google Drive.

Share Improve this question edited Sep 7, 2019 at 13:01 tehcpu 9661 gold badge11 silver badges24 bronze badges asked Sep 7, 2019 at 12:14 Sir247Sir247 211 silver badge2 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 3

I'm certainly not a real expert on this, but I had the same problem today.

The workaround that I found is to set the region to the geometry bounds, rather than the coordinates field within those bounds.

So:

region = img.geometry().bounds().getInfo();

Instead of

region = img.geometry().bounds().getInfo()["coordinates"];

This seems to give me a reasonable output--hope this works for you as well.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745535360a4631880.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信