Thank you for this question.
With a custom Python script, there is a way to accomplish this task.
Copy the attached script into your workspace, and add it to the scrips menu:
'''
Created on Oct 31, 2017
Modified on Apr 4, 2018
@author: Esri R&D Zurich
'''
from scripting import *
import math
ce = CE()
hRes = 1080
def getCamera(view):
camPos = view.getCameraPosition()
camRot = view.getCameraRotation()
camAoV = view.getCameraAngleOfView()
camPoI = view.getCameraPoI()
camPoIDist = math.sqrt(math.pow(camPoI[0]-camPos[0],2)+ \
math.pow(camPoI[1]-camPos[1],2)+ \
math.pow(camPoI[2]-camPos[2],2))
camPersp = view.getCameraPerspective()
return camPos,camRot,camAoV,camPoIDist,camPersp
def setCamera(view,camPos,camRot,camAoV,camPoIDist,camPersp = True):
view.setCameraPosition(camPos[0],camPos[1],camPos[2])
view.setCameraRotation(camRot[0],camRot[1],camRot[2])
view.setPoIDistance(camPoIDist)
view.setCameraAngleOfView(min(160.0,camAoV))
view.setCameraPerspective(camPersp)
def getViewshed(viewshed):
vsPos = ce.getObserverPoint(viewshed)
vsRot = [0.0, 0.0, 0.0]
if ce.isViewshed(viewshed):
vsRot[0] = ce.getTiltAndHeadingAngles(viewshed)[0]
vsRot[1] = -ce.getTiltAndHeadingAngles(viewshed)[1]
vsAoV = ce.getAnglesOfView(viewshed)[0]
vsPoIDist = ce.getViewDistance(viewshed)
vsRatio = vsAoV/ce.getAnglesOfView(viewshed)[1]
elif ce.isViewDome(viewshed):
vsAoV = 360.0
vsPoIDist = ce.getViewDistance(viewshed)
vsRatio = 1
elif ce.isViewCorridor(viewshed):
vsPoI = ce.getPOI(viewshed)
vsRot[0] = math.atan2(vsPoI[1]-vsPos[1], \
math.sqrt(math.pow(vsPoI[0]-vsPos[0],2)+ \
math.pow(vsPoI[2]-vsPos[2],2)))*180/math.pi
vsRot[1] = -math.atan2(vsPoI[0]-vsPos[0], \
-(vsPoI[2]-vsPos[2]))*180/math.pi
vsAoV = ce.getAnglesOfView(viewshed)[0]
vsPoIDist = math.sqrt(math.pow(vsPoI[0]-vsPos[0],2)+ \
math.pow(vsPoI[1]-vsPos[1],2)+ \
math.pow(vsPoI[2]-vsPos[2],2))
vsRatio = vsAoV/ce.getAnglesOfView(viewshed)[1]
else:
return
vsName = ce.getName(viewshed)
return vsPos,vsRot,vsAoV,vsPoIDist,vsRatio,vsName
def snapshot360(view,vsName):
view.setCameraAngleOfView(90.0)
vdAoV = [(0,0),(0,90),(0,180),(0,-90),(90,0),(-90,0)]
suffixes = ["_f","_l","_b","_r","_u","_d"]
for i, suffix in enumerate(suffixes):
view.setCameraRotation(vdAoV[i][0],vdAoV[i][1],0)
view.snapshot(ce.toFSPath('images/'+vsName+suffix+'.png'),hRes,hRes)
def snapshotViewshed(view,viewshed):
camPos,camRot,camAoV,camPoIDist,camPersp = getCamera(view)
vsPos,vsRot,vsAoV,vsPoIDist,vsRatio,vsName = getViewshed(viewshed)
if ce.isViewDome(viewshed):
snapshot360(view,vsName)
else:
setCamera(view,vsPos,vsRot,vsAoV,vsPoIDist)
view.snapshot(ce.toFSPath('images/'+vsName+'.png'),hRes*vsRatio,hRes)
setCamera(view,camPos,camRot,camAoV,camPoIDist,camPersp)
if __name__ == '__main__':
view = ce.getObjectsFrom(ce.get3DViews())[0]
viewsheds = ce.getObjectsFrom(ce.selection(),ce.isViewshed)
viewdomes = ce.getObjectsFrom(ce.selection(),ce.isViewDome)
viewCorridors = ce.getObjectsFrom(ce.selection(),ce.isViewCorridor)
initialSelection = ce.selection()
ce.setSelection([])
for al in ce.getObjectsFrom(ce.scene,ce.isAnalysisLayer):
ce.setLayerPreferences(al,"Visible",False)
tmpLayer = ce.addAnalysisLayer('TEMP Analysis Layer')
for viewshed in (viewsheds+viewdomes+viewCorridors):
if ce.isViewCorridor(viewshed):
ce.setLayerPreferences(tmpLayer,"Visible",True)
else:
ce.setLayerPreferences(tmpLayer,"Visible",False)
tmpViewshed = ce.copy(viewshed,False,tmpLayer)
snapshotViewshed(view,tmpViewshed[0])
ce.delete(tmpViewshed)
ce.delete(tmpLayer)
for al in ce.getObjectsFrom(ce.scene,ce.isAnalysisLayer):
ce.setLayerPreferences(al,"Visible",True)
ce.setSelection(initialSelection)