Skip to main content
deleted 46 characters in body; edited title
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

Issues with Using coveringGrid function in Google Earth Engine

I've just started having a play about with the new coveringGrid() geometry function in Earth Engine but it seems to be exhibiting some strange behaviour...

When I run it for a feature, the result shows up correctly in the map, though when I try to use the result for subsequent operations there are features missing from the grid.

I've attached a link to the script highlighting it, where the black feature is the original shapefile input, the blue feature is the result of the coveringGrid() function and what is visualised in in the Map in Earth Engine (i.e. the expected result), and the yellow feature is what is subsequently seen by GEE (cribbed by using getInfo()).

Code sample and link below:

var RGIRegion='03'
var RGIpath='users/Jmleaglacio/RGI7alpha/RGI'+RGIRegion;
var RGIsimplifiedPath='users/Jmleaglacio/RGI7alpha/RGI'+RGIRegion+'_simplified1km';

// The input Feature
var RGIsimplified=ee.Feature(ee.FeatureCollection(RGIsimplifiedPath).first()).aside(print);

Map.addLayer(RGIsimplified)
//There are 22 blue squares, but only 12 are shown by the print statement
var RGIgridInitial=ee.FeatureCollection(ee.FeatureCollection(ee.Feature(RGIsimplified).geometry()
                .coveringGrid('EPSG:3857',1000000))).aside(print)
                
print(RGIgridInitial)
Map.addLayer(RGIgridInitial,{color:'blue'}) //the expected result
Map.addLayer(ee.FeatureCollection(RGIgridInitial.getInfo()),{color:'yellow'}) //the actual result
   

https://code.earthengine.google.com/7ba22d963850a6134e92bcc50b8d5466

Any insight would be really appreciated!

Issues with coveringGrid function in Google Earth Engine

I've just started having a play about with the new coveringGrid() geometry function in Earth Engine but it seems to be exhibiting some strange behaviour...

When I run it for a feature, the result shows up correctly in the map, though when I try to use the result for subsequent operations there are features missing from the grid.

I've attached a link to the script highlighting it, where the black feature is the original shapefile input, the blue feature is the result of the coveringGrid() function and what is visualised in in the Map in Earth Engine (i.e. the expected result), and the yellow feature is what is subsequently seen by GEE (cribbed by using getInfo()).

Code sample and link below:

var RGIRegion='03'
var RGIpath='users/Jmleaglacio/RGI7alpha/RGI'+RGIRegion;
var RGIsimplifiedPath='users/Jmleaglacio/RGI7alpha/RGI'+RGIRegion+'_simplified1km';

// The input Feature
var RGIsimplified=ee.Feature(ee.FeatureCollection(RGIsimplifiedPath).first()).aside(print);

Map.addLayer(RGIsimplified)
//There are 22 blue squares, but only 12 are shown by the print statement
var RGIgridInitial=ee.FeatureCollection(ee.FeatureCollection(ee.Feature(RGIsimplified).geometry()
                .coveringGrid('EPSG:3857',1000000))).aside(print)
                
print(RGIgridInitial)
Map.addLayer(RGIgridInitial,{color:'blue'}) //the expected result
Map.addLayer(ee.FeatureCollection(RGIgridInitial.getInfo()),{color:'yellow'}) //the actual result
   

https://code.earthengine.google.com/7ba22d963850a6134e92bcc50b8d5466

Any insight would be really appreciated!

Using coveringGrid function in Google Earth Engine

I've just started having a play about with the new coveringGrid() geometry function in Earth Engine but it seems to be exhibiting some strange behaviour.

When I run it for a feature, the result shows up correctly in the map, though when I try to use the result for subsequent operations there are features missing from the grid.

I've attached a link to the script highlighting it, where the black feature is the original shapefile input, the blue feature is the result of the coveringGrid() function and what is visualised in in the Map in Earth Engine (i.e. the expected result), and the yellow feature is what is subsequently seen by GEE (cribbed by using getInfo()).

