title: Turf.js Intersecting buffer with Polygon,MultiPolygon,GeometryCollection
body: <p>This is on the frontend side. I'm using <strong>turf.js</strong>.</p>
  
  <p><strong>Scenario</strong>: Get all warnings and incidents within 10km of my current location.</p>
  
  <p>I'm getting live geojson feed that contains warnings or incidents with lots of features some having their <code>geometry.type='Point' || geometry.type='MultiPolygon' || geometry.type='GeometryCollection'</code>.</p>
  
  <p>What I have done so far:</p>
  
  <p>Create a buffer feature area with my current coordinates and comparing if an incident has occurred near me(10km). </p>
  
  <p>If geometry.type='Point' I'm comparing using turf.inside(point, bufferPolygon), and this is working fine.</p>
  
  <p>The challenge is when it's not a point, say a MultiPolygon or a GeometryCollection which has MultiPolygons in it.</p>
  
  <p>The only other method that I can use to find that accepts polygon in both parameter is <code>turf.intersect(polygon, bufferPolygon)</code>.</p>
  
  <p>Here, I don't get <code>geometry.type ='Polygon'</code> in my feed but it is a <code>MultiPolygon</code> or <code>GeometryCollection</code> (having MultiPolygons).</p>
  
  <pre><code>if(feature.geometry.type === 'Point') {
      if(turf.inside(feature, bufferPolygon)) {
          console.log("inside");
          feature.properties.feedType === 'warning' ? warningsNearBy++ : incidentsNearBy++;
      }
  } else {
      if(feature.geometry.type === 'GeometryCollection') {
          $.each(feature.geometry.geometries, function(index, geo) {
              if(geo.type === 'MultiPolygon') {
                  //console.log('MP:', geo.coordinates[0]);
                  var convertToPolygon = turf.polygon(geo.coordinates[0]);
                  console.log('convertToPolygon:',convertToPolygon);
                  //console.log('MP:intersect',turf.intersect(polygon, bufferPolygon));
                  var isIntersecting = turf.intersect(convertToPolygon, bufferPolygon);
                  if(isIntersecting) {
                      feature.properties.feedType === 'warning' ? warningsNearBy++ : incidentsNearBy++;
                  }
              } else if(geo.type === 'GeometryCollection') {
                  console.log('GC:', geo);
              }
          });
      } else {
          console.log('not geo collection:', feature.geometry.type);
      }
  }
  </code></pre>
  
  <p>Also, tried to convert a multiPolygon to a Polygon, didn't work that well.</p>
  
  <p>Can any one please suggest a way to compare a bufferFeature with a set of feature collection having point, multipolygon and GeometryCollection?</p>