Hi,
I'm having problem exporting terrain elevation as an image/heightmap (tif 32bit) - the exported image from cityengine is shifted by approx 25cm to the left and to the top compared to the original heightmap as shown on the picture below (screenshot from globalmapper)
How to reproduce:
Let's say I have:
I import this tif into cityengine an coordinates looks correct:
(original terrain properties)
then I changed terrain resolution from 1024x1024 to 2000x2000px and exported this terrain from CE to 32bit tif and load it alongside the original terrain an I get this difference (as shown on the first image)
to double-check this problem, I also loaded the newly-exported terrain into cityengine and I can confirm that this terrain has different coordinates then the orignal one
(ce-exported terrain properties)
I can also visually confirm in CE that the original and exported terran don't match:
Am I doing something wrong? or can anybody confirm that this is a bug?
I checked the following things and none of them has an effect on this bug - the result is still exactly the same: shifted by 25cm:
for somebody it might look as if 25cm is not a big deal but for my workflow it is: I'm using tiled terrain in very-detailed city and I get a gap between the terrain boundaries and I need to export terrain from CE correctly because I'm doing heightmap adjustments to it
I'm attaching the original and the exported terrain so that you can try to replicate this bug
any help appreciated
thanks,
Mark
Solved! Go to Solution.
Seems like CityEngine writes out a wrong world file not taking into account the center of the first pixel.
Reference: World files for raster datasets—ArcGIS Pro | ArcGIS Desktop
I've filed a bug report.
As a workaround the offset to the pixel center needs to be corrected manually:
CityEngine world file:
0.500000000000000
0.000000000000000
0.000000000000000
-0.500000000000000
300000.000000000000000
5001000.000000000000000
Corrected:
0.500000000000000
0.000000000000000
0.000000000000000
-0.500000000000000
300000.250000000000000
5000999.750000000000000
Seems like CityEngine writes out a wrong world file not taking into account the center of the first pixel.
Reference: World files for raster datasets—ArcGIS Pro | ArcGIS Desktop
I've filed a bug report.
As a workaround the offset to the pixel center needs to be corrected manually:
CityEngine world file:
0.500000000000000
0.000000000000000
0.000000000000000
-0.500000000000000
300000.000000000000000
5001000.000000000000000
Corrected:
0.500000000000000
0.000000000000000
0.000000000000000
-0.500000000000000
300000.250000000000000
5000999.750000000000000
Hi Thomas,
thanks for bug confirmation
I tested your workaround and it solves this problem
thank you very much
any estimation on when it will be fixed? maybe in next release?
Mark
The issue has been fixed in CityEngine 2017.1:
CityEngine 2017.1 release notes—Esri CityEngine | ArcGIS Desktop