From the dataset description for Globfire FinalPerimeters, "area" of the burnt area should have been provided in the feature collection.

However, the area of the fire events were not provided along after checking the metadata of the feature collection.

Object (4 properties)
FDate: Float
IDate: Float
Id: Integer
system:index: String

I am trying to calculate the area of the geometry of each feature in the feature collection. Some of them works fine, but I found a number of "infinity" value for the area exist for most of the polygons with the following coordinates, and I have no idea what does this mean and how should I proceed from here.

geometry: Polygon, 5 vertices
type: Polygon
coordinates: List (1 element)
0: List (5 elements)
0: [-180,-90]
1: [180,-90]
2: [180,90]
3: [-180,90]
4: [-180,-90]  

Links to the modified code: https://code.earthengine.google.com/f729d9d51682d106bf660142620691a5

// initial code example: https://developers.google.com/earth-engine/datasets/catalog/JRC_GWIS_GlobFire_v2_FinalPerimeters#description

var dataset = ee.FeatureCollection('JRC/GWIS/GlobFire/v2/FinalPerimeters');
var visParams = {
  palette: ['f5ff64', 'b5ffb4', 'beeaff', 'ffc0e8', '8e8dff', 'adadad'],
  min: 0.0,
  max: 600000000.0,
  opacity: 0.8,

// added the following codes to calculate the area of each feature (geometry) in the feature collection
// however, some feature are showing "infinity" in the area values 
var computeArea = function (f) {
  return f.set({'area': f.area()});
dataset = dataset.map(computeArea);
print('First feature:', dataset.first());

// the following code seems to be giving issue, as the "area" properties is not defined in final perimeters
// it is only defined in the daily perimeters dataset (https://developers.google.com/earth-engine/datasets/catalog/JRC_GWIS_GlobFire_v2_DailyPerimeters)
var image = ee.Image().float().paint(dataset, 'area');
Map.addLayer(image, visParams, 'GlobFire Final');
Map.addLayer(dataset, null, 'for Inspector', false);
Map.setCenter(-122.121, 38.56, 12)

1 Answer 1


There seem to be some problems with the dataset. I filed a bug. One easy thing to do is just filter out any feature that intersects 0,0. That'll drop the ones with bad geometries.

dataset = dataset.filter(ee.Filter.intersects(".geo", ee.Geometry.Point([0,0])).not())

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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