Hi,
I have a weird behaviour in CityEngine 2022. It seems the y and z are inverted somehow. The scene coordinates system is EPSG 3857 just like the layers and terrain.
For instance if I use python to get the position of a selected shape I got this:
You can see the z is the second argument and the y is the third of the ce.getPosition() returned sequence.
Moreover the y (-5677497.278076172) should be positive (north hemisphere), not negative.
Except the python, everything seems to work correctly in CityEngine. If I export models in multipatch and open it in ArcGIS Pro the layer is correctly positionned.
What is the cause? How can I correct that situation?
Thank you!
Maxime Demers
Solved! Go to Solution.
Hi @MaximeDemers,
At first glance I don't see anything wrong in your python console screenshot. If everything is correct when you export it to Pro, what are the x,y,z values there?
Please note: ce.getPosition returns [x, y, z] where y is the height value. This is how coordinates are handled everywhere in CityEngine.
Best,
Jonas
does anything change when you get the coordinates of the first seletion
ce.getPosition(ce.selection()[0]
from
CE—ArcGIS CityEngine Resources | Documentation
No it's the same result
up please!
Tech Support would be your best option given no one else is weighing in. It may be reported in an internal bug list
Ok thanks for your reply!
Can you confirm that on your side the y and z are not inverted like me?
I would like to be sure that it's not a normal behaviour of CityEngine before opening a ticket.
Hi @MaximeDemers,
At first glance I don't see anything wrong in your python console screenshot. If everything is correct when you export it to Pro, what are the x,y,z values there?
Please note: ce.getPosition returns [x, y, z] where y is the height value. This is how coordinates are handled everywhere in CityEngine.
Best,
Jonas
Thank you for confirming that the y is the elevation in CityEngine!
I am not sure why the z (latitude) is negative in CityEngine but positive in the coordinates system. My data is in the north hemisphere.
Anyway, everything seems to work so I dont worry.
Thanks again!