Layered household three-dimensional display method and system in building tilt model and storage medium
Technical Field
The invention belongs to the technical field of live-action three-dimensional model display, and particularly relates to a layered household three-dimensional display method and system in a building tilt model and a storage medium.
Background
The method for acquiring ground multi-view images by utilizing oblique photogrammetry technology to develop live-action three-dimensional modeling is a newly developed urban three-dimensional modeling technology which is rapidly developed in recent years. However, since the model obtained by the tilt model is usually a "skin" model that is divided by approximate grid, and is often a surface model composed of continuous triangular faces, before the tilt data is divided and distinguished according to different features, the main role of the tilt data is browsing, which is difficult to be directly applied to the analysis of the geographic information system,
at present, the following solutions for hierarchical and household-based accurate query of buildings are available: 1. projecting the three-dimensional inclined data to a two-dimensional plane, extracting a building contour line through a projection graph, and finally determining home house information of a triangular surface by judging the relationship between the triangular surface and the contour line in the inclined data; 2. acquiring a normal vector of a triangular surface of three-dimensional inclined data, and calculating different categories and attribution type information of the triangular surface through a clustering algorithm; 3. and constructing a three-dimensional floor model according to the digital line drawing of the building, and using the model as a basis for house inquiry.
The method directly applies original inclined data, needs to extract a large number of inclined data triangular surfaces, carries out coordinate operation on each surface and applies a clustering statistical algorithm, has large calculation amount and long response time, greatly improves the response time along with the improvement of the resolution of the original data, and has low stability of the response time of the algorithm.
Disclosure of Invention
The purpose of the invention is as follows: the invention aims to provide a method for visually inquiring and displaying a model of a room in a building, which can draw the model of the room to be displayed in real time according to the operation of a user.
The technical scheme is as follows: the invention discloses a layered household three-dimensional display method in a building tilt model on one hand, which comprises the following steps:
(1) obtaining the building information, the building information comprising: the bottom surface of the building is polygonal, the height of each floor is high, and the bottom surface of each floor is polygonal; building a space index of each room in the building according to the building information;
loading the building inclination model and a three-dimensional scene where the model is located;
(2) acquiring coordinates of a click point of a user in a scene; calculating a first intersection point of a ray passing through a click point from a viewpoint and a building inclination model, taking the intersection point as a target point, and inquiring a room where the target point is located;
(3) drawing a model of a room where a target point is located:
calculating the union of the polygon on the bottom surface of the room and the maximum outer boundary of the building inclination model; and drawing a three-dimensional polyhedron and highlighting by taking the polygon formed by the union as the bottom surface and the floor height of the room as the height.
In order to inquire and display the family room information, the step (1) further comprises the steps of obtaining the family membership information, the resident population information and the house information of each family room; the step (3) further comprises: and displaying the household registration information, the resident population information and the house information of the household room in which the target point is positioned.
In order to prevent the building tilt model from blocking the model of the room to be displayed, in the step (3), the method further includes performing outward expansion on a union polygon of the polygon on the bottom surface of the room and the maximum outer boundary of the building tilt model, taking the expanded polygon as the bottom surface, drawing a three-dimensional polyhedron with a high floor height, and highlighting the three-dimensional polyhedron.
The invention adopts outward expansion of each side of the union polygon by the distance of outward translation delta D length.
On the other hand, the invention also discloses a system for realizing the layered household three-dimensional display method in the building tilt model, which comprises the following steps:
the building information acquisition and storage module is used for acquiring the building information and establishing a space index of each room in the building; the building information includes: the bottom surface of the building is polygonal, the height of each floor is high, and the bottom surface of each floor is polygonal;
the to-be-displayed room acquisition module is used for acquiring the room inquired by the user;
and the room drawing module to be displayed is used for drawing the three-dimensional polyhedral model of the room to be displayed and highlighting the model.
The building information acquisition and storage module is also used for acquiring household registration information, resident population information and house information of each household; the to-be-displayed family room drawing module is also used for displaying the family register information, the resident population information and the house information of the to-be-displayed family room.
The layered household three-dimensional display system in the building tilt model adopts a server-terminal separated B/S framework; the terminal is a user terminal for displaying a three-dimensional scene and layered households; the server includes:
the file server is used for storing building three-dimensional inclination model data and three-dimensional scene data where the building three-dimensional inclination model is located;
a database server for storing building information;
the GIS server is used for storing base map data of a three-dimensional scene where the building three-dimensional inclination model is located;
the service server is used for providing service request response service for the terminal;
each server provides a service interface for the outside.
The invention also discloses a computer readable storage medium, which stores computer instructions, and the computer instructions execute the steps of the layered household three-dimensional display method in the building tilt model when running.
Has the advantages that: the layered household three-dimensional display method and the layered household three-dimensional display system for the building inclined model can realize layered household query and display of different household structures of various kinds of multi-story and high-rise buildings; through the spatial index, the query efficiency is improved, and the house room queried by the user can be drawn in real time.
Drawings
FIG. 1 is a flow chart of a layered household three-dimensional display method in a building tilt model according to the present invention;
FIG. 2 is a schematic diagram of calculating target points;
FIG. 3 is a schematic diagram of a outdoor and indoor boundary model;
FIG. 4 is a block diagram of a layered household three-dimensional display system in a building tilt model according to the present invention;
FIG. 5 is a schematic diagram of a layered household three-dimensional display system in a building tilt model using a B/S architecture.
Detailed Description
The invention is further elucidated with reference to the drawings and the detailed description.
As shown in fig. 1, the invention discloses a layered household three-dimensional display method in a building tilt model, which is characterized by comprising the following steps:
(1) acquiring the building information and household registration information, resident population information and house information of each household in the building; the building information includes: the bottom surface of the building is polygonal, the height of each floor is high, and the bottom surface of each floor is polygonal; building a space index of each room in the building according to the building information;
loading the building inclination model and a three-dimensional scene where the model is located;
for most residential buildings, the structure of the households in different floors is the same, and the households in the vertical relationship in each floor can share the polygon on the bottom surface.
(2) Acquiring coordinates of a click point of a user in a scene; calculating a first intersection point of a ray passing through a click point from a viewpoint and a building inclination model, taking the intersection point as a target point, inquiring a room where the target point is located, and setting the inquired room as a room to be displayed;
as shown in fig. 2, in the scene in fig. 2- (a), point C is the viewpoint, point B is the position of the user click point on the surface of the earth, the first intersection point of the ray from C to B and the building tilt model is a, and then a is the target point; looking at the building tilt model from viewpoint C, we see target point a, rather than the user clicking on point B. And inquiring the hierarchy and the household where the point A is located in the household room inside the building according to the horizontal coordinate and the height of the point A.
(3) Drawing a model of a room where a target point is located:
calculating the union of the polygon on the bottom surface of the room and the maximum outer boundary of the building inclination model;
in order to prevent the building tilt model from obscuring the model of the room to be displayed, the union is expanded to enlarge the model. The flaring is achieved by translating each side of the polygon formed by the union outward an equal distance. The embodiment performs outward expansion amplification by outwards translating each side of the union polygon by a distance of Δ D. As shown in fig. 3, a polygon ABCDEF is a union of a polygon on the bottom surface of a room to be displayed and the maximum outer boundary of a building tilt model, the floor height of the room is height, each side of the polygon ABCDEF is translated outwards by Δ D equal to height to obtain an expanded polygon HIJKLM, the HIJKLM is used as the bottom surface, the height is used for drawing a three-dimensional polyhedron, wherein HH ' I ' I, II ' J ' J, JJ ' K ' K, KK ' L ' L, LL ' M ' M, MM ' H is a side quadrilateral, and H ' I ' J ' K ' L ' M ' is the top surface. The three-dimensional polyhedron is the three-dimensional outer boundary model of the room to be displayed, and highlight display is carried out on the three-dimensional polyhedron. And meanwhile, displaying the household registration information, the resident population information and the house information of the house.
Fig. 4 shows a system for implementing the layered household-based three-dimensional display method in the building tilt model, which includes:
the building information acquisition and storage module 1 is used for acquiring the building information, the household registration information, the resident population information and the house information of each household, and establishing a space index of each household inside the building; the building information includes: the bottom surface of the building is polygonal, the height of each floor is high, and the bottom surface of each floor is polygonal;
the to-be-displayed room acquisition module 2 is used for acquiring a room queried by a user according to a point clicked by the user;
and the room drawing module 3 to be displayed is used for drawing and highlighting the three-dimensional polyhedral model of the room to be displayed, and displaying the household registration information, the resident population information and the house information of the room to be displayed.
In this embodiment, the hierarchical household three-dimensional display system in the building tilt model adopts a server-terminal separated B/S architecture, as shown in fig. 5, where the terminal is a user terminal that displays a three-dimensional scene and hierarchical households; the server includes:
the file server is used for storing building three-dimensional inclination model data and three-dimensional scene data where the building three-dimensional inclination model is located;
a database server for storing building information;
the GIS server is used for storing base map data of a three-dimensional scene where the building three-dimensional inclination model is located;
the service server is used for providing service request response service for the terminal;
each server provides a service interface for the outside.
And (3) clicking the scene of the building on the terminal by the user, sending a service request to the database server by the service server, acquiring the target point according to the step (2), and inquiring the house where the target point is located. And the terminal browser draws and displays the model according to the information of the house and simultaneously displays the household registration information, the resident population information and the house information of the house.