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.
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<ArcGISPolygon> polygons = new ArcGISCollection<ArcGISPolygon>(); 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.
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.