Code sample and link below:

var RGIRegion='03'
var RGIpath='users/Jmleaglacio/RGI7alpha/RGI'+RGIRegion;
var RGIsimplifiedPath='users/Jmleaglacio/RGI7alpha/RGI'+RGIRegion+'_simplified1km';

// The input Feature
var RGIsimplified=ee.Feature(ee.FeatureCollection(RGIsimplifiedPath).first()).aside(print);

Map.addLayer(RGIsimplified)
//There are 22 blue squares, but only 12 are shown by the print statement
var RGIgridInitial=ee.FeatureCollection(ee.FeatureCollection(ee.Feature(RGIsimplified).geometry()
                .coveringGrid('EPSG:3857',1000000))).aside(print)
                
print(RGIgridInitial)
Map.addLayer(RGIgridInitial,{color:'blue'}) //the expected result
Map.addLayer(ee.FeatureCollection(RGIgridInitial.getInfo()),{color:'yellow'}) //the actual result
   

https://code.earthengine.google.com/7ba22d963850a6134e92bcc50b8d5466

added 9 characters in body; edited title
Source Link
TomazicM
  • 27k
  • 24
  • 31
  • 42

Issues with coveringGrid function in Google Earth engineEngine

I've just started having a play about with the new coveringGrid()coveringGrid() geometry function in Earth Engine but it seems to be exhibiting some strange behaviour...

When I run it for a feature, the result shows up correctly in the Mapmap, though when I try to use the result for subsequent operations there are features missing from the grid.

I've attached a link to the script highlighting it, where the black feature is the original shapefile input, the blue feature is the result of the coveringGridcoveringGrid() function and what is visualised in in the Map in Earth Engine (i.e. the expected result), and the yellow feature is what is subsequently seen by EEGEE (cribbed by using getInfo()getInfo()).

Code sample and link below:

var RGIRegion='03'
var RGIpath='users/Jmleaglacio/RGI7alpha/RGI'+RGIRegion;
var RGIsimplifiedPath='users/Jmleaglacio/RGI7alpha/RGI'+RGIRegion+'_simplified1km';

// The input Feature
var RGIsimplified=ee.Feature(ee.FeatureCollection(RGIsimplifiedPath).first()).aside(print);

Map.addLayer(RGIsimplified)
//There are 22 blue squares, but only 12 are shown by the print statement
var RGIgridInitial=ee.FeatureCollection(ee.FeatureCollection(ee.Feature(RGIsimplified).geometry()
                .coveringGrid('EPSG:3857',1000000))).aside(print)
                
print(RGIgridInitial)
Map.addLayer(RGIgridInitial,{color:'blue'}) //the expected result
Map.addLayer(ee.FeatureCollection(RGIgridInitial.getInfo()),{color:'yellow'}) //the actual result
   

https://code.earthengine.google.com/7ba22d963850a6134e92bcc50b8d5466

Any insight would be really appreciated!

Issues with coveringGrid function in Earth engine

I've just started having a play about with the new coveringGrid() geometry function in Earth Engine but it seems to be exhibiting some strange behaviour...

When I run it for a feature, the result shows up correctly in the Map, though when I try to use the result for subsequent operations there are features missing from the grid.

I've attached a link to the script highlighting it, where the black feature is the original shapefile input, the blue feature is the result of the coveringGrid function and what is visualised in in the Map in Earth Engine (i.e. the expected result), and the yellow feature is what is subsequently seen by EE (cribbed by using getInfo()).

Code sample and link below:

var RGIRegion='03'
var RGIpath='users/Jmleaglacio/RGI7alpha/RGI'+RGIRegion;
var RGIsimplifiedPath='users/Jmleaglacio/RGI7alpha/RGI'+RGIRegion+'_simplified1km';

// The input Feature
var RGIsimplified=ee.Feature(ee.FeatureCollection(RGIsimplifiedPath).first()).aside(print);

