Announcement: All noncommercial projects registered to use Earth Engine before April 15, 2025 must verify noncommercial eligibility to maintain Earth Engine access.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-06 UTC."],[[["\u003cp\u003eCreates a filter that selects objects whose geometry intersects a specified geometry or feature collection.\u003c/p\u003e\n"],["\u003cp\u003eAccepts a geometry, feature, or feature collection as input for the intersection.\u003c/p\u003e\n"],["\u003cp\u003eIncludes an optional \u003ccode\u003eerrorMargin\u003c/code\u003e parameter for adjusting the intersection boundary.\u003c/p\u003e\n"],["\u003cp\u003eLarge or complex geometries provided as input may result in slower performance.\u003c/p\u003e\n"]]],[],null,["\u003cbr /\u003e\n\nCreates a filter that passes if the object's geometry intersects the given geometry.\n\n\u003cbr /\u003e\n\n| **Caution:** providing a large or complex collection as the `geometry` argument can result in poor performance. Collating the geometry of collections does not scale well; use the smallest collection (or geometry) that is required to achieve the desired outcome.\n\nReturns the constructed filter.\n\n| Usage | Returns |\n|-----------------------------------------------|---------|\n| `ee.Filter.bounds(geometry, `*errorMargin*`)` | Filter |\n\n| Argument | Type | Details |\n|---------------|---------------------------------------------|------------------------------------------------------------------------------|\n| `geometry` | ComputedObject\\|FeatureCollection\\|Geometry | The geometry, feature or collection to intersect with. |\n| `errorMargin` | ComputedObject\\|Number, optional | An optional error margin. If a number, interpreted as sphere surface meters. |\n\nExamples\n\nCode Editor (JavaScript) \n\n```javascript\n// collection.filterBounds() is preferred.\n// A Sentinel-2 surface reflectance image collection for 3 months in 2021.\nvar ic = ee.ImageCollection('COPERNICUS/S2_SR')\n .filterDate('2021-07-01', '2021-10-01');\n\n// A point geometry for the peak of Mount Shasta, California, USA.\nvar geom = ee.Geometry.Point(-122.196, 41.411);\nprint('Images intersecting point geometry',\n ic.filter(ee.Filter.bounds(geom)));\n\n// A feature collection of point geometries for mountain peaks.\nvar fc = ee.FeatureCollection([\n ee.Feature(ee.Geometry.Point(-122.196, 41.411), {mountain: 'Mount Shasta'}),\n ee.Feature(ee.Geometry.Point(-121.697, 45.374), {mountain: 'Mount Hood'})\n]);\nprint('Images intersecting feature collection',\n ic.filter(ee.Filter.bounds(fc)));\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\nColab (Python) \n\n```python\n# collection.filterBounds() is preferred.\n# A Sentinel-2 surface reflectance image collection for 3 months in 2021.\nic = ee.ImageCollection('COPERNICUS/S2_SR').filterDate('2021-07-01',\n '2021-10-01')\n\n# A point geometry for the peak of Mount Shasta, California, USA.\ngeom = ee.Geometry.Point(-122.196, 41.411)\nprint('Images intersecting point geometry:',\n ic.filter(ee.Filter.bounds(geom)).getInfo())\n\n# A feature collection of point geometries for mountain peaks.\nfc = ee.FeatureCollection([\n ee.Feature(ee.Geometry.Point(-122.196, 41.411),\n {'mountain': 'Mount Shasta'}),\n ee.Feature(ee.Geometry.Point(-121.697, 45.374),\n {'mountain': 'Mount Hood'})\n])\nprint('Images intersecting feature collection:',\n ic.filter(ee.Filter.bounds(fc)).getInfo())\n```"]]