CN111859222B - Three-dimensional sea wave display method and device - Google Patents
Three-dimensional sea wave display method and device Download PDFInfo
- Publication number
- CN111859222B CN111859222B CN202010735242.0A CN202010735242A CN111859222B CN 111859222 B CN111859222 B CN 111859222B CN 202010735242 A CN202010735242 A CN 202010735242A CN 111859222 B CN111859222 B CN 111859222B
- Authority
- CN
- China
- Prior art keywords
- dimensional
- wave
- data
- sea
- wave height
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9577—Optimising the visualization of content, e.g. distillation of HTML documents
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention provides a three-dimensional sea wave display method and a device, comprising the following steps: the constructed first file comprises pre-stored wave height data, and the second file comprises pre-stored wave direction data; receiving sea wave selection area data sent by a client, wherein the sea wave selection area data comprises the longitude and latitude of sea waves; searching a first block from blocks prestored in a first file according to the longitude and latitude of the sea wave, and searching a second block from blocks prestored in a second file; searching corresponding two-dimensional wave height data from pre-stored wave height data according to the first block; searching corresponding two-dimensional wave direction data from pre-stored wave direction data according to the second block; sending the two-dimensional wave height data and the two-dimensional wave direction data to the client, so that the client determines the size of the lattice points according to the two-dimensional wave height data and the two-dimensional wave direction data, obtains the columnar three-dimensional sea waves according to the size of the lattice points and the two-dimensional wave height data, displays the columnar three-dimensional sea waves, displays the corresponding three-dimensional sea waves according to the user demands, presents a dynamic effect, and improves the user experience.
Description
Technical Field
The invention relates to the technical field of oceans, in particular to a three-dimensional sea wave display method and a three-dimensional sea wave display device.
Background
At present, a server draws a 3D (3-dimension, 3-dimensional) picture related to ocean waves according to ocean wave parameter data, and stores the 3D picture.
When the client sends the display requirement information to the server, the server searches the corresponding 3D picture according to the display requirement information and sends the corresponding 3D picture to the client. Since the 3D picture sent by the server to the client is a designated area drawn by the server, it cannot be sent according to the area selected by the user in the display demand information.
In addition, these 3D pictures are static pictures, and when the server sends them to the client, no dynamic effect can be exhibited on the client.
Disclosure of Invention
In view of this, the present invention provides a three-dimensional sea wave display method and apparatus, which can display corresponding three-dimensional sea waves according to the requirements of a user, and present a dynamic effect, thereby improving the user experience.
In a first aspect, an embodiment of the present invention provides a three-dimensional ocean wave display method, which is applied to a server, and the method includes:
constructing a first file and a second file, wherein the first file comprises pre-stored wave height data, and the second file comprises pre-stored wave direction data;
receiving sea wave selection area data sent by a client, wherein the sea wave selection area data comprises the longitude and latitude of sea waves;
searching a first block from the blocks prestored in the first file according to the longitude and latitude of the sea wave, and searching a second block from the blocks prestored in the second file;
searching corresponding two-dimensional wave height data from the pre-stored wave height data according to the first block;
searching corresponding two-dimensional wave direction data from the pre-stored wave direction data according to the second block;
sending the two-dimensional wave height data and the two-dimensional wave direction data to a client, so that the client determines the size of a lattice point according to the two-dimensional wave height data and the two-dimensional wave direction data, obtains a columnar three-dimensional sea wave according to the size of the lattice point and the two-dimensional wave height data, and displays the columnar three-dimensional sea wave.
Further, the pre-stored wave height data and the pre-stored wave direction data are obtained by the following method:
acquiring original data, wherein the original data comprises forecast data and observation data;
processing the forecast data and the observation data to obtain wave height data and wave direction data;
storing the wave height data in the first file to obtain the pre-stored wave height data;
and storing the wave direction data in the second file to obtain the pre-stored wave direction data.
In a second aspect, an embodiment of the present invention provides a three-dimensional ocean wave display method, which is applied to a client, and the method includes:
sending sea wave selection area data comprising the longitude and latitude of the sea wave to a server, so that the server searches a first block from blocks prestored in a first file according to the longitude and latitude of the sea wave and searches a second block from blocks prestored in a second file; searching corresponding two-dimensional wave height data from prestored wave height data according to the first block; searching corresponding two-dimensional wave direction data from prestored wave direction data according to the second block;
receiving the two-dimensional wave height data and the two-dimensional wave direction data sent by the server;
determining the size of a grid point according to the two-dimensional wave height data and the two-dimensional wave direction data;
obtaining columnar three-dimensional sea waves according to the size of the grid points and the two-dimensional wave height data;
and displaying the columnar three-dimensional sea waves.
Further, the two-dimensional wave height data includes a wave height field, the two-dimensional wave direction data includes a wave direction field, and determining the size of the lattice point according to the two-dimensional wave height data and the two-dimensional wave direction data includes:
reading the wave height field and the wave direction field;
obtaining the corresponding wave height according to the wave height field;
obtaining the corresponding wave direction size according to the wave direction field;
and obtaining the size of the grid point according to the wave height and the wave direction.
Further, the obtaining of the columnar three-dimensional sea wave according to the size of the lattice point and the two-dimensional wave height data includes:
constructing a three-dimensional coordinate system in a Canvas assembly;
and in the three-dimensional coordinate system, the size of the grid points is taken as an abscissa axis and an ordinate axis, and the wave height is taken as an ordinate axis, so that the columnar three-dimensional sea wave is obtained.
Further, the method further comprises:
acquiring selection operation input by a user on the Canvas component, wherein the selection operation comprises dragging operation or rotating operation;
dragging or rotating the columnar three-dimensional sea waves according to the dragging operation or the rotating operation.
In a third aspect, an embodiment of the present invention provides a three-dimensional sea wave display device, which is applied to a server, and includes:
the device comprises a construction unit, a data processing unit and a data processing unit, wherein the construction unit is used for constructing a first file and a second file, the first file comprises pre-stored wave height data, and the second file comprises pre-stored wave direction data;
the first receiving unit is used for receiving sea wave selection area data sent by the client, and the sea wave selection area data comprises the longitude and latitude of sea waves;
the block searching unit is used for searching a first block from the blocks prestored in the first file according to the longitude and latitude of the sea wave and searching a second block from the blocks prestored in the second file;
the wave height data searching unit is used for searching corresponding two-dimensional wave height data from the pre-stored wave height data according to the first block;
the wave direction data searching unit is used for searching corresponding two-dimensional wave direction data from the pre-stored wave direction data according to the second block;
and the two-dimensional data sending unit is used for sending the two-dimensional wave height data and the two-dimensional wave direction data to a client so that the client determines the size of a lattice point according to the two-dimensional wave height data and the two-dimensional wave direction data, obtains a columnar three-dimensional sea wave according to the size of the lattice point and the two-dimensional wave height data, and displays the columnar three-dimensional sea wave.
In a fourth aspect, an embodiment of the present invention provides a three-dimensional ocean wave display device, which is applied to a client, and the device includes:
the device comprises an area data sending unit, a first file pre-storing unit and a second file pre-storing unit, wherein the area data sending unit is used for sending sea wave selection area data comprising the longitude and latitude of the sea wave to a server so that the server searches a first block from blocks pre-stored in the first file according to the longitude and latitude of the sea wave and searches a second block from blocks pre-stored in the second file; searching corresponding two-dimensional wave height data from prestored wave height data according to the first block; searching corresponding two-dimensional wave direction data from prestored wave direction data according to the second block;
a second receiving unit, configured to receive the two-dimensional wave height data and the two-dimensional wave direction data sent by the server;
the determining unit is used for determining the size of the grid point according to the two-dimensional wave height data and the two-dimensional wave direction data;
the three-dimensional sea wave obtaining unit is used for obtaining columnar three-dimensional sea waves according to the size of the grid points and the two-dimensional wave height data;
and the display unit is used for displaying the columnar three-dimensional sea waves.
In a fifth aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, where the memory stores a computer program operable on the processor, and the processor implements the method described above when executing the computer program.
In a sixth aspect, embodiments of the invention provide a computer readable medium having non-volatile program code executable by a processor, the program code causing the processor to perform the method as described above.
The embodiment of the invention provides a three-dimensional sea wave display method and a device, comprising the following steps: constructing a first file and a second file, wherein the first file comprises pre-stored wave height data, and the second file comprises pre-stored wave direction data; receiving sea wave selection area data sent by a client, wherein the sea wave selection area data comprises the longitude and latitude of sea waves; searching a first block from blocks prestored in a first file according to the longitude and latitude of the sea wave, and searching a second block from blocks prestored in a second file; searching corresponding two-dimensional wave height data from pre-stored wave height data according to the first block; searching corresponding two-dimensional wave direction data from pre-stored wave direction data according to the second block; the two-dimensional wave height data and the two-dimensional wave direction data are sent to the client, so that the client determines the size of the lattice points according to the two-dimensional wave height data and the two-dimensional wave direction data, the columnar three-dimensional sea waves are obtained according to the size of the lattice points and the two-dimensional wave height data, the columnar three-dimensional sea waves are displayed, the corresponding three-dimensional sea waves can be displayed according to the requirements of a user, the dynamic effect is presented, and the user experience is improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a three-dimensional sea wave display method according to a first embodiment of the present invention;
fig. 2 is a flowchart of another three-dimensional sea wave display method according to a second embodiment of the present invention;
fig. 3 is a schematic view of a three-dimensional sea wave display device according to a third embodiment of the present invention;
fig. 4 is a schematic view of another three-dimensional sea wave display device according to a fourth embodiment of the present invention.
Icon:
1-a building unit; 2-a first receiving unit; 3-a block search unit; 4-wave height data search unit; 5-wave direction data searching unit; 6-a two-dimensional data transmission unit; 7-a region data transmitting unit; 8-a second receiving unit; 9-a determination unit; 10-a three-dimensional sea wave acquisition unit; 11-display unit.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
For the understanding of the present embodiment, the following detailed description will be given of the embodiment of the present invention.
The first embodiment is as follows:
fig. 1 is a flowchart of a three-dimensional sea wave display method according to an embodiment of the present invention.
Referring to fig. 1, the execution subject is a server, and the server is connected with a client, and the method includes the following steps:
step S101, constructing a first file and a second file, wherein the first file comprises pre-stored wave height data, and the second file comprises pre-stored wave direction data;
specifically, two files are constructed in a server, namely a first file and a second file; the pre-stored wave height data is stored in the first file, the pre-stored wave direction data is stored in the second file, and the server can search corresponding blocks from the first file and the second file respectively according to the longitude and latitude of the sea wave when receiving the longitude and latitude of the sea wave in the sea wave selection area data, so that the search efficiency can be improved by searching in the first file and the second file simultaneously. The pre-stored wave height data refers to the height of sea waves, and the pre-stored wave direction data refers to the direction of the sea waves, namely the phase position of the sea waves.
Step S102, receiving wave selection area data sent by a client, wherein the wave selection area data comprise the longitude and latitude of waves;
here, the user selects on a GIS (Geographic Information System) map of the client as required to obtain sea wave selection area data, where the sea wave selection area data includes the longitude and latitude of the sea wave, and the longitude and latitude of the sea wave are the longitude of the sea wave and the latitude of the sea wave.
Step S103, searching a first block from blocks prestored in a first file according to the longitude and latitude of the sea wave, and searching a second block from blocks prestored in a second file;
step S104, searching corresponding two-dimensional wave height data from pre-stored wave height data according to the first block;
step S105, searching corresponding two-dimensional wave direction data from prestored wave direction data according to the second block;
specifically, the first file includes pre-stored tiles and pre-stored wave height data, and the second file includes pre-stored tiles and pre-stored wave direction data. When the server receives the longitude and latitude of the sea wave sent by the client, the longitude and latitude of the sea wave are respectively put into the first file and the second file to be searched simultaneously, and therefore the searching efficiency can be improved.
In the searching process, the server searches a first block from a block prestored in a first file according to the longitude and latitude of the sea wave, wherein the first block is the longitude and latitude of the sea wave, namely the longitude and latitude of the corresponding sea wave are searched from the block prestored in the first file according to the longitude and latitude of the sea wave, for example, the longitude and latitude of the sea wave are (116 degrees and 40 degrees N), then the longitude and latitude (116 degrees and 40 degrees N) of the corresponding sea wave are searched from the block prestored in the first file according to the longitude and latitude of the sea wave, and if the longitude and latitude of the corresponding sea wave exist, then corresponding two-dimensional wave height data are searched according to the wave height data prestored in the first file.
Similarly, a second block is searched from a block prestored in a second file according to the longitude and latitude of the sea wave, wherein the second block is the longitude and latitude of the sea wave, namely the longitude and latitude of the corresponding sea wave are searched from the block prestored in the second file according to the longitude and latitude of the sea wave, for example, the longitude and latitude of the sea wave is (106 degrees and 30 degrees N), then the corresponding longitude and latitude (106 degrees and 30 degrees N) of the sea wave are searched from the block prestored in the second file according to the longitude and latitude of the sea wave, and if the corresponding longitude and latitude of the sea wave exist, then the corresponding two-dimensional wave direction data are searched according to the wave direction data prestored in the second file.
And S106, sending the two-dimensional wave height data and the two-dimensional wave direction data to the client, so that the client determines the size of the grid point according to the two-dimensional wave height data and the two-dimensional wave direction data, obtains a columnar three-dimensional sea wave according to the size of the grid point and the two-dimensional wave height data, and displays the columnar three-dimensional sea wave.
Here, the server sends the two-dimensional wave height data and the two-dimensional wave direction data to the client, and then the client performs drawing. In the drawing process, a Canvas assembly is used and initialized, then a three-dimensional coordinate system is established on the Canvas assembly, and cylindrical three-dimensional sea waves are obtained in the three-dimensional coordinate system according to the size of grid points and two-dimensional wave height data.
Further, the pre-stored wave height data and the pre-stored wave direction data are obtained by the following steps:
step S201, acquiring original data, wherein the original data comprises forecast data and observation data;
step S202, processing the forecast data and the observation data to obtain wave height data and wave direction data;
step S203, storing the wave height data in a first file to obtain pre-stored wave height data;
and step S204, storing the wave direction data in a second file to obtain pre-stored wave direction data.
The embodiment of the invention provides a three-dimensional sea wave display method, which is applied to a server and comprises the following steps: constructing a first file and a second file, wherein the first file comprises pre-stored wave height data, and the second file comprises pre-stored wave direction data; receiving sea wave selection area data sent by a client, wherein the sea wave selection area data comprises the longitude and latitude of sea waves; searching a first block from blocks prestored in a first file according to the longitude and latitude of the sea wave, and searching a second block from blocks prestored in a second file; searching corresponding two-dimensional wave height data from pre-stored wave height data according to the first block; searching corresponding two-dimensional wave direction data from pre-stored wave direction data according to the second block; the two-dimensional wave height data and the two-dimensional wave direction data are sent to the client, so that the client determines the size of the lattice points according to the two-dimensional wave height data and the two-dimensional wave direction data, the columnar three-dimensional sea waves are obtained according to the size of the lattice points and the two-dimensional wave height data, the columnar three-dimensional sea waves are displayed, the corresponding three-dimensional sea waves can be displayed according to the requirements of a user, the dynamic effect is presented, and the user experience is improved.
Example two:
fig. 2 is a flowchart of another three-dimensional ocean wave display method according to a second embodiment of the present invention.
Referring to fig. 2, the execution subject is a client, and the method includes the following steps:
step S301, wave selection area data including the longitude and latitude of the wave are sent to a server, so that the server searches a first block from blocks prestored in a first file according to the longitude and latitude of the wave, and searches a second block from blocks prestored in a second file; searching corresponding two-dimensional wave height data from pre-stored wave height data according to the first block; searching corresponding two-dimensional wave direction data from pre-stored wave direction data according to the second block;
step S302, receiving two-dimensional wave height data and two-dimensional wave direction data sent by a server;
step S303, determining the size of the grid point according to the two-dimensional wave height data and the two-dimensional wave direction data;
step S304, obtaining columnar three-dimensional sea waves according to the size of the grid points and the two-dimensional wave height data;
step S305, displaying the columnar three-dimensional sea waves.
Further, the two-dimensional wave height data includes a wave height field, and the two-dimensional wave direction data includes a wave direction field, and the step S303 includes the following steps:
step S401, reading a wave height field and a wave direction field;
step S402, obtaining the corresponding wave height according to the wave height field;
step S403, obtaining the corresponding wave direction size according to the wave direction field;
step S404, obtaining the size of the grid point according to the wave height and the wave direction.
Specifically, the client receives two-dimensional wave height data and two-dimensional wave direction data sent by the server, reads a wave height field in the two-dimensional wave height data and a wave direction field in the two-dimensional wave direction data, and obtains the corresponding wave height according to the wave height field after reading the wave height field and the wave direction field because the wave height field corresponds to the wave height size and the wave direction field corresponds to the wave direction size; obtaining the corresponding wave direction size according to the wave direction field; and obtaining the size of the grid points according to the wave height and the wave direction. For example, the wave height field is height, the wave height size is 100 × 100; the wave direction field is direction, and the wave direction size is 100 x 100; the size of the grid points is 100 x 100.
Further, step S304 includes the following steps:
step S501, constructing a three-dimensional coordinate system in a Canvas assembly;
step S502, in a three-dimensional coordinate system, the size of the grid points is taken as an abscissa axis and an ordinate axis, and the wave height is taken as an ordinate axis, so that the columnar three-dimensional sea wave is obtained.
Further, the method comprises the following steps:
step S601, obtaining selection operation input by a user on a Canvas component, wherein the selection operation comprises dragging operation or rotating operation;
step S602, dragging or rotating the columnar three-dimensional ocean wave according to a dragging operation or a rotating operation.
Specifically, the Canvas component is equivalent to a Canvas, and when the Canvas component is drawn, dragging operation or rotating operation can be performed, so that dragging or rotating of cylindrical three-dimensional sea waves is achieved, and a user can observe in multiple dimensions.
The three-dimensional sea wave display method provided by the embodiment comprises the following steps: sending sea wave selection area data comprising the longitude and latitude of the sea waves to a server, so that the server searches a first block from blocks prestored in a first file according to the longitude and latitude of the sea waves and searches a second block from blocks prestored in a second file; searching corresponding two-dimensional wave height data from pre-stored wave height data according to the first block; searching corresponding two-dimensional wave direction data from pre-stored wave direction data according to the second block; receiving two-dimensional wave height data and two-dimensional wave direction data sent by a server; determining the size of the grid point according to the two-dimensional wave height data and the two-dimensional wave direction data; obtaining columnar three-dimensional sea waves according to the size of the grid points and the two-dimensional wave height data; the columnar three-dimensional sea waves are displayed, the corresponding three-dimensional sea waves can be displayed according to the requirements of the user, the dynamic effect is presented, and the user experience is improved.
Example three:
fig. 3 is a schematic view of a three-dimensional sea wave display device according to a third embodiment of the present invention.
Referring to fig. 3, the apparatus, applied to a server, includes:
the device comprises a construction unit 1 and a display unit, wherein the construction unit is used for constructing a first file and a second file, the first file comprises pre-stored wave height data, and the second file comprises pre-stored wave direction data;
the first receiving unit 2 is used for receiving sea wave selection area data sent by the client, and the sea wave selection area data comprises the longitude and latitude of sea waves;
the block searching unit 3 is used for searching a first block from blocks prestored in a first file according to the longitude and latitude of the sea wave and searching a second block from blocks prestored in a second file;
the wave height data searching unit 4 is used for searching corresponding two-dimensional wave height data from pre-stored wave height data according to the first block;
the wave direction data searching unit 5 is used for searching corresponding two-dimensional wave direction data from the pre-stored wave direction data according to the second block;
and the two-dimensional data sending unit 6 is used for sending the two-dimensional wave height data and the two-dimensional wave direction data to the client so that the client determines the size of the lattice points according to the two-dimensional wave height data and the two-dimensional wave direction data, obtains the columnar three-dimensional sea waves according to the size of the lattice points and the two-dimensional wave height data, and displays the columnar three-dimensional sea waves.
The embodiment of the invention provides a three-dimensional sea wave display device, which is applied to a server and comprises the following components: constructing a first file and a second file, wherein the first file comprises pre-stored wave height data, and the second file comprises pre-stored wave direction data; receiving sea wave selection area data sent by a client, wherein the sea wave selection area data comprises the longitude and latitude of sea waves; searching a first block from blocks prestored in a first file according to the longitude and latitude of the sea wave, and searching a second block from blocks prestored in a second file; searching corresponding two-dimensional wave height data from pre-stored wave height data according to the first block; searching corresponding two-dimensional wave direction data from pre-stored wave direction data according to the second block; the two-dimensional wave height data and the two-dimensional wave direction data are sent to the client, so that the client determines the size of the lattice points according to the two-dimensional wave height data and the two-dimensional wave direction data, the columnar three-dimensional sea waves are obtained according to the size of the lattice points and the two-dimensional wave height data, the columnar three-dimensional sea waves are displayed, the corresponding three-dimensional sea waves can be displayed according to the requirements of a user, the dynamic effect is presented, and the user experience is improved.
Example four:
fig. 4 is a schematic view of another three-dimensional sea wave display device according to a fourth embodiment of the present invention.
Referring to fig. 4, the apparatus, applied to a client, includes:
the area data sending unit 7 is used for sending sea wave selection area data including the longitude and latitude of the sea waves to the server so that the server searches a first block from blocks prestored in a first file according to the longitude and latitude of the sea waves and searches a second block from blocks prestored in a second file; searching corresponding two-dimensional wave height data from pre-stored wave height data according to the first block; searching corresponding two-dimensional wave direction data from pre-stored wave direction data according to the second block;
the second receiving unit 8 is configured to receive the two-dimensional wave height data and the two-dimensional wave direction data sent by the server;
a determining unit 9, configured to determine the size of the lattice point according to the two-dimensional wave height data and the two-dimensional wave direction data;
the three-dimensional sea wave obtaining unit 10 is used for obtaining columnar three-dimensional sea waves according to the size of the grid points and the two-dimensional wave height data;
and the display unit 11 is used for displaying columnar three-dimensional sea waves.
The three-dimensional sea wave display device provided by the embodiment comprises: sending sea wave selection area data comprising the longitude and latitude of the sea waves to a server, so that the server searches a first block from blocks prestored in a first file according to the longitude and latitude of the sea waves and searches a second block from blocks prestored in a second file; searching corresponding two-dimensional wave height data from pre-stored wave height data according to the first block; searching corresponding two-dimensional wave direction data from pre-stored wave direction data according to the second block; receiving two-dimensional wave height data and two-dimensional wave direction data sent by a server; determining the size of the grid point according to the two-dimensional wave height data and the two-dimensional wave direction data; obtaining columnar three-dimensional sea waves according to the size of the grid points and the two-dimensional wave height data; the columnar three-dimensional sea waves are displayed, the corresponding three-dimensional sea waves can be displayed according to the requirements of the user, the dynamic effect is presented, and the user experience is improved.
The embodiment of the invention further provides electronic equipment, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor executes the computer program to realize the steps of the three-dimensional sea wave display method provided by the embodiment.
The embodiment of the present invention further provides a computer readable medium having a non-volatile program code executable by a processor, where the computer readable medium stores a computer program, and the computer program is executed by the processor to perform the steps of the three-dimensional ocean wave display method according to the above embodiment.
The computer program product provided in the embodiment of the present invention includes a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiment, and specific implementation may refer to the method embodiment, which is not described herein again.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.
Claims (10)
1. A three-dimensional sea wave display method is applied to a server, and comprises the following steps:
constructing a first file and a second file, wherein the first file comprises pre-stored wave height data, and the second file comprises pre-stored wave direction data;
receiving sea wave selection area data sent by a client, wherein the sea wave selection area data comprises the longitude and latitude of sea waves;
searching a first block from the blocks prestored in the first file according to the longitude and latitude of the sea wave, and searching a second block from the blocks prestored in the second file;
searching corresponding two-dimensional wave height data from the pre-stored wave height data according to the first block;
searching corresponding two-dimensional wave direction data from the pre-stored wave direction data according to the second block;
sending the two-dimensional wave height data and the two-dimensional wave direction data to the client, so that the client determines the size of a lattice point according to the two-dimensional wave height data and the two-dimensional wave direction data, obtains a columnar three-dimensional sea wave according to the size of the lattice point and the two-dimensional wave height data, and displays the columnar three-dimensional sea wave;
the pre-stored wave height data is the height of sea waves, and the pre-stored wave direction data is the direction of the sea waves;
the sea wave selection area data sent by the client is selected on a GIS map according to requirements;
sending the two-dimensional wave height data and the two-dimensional wave direction data to the client so as to enable the client to draw, using a Canvas assembly in the drawing process, initializing the Canvas assembly, and establishing a three-dimensional coordinate system on the Canvas assembly;
in the three-dimensional coordinate system, obtaining the columnar three-dimensional sea waves according to the size of the grid points and the two-dimensional wave height data; and when the Canvas assembly is drawn, carrying out dragging operation or rotating operation on the columnar three-dimensional sea wave.
2. A three dimensional ocean wave display method according to claim 1 wherein the pre-stored wave height data and the pre-stored wave direction data are obtained by:
acquiring original data, wherein the original data comprises forecast data and observation data;
processing the forecast data and the observation data to obtain wave height data and wave direction data;
storing the wave height data in the first file to obtain the pre-stored wave height data;
and storing the wave direction data in the second file to obtain the pre-stored wave direction data.
3. A three-dimensional sea wave display method is applied to a client side, and comprises the following steps:
sending sea wave selection area data comprising the longitude and latitude of the sea wave to a server, so that the server searches a first block from blocks prestored in a first file according to the longitude and latitude of the sea wave and searches a second block from blocks prestored in a second file; searching corresponding two-dimensional wave height data from prestored wave height data according to the first block; searching corresponding two-dimensional wave direction data from prestored wave direction data according to the second block;
receiving the two-dimensional wave height data and the two-dimensional wave direction data sent by the server;
determining the size of a grid point according to the two-dimensional wave height data and the two-dimensional wave direction data;
obtaining columnar three-dimensional sea waves according to the size of the grid points and the two-dimensional wave height data;
displaying the columnar three-dimensional sea waves;
the pre-stored wave height data is the height of sea waves, and the pre-stored wave direction data is the direction of the sea waves;
the sea wave selection area data is selected on the GIS map according to the requirement;
after receiving the two-dimensional wave height data and the two-dimensional wave direction data sent by the server, drawing, using a Canvas assembly in the drawing process, initializing the Canvas assembly, and establishing a three-dimensional coordinate system on the Canvas assembly;
in the three-dimensional coordinate system, obtaining the columnar three-dimensional sea waves according to the size of the grid points and the two-dimensional wave height data; and when the Canvas assembly is drawn, carrying out dragging operation or rotating operation on the columnar three-dimensional sea wave.
4. A three dimensional ocean wave display method according to claim 3 wherein the two dimensional wave height data includes a wave height field and the two dimensional wave direction data includes a wave direction field, the determining the size of the grid points from the two dimensional wave height data and the two dimensional wave direction data comprising:
reading the wave height field and the wave direction field;
obtaining the corresponding wave height according to the wave height field;
obtaining the corresponding wave direction size according to the wave direction field;
and obtaining the size of the grid point according to the wave height and the wave direction.
5. A three dimensional ocean wave display method according to claim 3 wherein the obtaining of columnar three dimensional ocean waves from the grid point size and the two dimensional wave height data comprises:
constructing a three-dimensional coordinate system in a Canvas assembly;
and in the three-dimensional coordinate system, the size of the grid points is taken as an abscissa axis and an ordinate axis, and the wave height is taken as an ordinate axis, so that the columnar three-dimensional sea wave is obtained.
6. A three dimensional ocean wave display method according to claim 5 and further comprising:
acquiring selection operation input by a user on the Canvas component, wherein the selection operation comprises dragging operation or rotating operation;
dragging or rotating the columnar three-dimensional sea waves according to the dragging operation or the rotating operation.
7. A three-dimensional sea wave display device is characterized by being applied to a server and comprising:
the device comprises a construction unit, a data processing unit and a data processing unit, wherein the construction unit is used for constructing a first file and a second file, the first file comprises pre-stored wave height data, and the second file comprises pre-stored wave direction data;
the first receiving unit is used for receiving sea wave selection area data sent by the client, and the sea wave selection area data comprises the longitude and latitude of sea waves;
the block searching unit is used for searching a first block from the blocks prestored in the first file according to the longitude and latitude of the sea wave and searching a second block from the blocks prestored in the second file;
the wave height data searching unit is used for searching corresponding two-dimensional wave height data from the pre-stored wave height data according to the first block;
the wave direction data searching unit is used for searching corresponding two-dimensional wave direction data from the pre-stored wave direction data according to the second block;
the two-dimensional data sending unit is used for sending the two-dimensional wave height data and the two-dimensional wave direction data to a client so that the client can determine the size of a lattice point according to the two-dimensional wave height data and the two-dimensional wave direction data, obtain a columnar three-dimensional sea wave according to the size of the lattice point and the two-dimensional wave height data, and display the columnar three-dimensional sea wave;
the pre-stored wave height data is the height of sea waves, and the pre-stored wave direction data is the direction of the sea waves;
the sea wave selection area data sent by the client is selected on a GIS map according to requirements; sending the two-dimensional wave height data and the two-dimensional wave direction data to the client so as to enable the client to draw, using a Canvas assembly in the drawing process, initializing the Canvas assembly, and establishing a three-dimensional coordinate system on the Canvas assembly;
in the three-dimensional coordinate system, obtaining the columnar three-dimensional sea waves according to the size of the grid points and the two-dimensional wave height data; and when the Canvas assembly is drawn, carrying out dragging operation or rotating operation on the columnar three-dimensional sea wave.
8. A three-dimensional sea wave display device is applied to a client side, and the device comprises:
the device comprises an area data sending unit, a first file pre-storing unit and a second file pre-storing unit, wherein the area data sending unit is used for sending sea wave selection area data comprising the longitude and latitude of the sea wave to a server so that the server searches a first block from blocks pre-stored in the first file according to the longitude and latitude of the sea wave and searches a second block from blocks pre-stored in the second file; searching corresponding two-dimensional wave height data from prestored wave height data according to the first block; searching corresponding two-dimensional wave direction data from prestored wave direction data according to the second block;
a second receiving unit, configured to receive the two-dimensional wave height data and the two-dimensional wave direction data sent by the server;
the determining unit is used for determining the size of the grid point according to the two-dimensional wave height data and the two-dimensional wave direction data;
the three-dimensional sea wave obtaining unit is used for obtaining columnar three-dimensional sea waves according to the size of the grid points and the two-dimensional wave height data;
the display unit is used for displaying the columnar three-dimensional sea waves;
the pre-stored wave height data is the height of sea waves, and the pre-stored wave direction data is the direction of the sea waves;
the sea wave selection area data is selected on the GIS map according to the requirement;
after receiving the two-dimensional wave height data and the two-dimensional wave direction data sent by the server, drawing, using a Canvas assembly in the drawing process, initializing the Canvas assembly, and establishing a three-dimensional coordinate system on the Canvas assembly;
in the three-dimensional coordinate system, obtaining the columnar three-dimensional sea waves according to the size of the grid points and the two-dimensional wave height data; and when the Canvas assembly is drawn, carrying out dragging operation or rotating operation on the columnar three-dimensional sea wave.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1-6 when executing the computer program.
10. A computer-readable medium having non-volatile program code executable by a processor, wherein the program code causes the processor to perform the method of any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010735242.0A CN111859222B (en) | 2020-07-28 | 2020-07-28 | Three-dimensional sea wave display method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010735242.0A CN111859222B (en) | 2020-07-28 | 2020-07-28 | Three-dimensional sea wave display method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111859222A CN111859222A (en) | 2020-10-30 |
CN111859222B true CN111859222B (en) | 2021-09-14 |
Family
ID=72947719
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010735242.0A Active CN111859222B (en) | 2020-07-28 | 2020-07-28 | Three-dimensional sea wave display method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111859222B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103700143A (en) * | 2013-12-30 | 2014-04-02 | 四川九洲电器集团有限责任公司 | Three-dimensional dynamic marine simulation method based on GPU (Graphics Processing Unit) multi-pass drawing |
CN109299343A (en) * | 2018-09-05 | 2019-02-01 | 上海彩虹鱼海洋科技股份有限公司 | A kind of dynamic and visual method and system towards multi-source global ocean big data |
CN110097224A (en) * | 2019-05-05 | 2019-08-06 | 中国科学院海洋研究所 | A kind of visualization storm tide-wave coupling forecasting method |
CN110196986A (en) * | 2019-03-06 | 2019-09-03 | 智慧航海(青岛)科技有限公司 | The most short endurance Route optimization method of unmanned ship based on weather environment information |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160055280A1 (en) * | 2014-08-20 | 2016-02-25 | Matthews-Daniel Company | System for predictive failure analysis of offshore platform placement and safe recovery from rapid leg penetration incidents |
-
2020
- 2020-07-28 CN CN202010735242.0A patent/CN111859222B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103700143A (en) * | 2013-12-30 | 2014-04-02 | 四川九洲电器集团有限责任公司 | Three-dimensional dynamic marine simulation method based on GPU (Graphics Processing Unit) multi-pass drawing |
CN109299343A (en) * | 2018-09-05 | 2019-02-01 | 上海彩虹鱼海洋科技股份有限公司 | A kind of dynamic and visual method and system towards multi-source global ocean big data |
CN110196986A (en) * | 2019-03-06 | 2019-09-03 | 智慧航海(青岛)科技有限公司 | The most short endurance Route optimization method of unmanned ship based on weather environment information |
CN110097224A (en) * | 2019-05-05 | 2019-08-06 | 中国科学院海洋研究所 | A kind of visualization storm tide-wave coupling forecasting method |
Non-Patent Citations (1)
Title |
---|
三维随机海浪运动的交互式视景仿真技术研究;付金丽;《中国优秀硕士学位论文全文数据库 信息科技辑》;20130215(第2期);第7-46页 * |
Also Published As
Publication number | Publication date |
---|---|
CN111859222A (en) | 2020-10-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101667345B1 (en) | System and method of indicating transition between street level images | |
CN102542905B (en) | Image processing apparatus and image processing method | |
US20160063671A1 (en) | A method and apparatus for updating a field of view in a user interface | |
EP3058451B1 (en) | Techniques for navigation among multiple images | |
US20130271479A1 (en) | Efficient pre-computing of simplified vector data for rendering at multiple zoom levels | |
CN104350498A (en) | System and method for storing and retrieving geospatial data | |
EP2595118A2 (en) | Methods for providing 3d building information | |
JP5028790B2 (en) | Information processing apparatus, information processing method, and program | |
CN103020250A (en) | Map display method and device of geographic information system (GIS) | |
JP4993637B2 (en) | Air tag display system | |
KR20160113123A (en) | Method for selecting data files for downloading | |
JP2014191367A (en) | Building display device, building display system, building display method and building display program | |
CN111859222B (en) | Three-dimensional sea wave display method and device | |
CN112463093B (en) | Multi-display terminal icon data display method and system and computer storage medium | |
US20150109328A1 (en) | Techniques for navigation among multiple images | |
JP2017017674A (en) | Vertical axis calibration device, method, and program | |
KR102445530B1 (en) | Method and apparatus for visualization of public welfare activities | |
JP5330946B2 (en) | 3D image display program, portable device such as a mobile phone having a 3D image display function, and 3D image display method | |
CN111858822A (en) | Method and device for displaying spliced pictures of GIS map | |
JP5705793B2 (en) | Augmented reality display device, augmented reality display system, augmented reality display method, and augmented reality display program | |
CN112950783A (en) | Three-dimensional dynamic loading method and device for raster data | |
CN112118474B (en) | Video barrage display method and system, computer equipment and readable storage medium | |
JP4884458B2 (en) | Map display apparatus and method for displaying area with comparison object | |
CN113064572A (en) | Three-dimensional space-time simulation method and device for remote sensing image data | |
CN113342916A (en) | Geographic label image file format data processing method and device and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |