You need to upload the correct GeoJSON file when using the FVS 3D City component to build 3D city scenes. This document mainly introduces some attributes and definitions of the GeoJSON file.
GeoJSON Introduction
GeoJSON is a format for encoding a variety of geographic data structures. It is also a data exchange format for geographic space information based on the JavaScript Object Notation (JSON). The built-in format Asia-area.json in FineReport is one of JSONs.
GeoJSON objects can represent geometries, features, or feature collections.
GeoJSON supports geometric types such as Point, Line, Polygon, MultiPoint, MultiLine, and MultiPolygon.
Detection Rules of GeoJSON Attribute
FineReport with FVS Plugin V 1.16.1 and later versions has added a detection mechanism for GeoJSON files to reduce unnecessary parsing consumption for errors and to allow the correct part of the data to be generated according to your needs, helping the process to continue to be executed partially and reducing blocking points.
The basic rules are as follows.
Rule | Explanation |
Rule One: Judgement on File Format | Judge whether the file is a compilable JSON file. If it is, the data structure will be verified. If not, you need to select and upload the file again with a prompt indicating that the GeoJSON file cannot be compiled. |
Rule Two: Completeness of Geometric Types' Attributes | Detect whether there are fields which can provide the attributes of geometric types like building, road, grass, water, and calder:bbox in each Feature. |
Rule Three: Compliance of Geometry Attribute in a Feature | Geometric types like building, road, grass, water, and calder:bbox in a Feature need to correspond with their Geometry attributes accordingly. For example, the Geometry of building is Polygon, not Line. |
Rule Four: Compliance of Coordinate Data Structure for a Feature | Detect whether the coordinate data structure of each Feature complies with the specification. For example, the coordinate value needs to be Coordinates (array type). |
Rule Five: Consistency of the Start and End Coordinate Values for Polygon | If building, road, grass, water, and calder are polygons, you need to detect whether their start and end coordinate values are consistent first. Then you can determine whether the generated 3D model is closed. |
GeoJSON Attribute Standard
FVS 3D City component can automatically recognize the attributes of GeoJSON.
Type | Attribute | Characteristic of Feature | Example |
Named Building (main building) | name: string, building: true, height:number | Building key: building/house/department Value of type in geometry: Polygon/MultiPolygon | If there are both building attribute and name attribute, the 3D model of the building will appear in the 3D City component. The facade color of the building will shine, representing the building lights.
|
Unnamed Building (other building) | building: true, height:number | Building key: building/house/department Value of type in geometry: Polygon/MultiPolygon | If there is no building attribute, the 3D model of the building will not appear in the 3D City component. If there is only the building attribute and no name attribute, the name of the building cannot be recognized in the 3D City component. The color of this building is dimmer than that of named buildings (if it is included in other buildings).
|
Named Road (main road) | name: string, road: true | Road key: road/highway/lane/street Value of type in geometry: LineString/MultiLineString | If there are both road attribute and name attribute, the road will be displayed in the 3D City component with a flowing light effect to represent pedestrians and traffics.
|
Unnamed Road (other road) | road: true | Road key: road/highway/lane/street Value of type in geometry: LineString/MultiLineString | If there is no road attribute, the road will not be displayed in the 3D City component. If there is only the road attribute and no name attribute, the name of the road cannot be recognized in the 3D City component. It is classified as other roads and its color is also dimmer.
|
Grassland | grass: true | Grass key: grass/green/vegetation/park/leisure Value of type in geometry: Polygon/MultiPolygon | |
Water system | water: true | Water system key: water/river/lake/natural Value of type in geometry: Polygon/MultiPolygon | |
bbox:calder | null | Value of type in geometry: Polygon/MultiPolygon/LineString/MultiLineString | Special attributes: Sometimes, you need to modify building scope manually to achieve certain effect. You can create an empty scene through this method and use it with custom templates. Add a Polygon, consider it as the first Feature, and add special attributes. "calder:bbox": true In this case, the scene scope (bbox) is based on the Polygon. Example:
|