Method, system, equipment and medium for projecting dynamic three-dimensional light beam range to planar GIS (Geographic Information System) map
Through the split and merge of geometric objects, combined with Websocket real-time communication and Gzip compression technology, dynamic rendering of stereo beam range projection on GIS maps is achieved, solving the problem of slow rendering of stereo beam projection effect in the existing technology, and improving the client's response speed and user experience.
Patent Information
- Application Number
- CN202411747549.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-04-25
AI Technical Summary
In the prior art, when using GIS maps, it is difficult to achieve real 3D stereo beam range projection, especially when the dynamic data interaction is large, the client effect rendering is slow, and the real-time dynamic changes of stereo rendering effect cannot be met.
Through the split and merge of geometric objects, the beam stereo projection coordinate range is formed, and combined with Websocket real-time communication, cache time change coordinates and Gzip compression technology, the stereo beam presentation on a flat GIS map is realized without the need for the client to use 3D technology.
The beam dynamic projection rendering effect is realized, reducing the performance requirements of the client, and improving the response speed and user experience of the client.
Smart Images

Figure CN119888100A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of data processing, and in particular relates to a method, system, device and medium for projecting a dynamic stereoscopic light beam range onto a plane GIS map. Background Art
[0002] Most current systems use BS architecture and use browsers as the system access client. Due to the uneven performance of client machines, maps are presented using the main information source of GIS, and most still use 2D plane projection technology, which cannot present true 3D stereoscopic effects, such as stereoscopic projection from light source to light beam, and stereoscopic projection from satellite to beam. In particular, stereoscopic rendering effects that require real-time dynamic changes have the problems of large dynamic data interaction and slow client rendering. It is necessary to provide a stereoscopic projection algorithm and dynamic data interaction technology to solve the dynamic effect of projecting the range of stereoscopic beams onto flat GIS maps. Summary of the invention
[0003] In view of the deficiencies in the prior art, the present invention provides a method, system, device and medium for projecting a dynamic stereoscopic light beam range onto a flat GIS map. The coordinate range of the light beam stereoscopic projection is formed by splitting and merging geometric objects. The three-dimensional light beam presentation on a flat GIS map is realized by combining Websocket real-time communication, caching time-varying coordinates and Gzip compression technology. The client does not need to use 3D technology, which reduces the performance requirements of the client, realizes the dynamic projection rendering effect of the light beam, and improves the response speed and user experience of the client.
[0004] To achieve the above object, the present invention adopts the following technical solutions:
[0005] A method for projecting a dynamic stereoscopic beam range onto a planar GIS map comprises the following steps:
[0006] S1, obtain the geographical coordinates of the mobile light source and the beam range;
[0007] S2, connect all two adjacent coordinate points in the light beam range with the coordinates of the light source point to form multiple triangle objects;
[0008] S3, merging all triangle objects to form a stereoscopic projection geometric object;
[0009] S4, push the geographic coordinates of the stereoscopic projection geometric object to the application layer;
[0010] S5. Convert the geographic coordinates of the stereoscopic projection geometric object into map plane coordinates, and render the beam projection and beam range to the plane GIS map.
[0011] To optimize the above technical solutions, the specific measures taken also include:
[0012] Further, in S1, the geographical coordinates of the mobile light source and the light beam range are obtained as follows:
[0013] The geographic coordinates of the mobile light source and the beam range are collected in real time. The geographic coordinates at each time point include the geographic coordinates A0 (X0, Y0) of the light source mapped to the GIS map and the geographic coordinate list A1 (X1, Y1), A2 (X2, Y2), A3 (X3, Y3), ..., A n (X n ,Y n ), where A n Indicates the nth point in the range where the beam is projected onto the GIS map, X n Indicates the horizontal coordinate of the nth point, Y n Indicates the ordinate of the nth point.
[0014] Furthermore, S2 is specifically:
[0015] Take the light source point as the triangle vertex, connect it with the two adjacent coordinates of all the light beam ranges, traverse the n coordinate points of the light beam range in turn, and generate n triangle objects in Geometry format (A0, A1, A2), (A0, A2, A3), ..., (A0, A n-1 , A n ) and (A0, A n , A1).
[0016] Furthermore, S3 is specifically:
[0017] The triangle objects in Geometry format are merged one by one through the UnaryUnionOP.union() method to generate a stereoscopic projection geometry object in Geometry format from the light source point to the light beam range. When the light beam range has n coordinates, the number of coordinates of the formed light beam projection range is (0.5*n+1).
[0018] Furthermore, S4 is specifically:
[0019] The server starts the websocket listening service, receives the real-time communication request from the client, establishes a two-way persistent connection channel after successful authentication, and pushes the changing geographic coordinates of the stereoscopic projection geometric objects in real time; the geographic coordinates of the stereoscopic projection geometric objects at different time points are cached and compressed using the Gzip compression technology, and the compressed geographic coordinates of the stereoscopic projection geometric objects are pushed to the successfully connected client; the client decompresses the compressed geographic coordinates of the stereoscopic projection geometric objects after receiving them.
[0020] Furthermore, S5 is specifically:
[0021] Use Openlayers as the front-end component of the flat GIS map to convert the geographic coordinates of the stereographic projection geometric objects into map plane coordinates;
[0022] The Mercator projection method in Openlayers is used to display the flat GIS map, and the beam projection and beam range at different time points are rendered to the flat GIS map to achieve dynamic tracking.
[0023] The present invention also provides a system for projecting a dynamic stereoscopic beam range onto a planar GIS map, comprising:
[0024] Geographic coordinate parsing module, used to obtain the geographic coordinates of the mobile light source and the beam range;
[0025] The module for splitting geometric objects of geographic coordinates is used to connect all two adjacent coordinate points in the beam range with the coordinates of the light source point to form multiple triangle objects;
[0026] The module of merging geometric objects into geographic coordinates is used to merge all triangle objects into a stereographic projection geometric object;
[0027] Dynamic real-time coordinate information push module, used to push the geographic coordinates of stereoscopic projection geometric objects to the application layer;
[0028] The coordinate conversion and map rendering module is used to convert the geographic coordinates of the stereoscopic projection geometric objects into map plane coordinates, and render the beam projection and beam range to the plane GIS map.
[0029] The present invention also proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method of projecting the dynamic stereoscopic beam range onto a plane GIS map as described above is implemented.
[0030] A computer-readable storage medium stores a computer program, wherein the computer program enables a computer to execute the method of projecting a dynamic stereoscopic beam range onto a flat GIS map as described above.
[0031] The beneficial effects of the present invention are:
[0032] The present invention forms a three-dimensional projection coordinate range of light beams through the splitting and merging operations of geometric objects, and then combines Websocket real-time communication, cache time-varying coordinates and Gzip compression technology to realize the presentation of three-dimensional light beams on a flat GIS map. It does not require the client to use 3D technology, reduces the performance requirements of the client, realizes the dynamic projection rendering effect of the light beam, and improves the response speed of the client and the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1A flow chart of the method for projecting a dynamic stereoscopic beam range onto a planar GIS map proposed by the present invention;
[0034] Figure 2 This is a schematic diagram of the process of merging all triangle objects;
[0035] Figure 3 A flowchart of the process of obtaining the geographic coordinates of a stereographic projection geometric object;
[0036] Figure 4 Data interaction flow chart for dynamic real-time coordinate information push;
[0037] Figure 5 It is a dynamic effect diagram of coordinate changes;
[0038] Figure 6 A block diagram of the system for projecting the dynamic stereoscopic beam range onto a flat GIS map proposed by the present invention. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0040] Glossary:
[0041] GIS (Geographic Information System): is a powerful tool that allows us to manage and analyze data from a geographic perspective. In GIS, it is often necessary to convert longitude and latitude coordinates into plane coordinates for mapping, spatial analysis, and data visualization.
[0042] The geographic coordinate system is a coordinate system that uses a three-dimensional spherical surface to define locations on the earth's surface in order to reference points on the earth's surface through longitude and latitude.
[0043] A projected coordinate system or a plane coordinate system is a coordinate system based on X, Y values to describe the location of a point on the earth. This coordinate system is obtained by projecting the earth's approximate ellipsoid, which corresponds to a geographic coordinate system.
[0044] Geometry object: used to store any type of geometric objects, including points, lines, polygons, etc.
[0045] WebSocket: is a network protocol for full-duplex communication on a single TCP connection. It uses a handshake similar to HTTP to establish a connection, providing a communication technology for persistent connection between browsers and servers.
[0046] Gzip: is a common file compression technology, widely used in HTTP protocol to improve web application performance. The browser informs the server to support Gzip compression by setting accept-encoding:gzip in the request header. The Gzip compression ratio is about 3 to 10 times, which can greatly save the server's network bandwidth.
[0047] Embodiment 1
[0048] The present invention proposes a method for projecting a dynamic stereoscopic beam range onto a flat GIS map. The overall process is as follows: Figure 1 As shown, the following steps are included:
[0049] S1. Obtain the geographic coordinates of the mobile light source and the beam range; specifically:
[0050] The geographic coordinates of the mobile light source and the beam range are collected in real time. The geographic coordinates at each time point include the geographic coordinates A0 (X0, Y0) of the light source mapped to the GIS map and the geographic coordinate list A1 (X1, Y1), A2 (X2, Y2), A3 (X3, Y3), ..., A n (X n ,Y n ), where A n Indicates the nth point in the range where the beam is projected onto the GIS map, X n Indicates the horizontal coordinate of the nth point, Y n Indicates the ordinate of the nth point.
[0051] S2. Connect all two adjacent coordinate points in the beam range with the light source point coordinates to form multiple triangle objects; the effect is as follows: Figure 2 (1) as shown. Specifically:
[0052] Take the light source point as the triangle vertex, connect it with the two adjacent coordinates of all the light beam ranges, traverse the n coordinate points of the light beam range in turn, and generate n triangle objects in Geometry format (A0, A1, A2), (A0, A2, A3), ..., (A0, A n-1 , A n ) and (A0, A n , A1).
[0053] S3. Merge all triangle objects to form a stereoscopic projection geometric object. The merging process and effect are as follows: Figure 2 (2)~ Figure 2 (n). Specifically:
[0054] The triangle objects in Geometry format are merged one by one through the UnaryUnionOP.union() method to generate a stereoscopic projection geometry object in Geometry format from the light source point to the light beam range. When the light beam range has n coordinates, the number of coordinates of the formed light beam projection range is (0.5*n+1).
[0055] The data interaction flow chart of S1, S2 and S3 is as follows: Figure 3 shown.
[0056] S4, push the geographic coordinates of the stereoscopic projection geometric object to the application layer; the data interaction flow chart is as follows Figure 4 Specifically:
[0057] The server starts the websocket listening service, receives the client's real-time communication request, and after successful authentication, establishes a two-way persistent connection channel to push the changing geographic coordinates of the stereoscopic projection geometric objects in real time; the geographic coordinates of the stereoscopic projection geometric objects at different time points are cached and compressed using Gzip compression technology, which can improve data transmission efficiency and reduce network bandwidth usage. The compressed geographic coordinates of the stereoscopic projection geometric objects are pushed to the successfully connected client; the client decompresses the compressed geographic coordinates of the stereoscopic projection geometric objects after receiving them.
[0058] S5, converting the geographic coordinates of the stereoscopic projection geometric object into map plane coordinates, and rendering the beam projection and beam range to the plane GIS map. Specifically:
[0059] Use Openlayers as the front-end component of the plane GIS map to convert the geographic coordinates of the stereographic projection geometric object into the map plane coordinates; this component provides the method "transform(lonLatCoordinate,'EPSG:4326','EPSG:3857')" for projecting geographic coordinates into plane coordinates;
[0060] The Mercator projection method in Openlayers is used to display the flat GIS map. The GIS layer overlay technology and coordinate movement method are used to render the beam projection and beam range at different time points to the flat GIS map, realize dynamic tracking, and present the dynamic beam projection effect. The dynamic effect of coordinate change is as follows Figure 5 .
[0061] Embodiment 2
[0062] The present invention proposes a system for projecting a dynamic stereoscopic beam range onto a planar GIS map corresponding to the method of the first embodiment. The system block diagram is shown in FIG. Figure 6 As shown. Includes:
[0063] Geographic coordinate parsing module, used to obtain the geographic coordinates of the mobile light source and the beam range;
[0064] The module for splitting geometric objects of geographic coordinates is used to connect all two adjacent coordinate points in the beam range with the coordinates of the light source point to form multiple triangle objects;
[0065] The module of merging geometric objects into geographic coordinates is used to merge all triangle objects into a stereographic projection geometric object;
[0066] Dynamic real-time coordinate information push module, used to push the geographic coordinates of stereoscopic projection geometric objects to the application layer;
[0067] The coordinate conversion and map rendering module is used to convert the geographic coordinates of the stereoscopic projection geometric objects into map plane coordinates, and render the beam projection and beam range to the plane GIS map.
[0068] The implementation methods of each module and module function in the system are completely consistent with the steps of the method in Example 1, so they will not be repeated here.
[0069] Embodiment 3
[0070] The present invention proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method of projecting a dynamic stereoscopic light beam range onto a plane GIS map as described in Example 1 is implemented.
[0071] Embodiment 4
[0072] The present invention provides a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the method of projecting a dynamic stereoscopic light beam range onto a flat GIS map as described in the first embodiment.
[0073] In the embodiments disclosed in the present application, the computer storage medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. The computer storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the above. More specific examples of computer storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.
[0074] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0075] The above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should be regarded as the protection scope of the present invention.
Claims
1. A method for projecting a dynamic stereoscopic beam range onto a planar GIS map, characterized in that: The following steps are involved: S1, obtain the geographical coordinates of the mobile light source and the beam range; S2, connect all two adjacent coordinate points in the light beam range with the coordinates of the light source point to form multiple triangle objects; S3, merging all triangle objects to form a stereoscopic projection geometric object; S4, push the geographic coordinates of the stereoscopic projection geometric object to the application layer; S5. Convert the geographic coordinates of the stereoscopic projection geometric object into map plane coordinates, and render the beam projection and beam range to the plane GIS map.
2. The method for projecting a dynamic stereoscopic beam range onto a planar GIS map according to claim 1, characterized in that: In S1, the geographical coordinates of the mobile light source and the light beam range are obtained as follows: The geographic coordinates of the mobile light source and the beam range are collected in real time. The geographic coordinates at each time point include the geographic coordinates A0 (X0, Y0) of the light source mapped to the GIS map and the geographic coordinate list A1 (X1, Y1), A2 (X2, Y2), A3 (X3, Y3), ..., A n (X n ,Y n ), where A n Indicates the nth point in the range where the beam is projected onto the GIS map, X n Indicates the horizontal coordinate of the nth point, Y n Indicates the ordinate of the nth point.
3. The method for projecting a dynamic stereoscopic beam range onto a planar GIS map as claimed in claim 2, characterized in that: S2 is specifically: Take the light source point as the triangle vertex, connect it with the two adjacent coordinates of all the light beam ranges, traverse the n coordinate points of the light beam range in turn, and generate n triangle objects in Geometry format (A0, A1, A2), (A0, A2, A3), ..., (A0, A n-1 , A n ) and (A0, A n , A1).
4. The method for projecting a dynamic stereoscopic beam range onto a planar GIS map as claimed in claim 2, characterized in that: S3 is specifically: The triangle objects in Geometry format are merged one by one through the UnaryUnionOP.union() method to generate a stereoscopic projection geometry object in Geometry format from the light source point to the light beam range. When the light beam range has n coordinates, the number of coordinates of the formed light beam projection range is (0.5*n+1).
5. The method for projecting a dynamic stereoscopic beam range onto a planar GIS map according to claim 1, characterized in that: S4 is specifically: The server starts the websocket listening service, receives the client's real-time communication request, and after successful authentication, establishes a two-way persistent connection channel to push the changing geographic coordinates of the stereoscopic projection geometric objects in real time; the geographic coordinates of the stereoscopic projection geometric objects at different time points are cached and compressed using the Gzip compression technology, and the compressed geographic coordinates of the stereoscopic projection geometric objects are pushed to the successfully connected client; The client decompresses the geographic coordinates of the compressed stereographic projection geometric object after receiving it.
6. The method for projecting a dynamic stereoscopic beam range onto a planar GIS map according to claim 1, characterized in that: S5 is as follows: Use Openlayers as the front-end component of the flat GIS map to convert the geographic coordinates of the stereographic projection geometric objects into map plane coordinates; The Mercator projection method in Openlayers is used to display the flat GIS map, and the beam projection and beam range at different time points are rendered to the flat GIS map to achieve dynamic tracking.
7. A system for projecting a dynamic stereoscopic beam range onto a flat GIS map, characterized in that: include: Geographic coordinate parsing module, used to obtain the geographic coordinates of the mobile light source and the beam range; The module for splitting geometric objects of geographic coordinates is used to connect all two adjacent coordinate points in the beam range with the coordinates of the light source point to form multiple triangle objects; The module of merging geometric objects into geographic coordinates is used to merge all triangle objects into a stereographic projection geometric object; Dynamic real-time coordinate information push module, used to push the geographic coordinates of stereoscopic projection geometric objects to the application layer; The coordinate conversion and map rendering module is used to convert the geographic coordinates of the stereoscopic projection geometric objects into map plane coordinates, and render the beam projection and beam range to the plane GIS map.
8. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for projecting the dynamic stereoscopic beam range onto a planar GIS map as described in any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: The computer program enables a computer to execute the method of projecting a dynamic stereoscopic beam range onto a planar GIS map as described in any one of claims 1 to 6.