In view of the issues that you are concerned about in the current cityengine group, we hope to help you. 1.
No initial rule is prompted after the drag-and-drop ruleThe error is as follows:
Error cause: The rule contains errors.
Check Method: Open the rule editor to view the section marked with a Red Cross in the rule.
General error format: 1)
Chinese charactersThe following example shows an error caused by a Chinese Punctuation Mark in the function. Note: In cityengine rule writing, Chinese characters and punctuation marks in the same language as other programming languages can only appear in double quotation marks or in comments. Otherwise, an error is reported. 2) Reference Function
The parameter value is not an optional value.. For example, scope. X is not an optional value of the axesselection parameter of the setupprojection function. Therefore, an error is returned. Note: When the number of parameter values of the referenced function is incorrect, the rule considers it a new model ID and does not report an error. 3) conditional statements/random statements
Else missing. 4) sum of percentages of random statements except else
Over 100%. As follows: 5) Introduce
Undefined attribute. The attributes introduced by cityengine must be defined in advance (ATTR, const, or no prefix ).
When an error message is found, select a solution for the error type.
2. In
Build scenarioOr
Load Vector DataPrompt
Far awayThe reported error is as follows: cityengine is modeled based on spatial reference (using
Projection Coordinate), Which involves
Scene coordinates,
Terrain and image coordinatesAnd
Coordinate of Vector Data. This error is reported when the projection coordinate system used by the three methods or their location deviation is far away. Generally, we encounter errors mainly due to the following situations: 1) the image lacks location information. Take the image terrain in TIFF format as an example,
Text File missing image coordinate information (tfw file). Cityengine correctly locates cityengine by reading the location information recorded in the coordinate information text file. The meaning of each information in the tfw file is as follows: when no such information is available, when cityengine reads the image data, the image range, namely, the size of xz, corresponds to the number of rows and columns of the image respectively, the value of X-offset is 0, and the value of Z-offset is Negative Z-size. 2)
The projection Coordinate System of vector data and scene data is inconsistent..
Is
Avoid such problemsIn the scenario, make preparations: 1) load the data into ArcMap to check whether all data locations are consistent; 2) Check the spatial reference information of the data (the projection coordinates must be used ), in China, X is usually six digits, and Y is seven digits. (Note: The reference information can be unknowen. In this case, do not select a coordinate system when creating a scenario.) 3) check whether the image and terrain data contain coordinate files.
When the preceding conditions are met, you can select the corresponding projection coordinate system when creating a scenario to avoid the error message that is too far away.
3.
The distance from the static model import is too long.The error message is as follows: if you drag the file in the navigation window, it means that the model has its own coordinate value, that is, the coordinate of the model center is not (0, 0 ). In this case, the model cannot be placed in the position where you drag it. If the center coordinate is too large, this error is prompted.
If you want to import a static model with projection coordinates (in OBJ format), you can select File-> Import... OBJ import to ensure that the model can be correctly imported.
Note: If you use a rule or drag it to a scenario through the file navigation window, you must pay attention to the following: 1. the center coordinates of the model should be (0, 0, 0); 2. the direction of the building model should be consistent with that of the building bottom; 3. component models, such as street lamps, should be consistent in the direction of the lamps to facilitate the compilation of rules.
.