Spatial filtering

Spatial filtering enables you to remove areas of 3D object scene layers and building scene layers in your ArcGIS Map by based on the polygons areas you specify. There are two different modes for removing areas of the scene layer: removing content inside of the specified polygon (referred to as disjoint) or removing content outside of the specified polygons (referred to as contains). For one spatial filter, you can specify multiple polygons by adding them to an ArcGISPolygonCollection.

The ArcGISSpatialFeatureFilter identifies 3D objects inside or outside of the provided polygons to remove them from the ArcGIS Map. Any 3D objects that are on the polygon geometry outlines will be removed in both filter types.

Once the 3D objects are removed by the spatial filter, data associated with the removed 3D objects are not accessible from Unity.

disjoint disjoint - removes selected areaRemove portions of the scene layer. Use a polygon and don't draw inside that polygon. For example, when you add another layer showing a new development for that part of the city.
contains contains - displays only selected areaDefine an area of interest. Use a polygon and draw only the parts of the scene layer that are inside that polygon. For example, to show only the portion of a scene layer within the boundaries of a city.

Polygons are used to specify the area for mesh modification. A polygon should have a spatial reference that matches the spatial reference of the ArcGIS Map. See the global or local and When you need to know about spatial references topics to understand the spatial reference of the ArcGIS Map.

Apply spatial filter to layers

Create polygons with ArcGISPolygonBuilder with a specific spatial reference for your ArcGIS Map and add them to ArcGISPolygonCollection. To prepare the polygons for the spatial filter, create geometry with the ToGeometry method.

Spatial filter requires polygons and the filter type to be specified. Define your spatial filter with ArcGISSpatialFeatureFilter and provide polygon geometries and the type, Disjoint or Contains from ArcGISSpatialFeatureFilterSpatialRelationship.

Once you have the filter defined, apply the filter to 3D object scene layers and/or Building scene layers.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.