<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Spatial filtering to remove 3D objects from layer in ArcGIS Maps SDK for Unity Questions</title>
    <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/spatial-filtering-to-remove-3d-objects-from-layer/m-p/1351329#M701</link>
    <description>&lt;LI-CODE lang="csharp"&gt;	void CreateSpatialFilter(ArcGIS3DObjectSceneLayer layer)
	{
		ArcGISPolygonBuilder pb = new ArcGISPolygonBuilder(ArcGISSpatialReference.WGS84());
		ArcGISPoint point1 = new ArcGISPoint(-73.99980079704791, 40.70807170346215, ArcGISSpatialReference.WGS84());
		ArcGISPoint point2 = new ArcGISPoint(-74.0133251342158, 40.70044995342926, ArcGISSpatialReference.WGS84());
		ArcGISPoint point3 = new ArcGISPoint(-74.01934729189811, 40.705750450644196, ArcGISSpatialReference.WGS84());
		ArcGISPoint point4 = new ArcGISPoint(-74.01291685233905, 40.71700777141413, ArcGISSpatialReference.WGS84());

		pb.AddPoint(point1);
		pb.AddPoint(point2);
		pb.AddPoint(point3);
		pb.AddPoint(point4);

		ArcGISPolygon polygon = (ArcGISPolygon)pb.ToGeometry();
		ArcGISCollection&amp;lt;ArcGISPolygon&amp;gt; polygons = new ArcGISCollection&amp;lt;ArcGISPolygon&amp;gt;();
		polygons.Add(polygon);

		ArcGISSpatialFeatureFilter filter = new ArcGISSpatialFeatureFilter(polygons, ArcGISSpatialFeatureFilterSpatialRelationship.Disjoint);
		layer.FeatureFilter = filter;
	}

The code block which worked for me. Well with the New York example from tutorial.&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 20 Nov 2023 06:18:35 GMT</pubDate>
    <dc:creator>Deivydas24</dc:creator>
    <dc:date>2023-11-20T06:18:35Z</dc:date>
    <item>
      <title>Spatial filtering to remove 3D objects from layer</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/spatial-filtering-to-remove-3d-objects-from-layer/m-p/1349087#M686</link>
      <description>&lt;P&gt;I want to remove block from 3D models layer and insert my own created 3D building. But I don't know how to achieve this. I read there is Spatial Filtering, but I don't know how to use it, how to draw a polygon.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 09:02:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/spatial-filtering-to-remove-3d-objects-from-layer/m-p/1349087#M686</guid>
      <dc:creator>DeivydasMažeika</dc:creator>
      <dc:date>2023-11-14T09:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial filtering to remove 3D objects from layer</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/spatial-filtering-to-remove-3d-objects-from-layer/m-p/1351329#M701</link>
      <description>&lt;LI-CODE lang="csharp"&gt;	void CreateSpatialFilter(ArcGIS3DObjectSceneLayer layer)
	{
		ArcGISPolygonBuilder pb = new ArcGISPolygonBuilder(ArcGISSpatialReference.WGS84());
		ArcGISPoint point1 = new ArcGISPoint(-73.99980079704791, 40.70807170346215, ArcGISSpatialReference.WGS84());
		ArcGISPoint point2 = new ArcGISPoint(-74.0133251342158, 40.70044995342926, ArcGISSpatialReference.WGS84());
		ArcGISPoint point3 = new ArcGISPoint(-74.01934729189811, 40.705750450644196, ArcGISSpatialReference.WGS84());
		ArcGISPoint point4 = new ArcGISPoint(-74.01291685233905, 40.71700777141413, ArcGISSpatialReference.WGS84());

		pb.AddPoint(point1);
		pb.AddPoint(point2);
		pb.AddPoint(point3);
		pb.AddPoint(point4);

		ArcGISPolygon polygon = (ArcGISPolygon)pb.ToGeometry();
		ArcGISCollection&amp;lt;ArcGISPolygon&amp;gt; polygons = new ArcGISCollection&amp;lt;ArcGISPolygon&amp;gt;();
		polygons.Add(polygon);

		ArcGISSpatialFeatureFilter filter = new ArcGISSpatialFeatureFilter(polygons, ArcGISSpatialFeatureFilterSpatialRelationship.Disjoint);
		layer.FeatureFilter = filter;
	}

The code block which worked for me. Well with the New York example from tutorial.&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 20 Nov 2023 06:18:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/spatial-filtering-to-remove-3d-objects-from-layer/m-p/1351329#M701</guid>
      <dc:creator>Deivydas24</dc:creator>
      <dc:date>2023-11-20T06:18:35Z</dc:date>
    </item>
  </channel>
</rss>

