code: function getCentroidFeatureForPolygon (coordinates, properties, newProperties) {
      let centroid = Geo.centroid(coordinates);
      if (!centroid) {
          return;
      }
  
      // clone properties and mixix newProperties
      let centroid_properties = {};
      Object.assign(centroid_properties, properties, newProperties);
  
      return {
          type: 'Feature',
          properties: centroid_properties,
          geometry: {
              type: 'Point',
              coordinates: centroid
          }
      };
  }
docs: Helper function to create centroid point feature from polygon coordinates and provided feature meta-data