CityEngine provides various tools to georeference geometry and models. The coordinate system determines how data is georeferenced in the scene.
Scene Coordinate System
The Scene Coordinate System defines your scene's reference coordinate system for georeferenced data import, export, and coordinate values in the scene. You can display the Scene Coordinate System and other scene information by turning on Information display. You can also view the Scene Coordinate System by displaying the Status line window.
To display the Information display beneath the scene, do the following:
- Click View settings > Information display.
This displays scene information, such as Scene coordinate system, grid size, and coordinates of the pointer.
To display the Status line, do the following:
- Click Window > Show Status Line.
The Status Line displays in the lower right of the main CityEngine layout. The Status Line also displays valuable memory information.
Default Scene Coordinate System
A CityEngine scene can have a Scene Coordinate System (SCS) set when it was saved previously. By default, the SCS is set to CityEngine CS (meters).
Set the Scene Coordinate System
When working with georeferenced data, it is often important that your scene has a valid georeferenced coordinate system set. There are three ways to set the Scene Coordinate System:
- Set a coordinate system when georeferenced data is added to the scene.
- Set a coordinate system when creating a scene.
- Change the Scene Coordinate System in the preferences.
Set a coordinate system when adding georeferenced data
As soon as georeferenced data is imported into a CityEngine scene, a Scene Coordinate System is required to locate it correctly. CityEngine automatically opens the Select Coordinate System menu on your first import of georeferenced data. Taking the data that is going to be imported into account, the dialog box suggests a matching scene coordinate system.
Set a coordinate system when creating a scene
When creating a CityEngine scene, you have the option to set your Scene Coordinate System in the new scene wizard. The scene Select Coordinate System menu appears when you click Choose.
Change the Scene Coordinate System in the preferences
The Scene Coordinate System can be set or changed in the CityEngine preferences by clicking Edit > Preferences > Scene. Click the Scene Coordinate System button to open the Select Coordinate System menu.
Once a Scene Coordinate System is set, it is displayed in the Information display and the Status Line.
- When changing the Scene Coordinate System, no reprojection is applied to the content of the scene. Using this option only changes the scene's reference system, used for viewing coordinates as well as for future data imports.
- CityEngine currently does not support datum transformations. It is recommended that you reproject your data to match the target SCS before importing into a CityEngine scene.
- In CityEngine, the Scene Coordinate System can only be a projected coordinate system (no geographic coordinate systems).
View coordinate system
The View coordinate system option allows you to view the Information display bar details when different coordinate systems are applied.
If the Scene Coordinate System is set, you can choose the coordinate system by selecting View Settings > View coordinate system.
CityEngine CS [meters]
CityEngine coordinates y-up, meters
Scene CS [feet]
Current Scene Coordinate System in feet
Scene CS [meters]
Current Scene Coordinate System in meters
Universal Transverse Mercator
Military Grid Reference System
Long/Lat [decimal degrees]
Longitude/latitude in decimal degrees
Long/Lat [degrees min sec]
Longitude/latitude in degrees, minutes, and seconds
After changing the View Coordinate System, the Information display bar shows the coordinates in the changed coordinate system.
- When the Scene Coordinate System isn't set, the option to change the coordinate system isn't available. See Set the Scene Coordinate System for more information.
- The Scene Coordinate System in the Status Line window remains unchanged.
Coordinate System dialog box
The Coordinate System dialog box allows you to set the coordinate system when creating a scene, accessing the scene preferences, or importing georeferenced data.
Select the coordinate system
Use the Select Coordinate System menu to set the Scene Coordinate System. Browse through the coordinate systems or use the search field to select the desired coordinate system.
When this dialog box appears during the first import of georeferenced data, the previously selected coordinate system for data import is suggested. If you do not need a georeferenced coordinate system, the No Projection > Raw Data in Meters option is a good choice.
The Scene Coordinate System can only be a projected coordinate system, hence the geographic coordinate systems are not available on this dialog box.
Select data coordinate system
The data coordinate system pops up whenever georeferenced data is going to be imported and no projection details are found with the data. Usually, you will see a coordinate system suggested the Scene Coordinate System when this dialog box appears, which is a good option.
Use the search field
Use the search expression field to filter the list of coordinate systems and search for a coordinate system by name or authority code. Use the wildcard character * to define your search query. To reset the search filter and show all available coordinate systems again, clear the search field and press Enter (or the search button on the right).
Load the coordinate system from a .prj file
When the required coordinate system is not available in the list, you can choose a new projection by browsing to an arbitrary .prj file. Use the folder button on the upper left to open the file dialog box, and browse to the .prj file.
This feature also allows you to define your own custom coordinate system by creating your own .prj file with the desired parameters.
Custom coordinate systems
If a projection definition is found that can't be matched to one of the predefined coordinate systems, CityEngine adds it as a new custom coordinate system. These have their authority set to USER, and an incremental number for the authority code.
Import georeferenced data
CityEngine handles importing georeferenced data differently, depending on the data type.
All georeferenced vector data is reprojected to the Scene Coordinate System during import.
- Georeferenced vector data requires a coordinate system on import; if no such data is found, the Select Coordinate System menu opens during import, allowing the user to choose the coordinate system for the data.
- If the Scene Coordinate System isn't defined for the scene previous to the data import, the Select Coordinate System opens and allows the user to set the Scene Coordinate System.
CityEngine looks for a .prj file with the same name in the same folder.
File Geodatabase (.gdb)
The coordinate system is read per layer of the .gdb dataset.
KML/KMZ latitude/longitude data is always interpreted as WGS84. When KML/KMZ data is imported into a scene with no coordinate system set, UTM with a matching zone is suggested as the Scene Coordinate System.
OSM latitude/longitude data is always interpreted as WGS84. When OSM data is imported into a scene with no coordinate system set, UTM with a matching zone is suggested as the Scene Coordinate System.
Georeferenced image data
Image data is considered to be georeferenced if the following occurs:
- It contains embedded georeferencing metadata.
- A world file is found that belongs to the image.
- A .prj file is found that belongs to the image.
Reprojection or rotation isn't applied to image data on import. The image's coordinate system is used only as a reference system for location, extent, and unit (translate and scale transformation) for the image data during import. It is therefore important to have image data ready in the target coordinate system before importing into CityEngine. (See the GeoTIFF section below.)
Reference coordinate system
CityEngine looks for a .prj file with the same name in the same folder to use as the coordinate system for the data. If no .prj file is found, the Select Coordinate System menu opens and allows the user to choose the coordinate system for the data.
CityEngine looks for a world file (for example, .jgw, .tfw) in the same folder to read the extent of the data. The world file data is interpreted in the unit found in the coordinate system of the data, and calculated accordingly if required. If no world file is found, the size and position of the map can be entered manually in the Map Layer menu.
CityEngine looks for minimum and maximum range values in the metadata embedded in the image. The range data is interpreted in the unit found in the coordinate system of the data, and calculated accordingly if required. If no elevation range is found, the elevation range of the map can be entered manually in the Map Layer menu.
Elevation range data is only used when the image is used as a height map.
GeoTIFF (.tif, .tiff with embedded metadata)
GeoTIFF data is handled the same way as other georeferenced image data with the following differences:
- If a coordinate system is defined with authority and code (for example, ESRI:102132) in the GeoTIFF metadata tags, this information is used to set the data's coordinate system, and has precedence over a .prj file.
- If no world file is present, the GeoTIFF metadata tags are searched for map extent data. If present, the data is treated the same way as in the world file case.
Parameters for location, extent, and elevation range can still be entered manually for nongeoreferenced images in the Map Layer menu.