Map.addLayer(RGIsimplified)
//There are 22 blue squares, but only 12 are shown by the print statement
var RGIgridInitial=ee.FeatureCollection(ee.FeatureCollection(ee.Feature(RGIsimplified).geometry()
                .coveringGrid('EPSG:3857',1000000))).aside(print)
                
print(RGIgridInitial)
Map.addLayer(RGIgridInitial,{color:'blue'}) //the expected result
Map.addLayer(ee.FeatureCollection(RGIgridInitial.getInfo()),{color:'yellow'}) //the actual result
   

https://code.earthengine.google.com/7ba22d963850a6134e92bcc50b8d5466

Any insight would be really appreciated!

Issues with coveringGrid function in Google Earth Engine

I've just started having a play about with the new coveringGrid() geometry function in Earth Engine but it seems to be exhibiting some strange behaviour...

When I run it for a feature, the result shows up correctly in the map, though when I try to use the result for subsequent operations there are features missing from the grid.

I've attached a link to the script highlighting it, where the black feature is the original shapefile input, the blue feature is the result of the coveringGrid() function and what is visualised in in the Map in Earth Engine (i.e. the expected result), and the yellow feature is what is subsequently seen by GEE (cribbed by using getInfo()).

Code sample and link below:

var RGIRegion='03'
var RGIpath='users/Jmleaglacio/RGI7alpha/RGI'+RGIRegion;
var RGIsimplifiedPath='users/Jmleaglacio/RGI7alpha/RGI'+RGIRegion+'_simplified1km';

// The input Feature
var RGIsimplified=ee.Feature(ee.FeatureCollection(RGIsimplifiedPath).first()).aside(print);

Map.addLayer(RGIsimplified)
//There are 22 blue squares, but only 12 are shown by the print statement
var RGIgridInitial=ee.FeatureCollection(ee.FeatureCollection(ee.Feature(RGIsimplified).geometry()
                .coveringGrid('EPSG:3857',1000000))).aside(print)
                
print(RGIgridInitial)
Map.addLayer(RGIgridInitial,{color:'blue'}) //the expected result
Map.addLayer(ee.FeatureCollection(RGIgridInitial.getInfo()),{color:'yellow'}) //the actual result
   

https://code.earthengine.google.com/7ba22d963850a6134e92bcc50b8d5466

Any insight would be really appreciated!

Source Link

Issues with coveringGrid function in Earth engine

I've just started having a play about with the new coveringGrid() geometry function in Earth Engine but it seems to be exhibiting some strange behaviour...

When I run it for a feature, the result shows up correctly in the Map, though when I try to use the result for subsequent operations there are features missing from the grid.

I've attached a link to the script highlighting it, where the black feature is the original shapefile input, the blue feature is the result of the coveringGrid function and what is visualised in in the Map in Earth Engine (i.e. the expected result), and the yellow feature is what is subsequently seen by EE (cribbed by using getInfo()).

Code sample and link below:

var RGIRegion='03'
var RGIpath='users/Jmleaglacio/RGI7alpha/RGI'+RGIRegion;
var RGIsimplifiedPath='users/Jmleaglacio/RGI7alpha/RGI'+RGIRegion+'_simplified1km';

// The input Feature
var RGIsimplified=ee.Feature(ee.FeatureCollection(RGIsimplifiedPath).first()).aside(print);

Map.addLayer(RGIsimplified)
//There are 22 blue squares, but only 12 are shown by the print statement
var RGIgridInitial=ee.FeatureCollection(ee.FeatureCollection(ee.Feature(RGIsimplified).geometry()
                .coveringGrid('EPSG:3857',1000000))).aside(print)
                
print(RGIgridInitial)
Map.addLayer(RGIgridInitial,{color:'blue'}) //the expected result
Map.addLayer(ee.FeatureCollection(RGIgridInitial.getInfo()),{color:'yellow'}) //the actual result
   

https://code.earthengine.google.com/7ba22d963850a6134e92bcc50b8d5466

Any insight would be really appreciated!