Select to view content in your preferred language

Camera Coords

770
4
10-22-2019 10:45 AM
by Anonymous User
Not applicable

I'm playing with cameras in Arc Pro 2.4, but there are things I don't quite get. I'm using a script from a few years ago, I think it was the first Pro release, where you input camera settings in a file, read it with the script, and output the views to image files.

The first problem I'm having is coordinate input. My map is in Web Mercator with no elevation source. In order to get the desired coords: Desire coords at center of map frame

I have to input these in the file (X, Y, height, heading, pitch, roll):

Input coords.

Also, pitch and roll don't seem to work at all. I thought it was because of a camera mode issue per:

Camera—ArcPy | ArcGIS Desktop 

but setting it to GLOBAL throws this error: 

Camera mode error.

Anyway, if anybody could shed some light into this madness, please do. Here's my code:

Tags (1)
0 Kudos
4 Replies
JamesCrandall
MVP Frequent Contributor

Hey there Jorge!  

Looks like you've commented out that error on line 46 (#mycam.mode = 'GLOBAL')… Are you still getting that error or is it something different since taking that out?

Unfortunately, I'm still not working with Pro just yet so sort of just guessing here.


Hope all is going well buddy!

Take care

by Anonymous User
Not applicable

Well, well, well, look what the cat dragged in! How's it going, Jaime!

Yes, I commented the line after it failed, but left it there to remind me what an awful, poor excuse for an amateur programmer I am.

I'm having two problems, very cryptic coordinate input situation, and camera pitch and roll not working.

Please say hi to all and the fam for me!

0 Kudos
JamesCrandall
MVP Frequent Contributor

I'm always here on GeoNet!  

Take a closer look at the Camera Class for pro.  I wish I had more info but don't have access to Pro just yet.  You may want to try to change the mode from GLOBAL to LOCAL or MAP?

mycam.mode = 'LOCAL'

by Anonymous User
Not applicable

I just figured out my coordinate dilemma is because the cam wants its parameters in meters, which is the linear unit for Web Mercator, even if you have your map frame display units in degrees as it was my case.

As far as fixing pitch and roll, something about these cams don't accept the mode property in anything other than MAP--which is 2D: