Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // buildingFootprints represents the buildings that intersect the clicked parcel
- var buildingFootprints = Intersects($feature, FeatureSetByName($map, "Building Footprints"));
- var totalArea = 0;
- // since a building may have multiple floors, we must multiply the floor area by the number
- // of floors. Also note the building data shows some buildings in dense areas as crossing
- // multiple polygons. To avoid miscalculation, we calculate the intersection of the building.
- for (var building in buildingFootprints){
- var floors = IIF(building.FLOORCOUNT == 0, 1, building.FLOORCOUNT);
- totalArea += ( AreaGeodetic( Intersection(building, $feature), 'square-feet') * floors );
- }
- // Compute the ratio of the gross building area to the parcel area
- Round( ( totalArea / AreaGeodetic($feature, 'square-feet') ), 1);
Add Comment
Please, Sign In to add comment