FeatureCollection ptFeatureCollection = FeatureCollection.fromFeatures(features2); FeatureCollection counted = TurfJoins.pointsWithinPolygon(ptFeatureCollection, polyFeatureCollection); assertNotNull(counted); assertEquals(counted.features().size(), 1); // 1 point in 1 polygon Feature.fromGeometry(pt4), Feature.fromGeometry(pt5), Feature.fromGeometry(pt6)}); counted = TurfJoins.pointsWithinPolygon(ptFeatureCollection, polyFeatureCollection); assertNotNull(counted); assertEquals(counted.features().size(), 5); // multiple points in multiple polygons