shapes and terrain y and z are inverted

709
7
Jump to solution
11-21-2022 10:48 AM
MaximeDemers
Occasional Contributor III

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:

MaximeDemers_0-1669056198883.png

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

0 Kudos
1 Solution

Accepted Solutions
JonasObertuefer
Esri Contributor

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

View solution in original post

7 Replies
DanPatterson
MVP Esteemed Contributor

does anything change when you get the coordinates of the first seletion

ce.getPosition(ce.selection()[0]

from

CE—ArcGIS CityEngine Resources | Documentation


... sort of retired...
0 Kudos
MaximeDemers
Occasional Contributor III

No it's the same result

MaximeDemers_0-1669060496282.png

 

0 Kudos
MaximeDemers
Occasional Contributor III

up please!

0 Kudos
DanPatterson
MVP Esteemed Contributor

Tech Support would be your best option given no one else is weighing in.  It may be reported in an internal bug list


... sort of retired...
0 Kudos
MaximeDemers
Occasional Contributor III

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.

0 Kudos
JonasObertuefer
Esri Contributor

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

MaximeDemers
Occasional Contributor III

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!

0 Kudos