A lightweight method for visualizing ocean scalar fields
By converting marine environmental data into text format and visualizing it in a browser, the problems of high server resource consumption and slow response speed in existing technologies are solved, and efficient visualization of marine scalar fields on embedded devices is achieved.
Patent Information
- Application Number
- CN202210972737.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-15
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2042-08-15
AI Technical Summary
Existing methods for visualizing ocean scalar fields consume a lot of server resources, have slow response times, and require high performance from client devices, making them unsuitable for effective application on embedded devices.
Marine environmental data files are converted into scalar field visualization files in text format and visualized in the browser using ArcGIS API for Javascript, reducing server storage and network transmission load, while the client only needs to draw simple geometric shapes.
It reduces server resource consumption, improves visualization response speed, lowers performance requirements for client devices, and supports applications on embedded devices.
Smart Images

Figure CN116107972B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of marine environmental visualization, and in particular, it is a lightweight method for visualizing marine scalar fields. Background Technology
[0002] Marine environmental data refers to marine element data that represents the state or characteristics of the marine environment. It can be divided into scalar field data and vector field data. Marine scalar field data contains only the magnitude of marine element values without direction, such as temperature, salinity, sea level, and chlorophyll concentration.
[0003] Ocean scalar field visualization refers to the real-time dynamic display of the dynamic changes in ocean environmental scalar field data through visualized images. Ocean scalar field visualization is of great benefit to researchers in analyzing extreme ocean weather, determining ship routes, and predicting fish populations at fishing locations. Large-scale temporal or spatial ocean scalar field visualization can effectively explore the intrinsic laws and developmental changes of the ocean.
[0004] Currently, most domestic marine environmental data management and visualization platforms are developed based on three-dimensional spheres. For example, the "China Coastal Digital Ocean Information Infrastructure Framework," "iOcean China Digital Ocean Public Edition," and "Digital Ocean Application Service System" all adopt a B / S architecture and are developed based on Skyline. There are two main implementation methods for visualizing marine scalar fields under the B / S architecture:
[0005] The first method involves deploying marine environmental data files on the server side and publishing the service. The file data is transmitted over the network, and tasks such as file parsing, scalar field visualization rendering, and geometric drawing are completed on the client's browser side. Figure 1 As shown.
[0006] The second approach involves deploying marine environmental data files on the server side, performing tasks such as file parsing, generating shapefiles, and publishing marine environmental scalar field visualization services (e.g., WFS feature services), and then loading the visualization service on the client's browser via network transmission. Figure 2 As shown.
[0007] These two methods for visualizing ocean scalar fields have the following drawbacks:
[0008] 1. High server resource consumption
[0009] Both existing methods for visualizing ocean scalar fields suffer from excessive server resource consumption. The first method requires storing and publishing a large number of ocean environmental data files on the server. Taking the reanalysis product (CORA V2.0) provided by the National Marine Science Data Center as an example, the data covers scalar elements such as temperature, salinity, and sea surface height, spanning from 1989 to the present, with temporal resolutions including monthly and daily averages. The data volume reaches over 12,000 files, totaling 12TB, significantly consuming server storage resources. The second method requires deploying ocean environmental visualization services on the server. Again using the reanalysis product as an example, the vertical layer depth is 50 layers, meaning each file requires the publication of 50 visualization services, totaling over 60,000 services. This consumes significant server resources and is highly prone to causing system crashes.
[0010] 2. The visualization response speed is not high.
[0011] Existing methods for visualizing ocean scalar fields all require data transmission over the network, and the large data volumes result in slow system response times. The first method requires transmitting ocean environmental data files for selected dates from the server to the browser frontend via the network, and then parsing the files before loading and displaying them on the GIS platform. Taking the CORA V2.0 reanalysis product as an example, the file size typically exceeds 1GB, consuming significant time during network transmission. The large file size further increases the time spent on subsequent file parsing, resulting in slow visualization response times and a poor user experience. The second method requires transmitting visualization service data for selected dates and depths from the server to the browser frontend via the network. Excessive visualization services inevitably degrade server performance, thus also typically leading to slow visualization response times. 3. High performance requirements for client devices.
[0012] Most existing methods for visualizing ocean scalar fields are based on three-dimensional spheres. Loading these spheres requires significant memory and computational resources from the client, thus placing high demands on client device performance. However, in maritime and fishing activities, vessels typically carry only embedded devices with limited storage capacity and poor computational performance, and network transmission speeds are also slow, making existing methods for visualizing ocean scalar fields ineffective in this environment. Summary of the Invention
[0013] The purpose of this invention is to provide a lightweight method for visualizing ocean scalar fields. This method provides users with a visual representation of ocean scalar fields over a large spatiotemporal range. It converts ocean environmental data files into scalar field visualization files in text format (txt), and then uses the ArcGIS API for Javascript to visualize the data files in a browser. This allows for a visual representation of data changes while ensuring fast visualization response, and at the same time saving a significant amount of server resources.
[0014] To achieve the above objectives, the technical solution of the present invention is as follows: A lightweight method for visualizing ocean scalar fields, comprising the following steps:
[0015] (1) Select a grid-based marine environmental data source;
[0016] (2) Data processing: the original grid marine environment data source is converted into SHP format marine scalar field visualization data, and further output in a unified text format;
[0017] (3) Data storage: The generated ocean scalar field visualization data file (txt) is deployed and stored in a fixed directory on the server for reading and access;
[0018] (4) Visualize the marine scalar field data file on a two-dimensional map using ArcGIS API for Javascript.
[0019] Preferably, the marine environmental data source suitable for grid-based applications uses the CORA V2.0 reanalysis product provided by the National Marine Science Data Center.
[0020] Preferably, the specific steps of step (2) are as follows:
[0021] Step 1: Read a marine environmental data file, select an unprocessed element and convert it into grid data in shapefile format, then write the values of each grid point into the attribute table.
[0022] Step 2: Read the shapefile generated in Step 1, perform spatial processing and analysis on the unprocessed next layer data in sequence, convert the grid data into isosurfaces, assign color information to each isosurface according to its value, and output as a shapefile.
[0023] Step 3: Use the isosurfaces formed in Step 2 as input features, clip them using a vector format global land contour layer, output the clipped data as a shapefile format visualization layer, write the numerical range and corresponding color information of each isosurface into the attribute table, and delete the shapefile generated in Step 2.
[0024] Step 4: Read the visualization layer formed in Step 3, use the "feature to point" geoprocessing operation to generate a point-like shapefile format marker layer, and write the feature value range corresponding to each point into the attribute table of the marker layer.
[0025] Step 5: Read the visualization layer shapefile and write the coordinates and color information of the isosurface into a text file;
[0026] Step 6: Read the marked layer shapefile and write the coordinate information and temperature range of each point into the text file generated in Step 5;
[0027] Step 7: Determine whether all depth data has been read and generated. If so, proceed to Step 1 to process the next element; otherwise, proceed to Step 2.
[0028] Preferably, the specific method for visualization in step (4) is as follows: after loading the base map using ArcGIS API for Javascript, for the marine scalar field visualization data file, the method of reading the file from the server and splicing it to generate geometric data is used, and the browser front-end performs parsing and drawing. When the back-end receives a request from the browser front-end user to view a visualization of a certain date and depth, it first splices the date, depth, and features to form the corresponding visualization file name, reads the corresponding visualization data file from the fixed directory according to the name, splices it into a JSON format string that can be parsed by ArcGIS API for Javascript, and then returns it to the browser front-end. The browser front-end completes JSON serialization and reads the isosurface, RGB color, label points, and annotation information in it. Finally, it uses the interface provided by ArcGIS API for Javascript to draw it on the map.
[0029] Preferably, step (4) involves sending a data request from the browser front-end to the server in an asynchronous manner.
[0030] Preferably, step (4) uses a method of limiting the number of faces read in a single reading and drawing multiple times to complete the front-end and back-end data transfer and visualization drawing.
[0031] This invention has the following advantages and positive effects:
[0032] 1. This invention can improve response speed.
[0033] To address the problems of excessively large data source files and high server resource consumption in existing marine scalar field visualization data sources, this invention proposes a processing method based on grid-based marine environmental data files. This method converts marine environmental grid data files into text format (txt) scalar field visualization data files. After conversion, each file is only one-thousandth the size of the original file, providing a reliable and easy-to-use data source for marine scalar field visualization while significantly reducing server storage resource consumption.
[0034] Furthermore, this invention combines the advantages of two existing methods for visualizing ocean scalar fields. While reducing the amount of data transmitted over the network, it places computationally intensive tasks such as data reading and geometric figure splicing on a server with superior performance in the visualization process. The client browser only needs to perform simple geometric figure drawing, which reduces the pressure on the client browser, alleviates the network transmission pressure, and improves the response speed of ocean scalar field visualization.
[0035] 2. This invention supports the deployment of applications on embedded devices.
[0036] Compared to existing methods for visualizing ocean scalar fields, the method proposed in this invention converts the file source processing required for visualization into text files with minimal resource consumption. The processed ocean scalar field visualization data files can then be stored and deployed on embedded devices. This invention utilizes the lightweight ArcGIS API for Javascript to achieve ocean scalar field visualization and proposes a technical workflow including data organization and management, data reading, front-end and back-end data transfer, and visualization rendering. This meets the needs of ocean scalar field visualization, significantly reducing the performance consumption of devices compared to previous visualization methods using 3D spheres, and reducing the performance requirements of client devices, thus making this method more widely applicable. Furthermore, this invention can be deployed on embedded devices even without internet access, providing services such as route planning and fishing location planning for ocean-going vessels and vessels with limited network conditions. Attached Figure Description
[0037] Figure 1 This is a flowchart of the first form of ocean scalar field visualization method under the B / S architecture;
[0038] Figure 2 This is a flowchart of the second form of ocean scalar field visualization method under the B / S architecture;
[0039] Figure 3 This is a flowchart illustrating the principle of the method of the present invention;
[0040] Figure 4 This is a flowchart illustrating the specific data processing steps of this invention. Detailed Implementation
[0041] The present invention will be further described below with reference to specific embodiments. This description pertains only to a few typical embodiments, and the present invention is not limited to the scope described in the embodiments. Substitution of identical or similar prior art methods with some technical features in the embodiments is also within the scope of the description and protection of the present invention.
[0042] See Figure 3 This invention proposes a lightweight method for visualizing ocean scalar fields, comprising the following steps:
[0043] (1) Data source selection
[0044] Marine environmental data is diverse, with various formats including .dat, .nc, .grd, and .lev, and different temporal resolutions. However, it typically contains multiple marine elements and data at different depths. This method addresses these common characteristics and is suitable for grid-based marine environmental data sources, such as the reanalysis product (CORA V2.0) provided by the National Marine Science Data Center.
[0045] (2) Data processing
[0046] Data processing primarily involves processing and converting marine environmental data files, extracting scalar field elements such as sea surface height, temperature, and salinity. Through format conversion, interpolation, and spatial processing analysis, the raw grid data is converted to shapefile (SHP) format, and then further output in a unified text format. The workflow is as follows: Figure 4 As shown:
[0047] Step 1: Read a marine environmental data file, select an unprocessed feature (temperature feature as an example below), convert it into grid data in shapefile format, and write the temperature values of each point into the attribute table.
[0048] Step 2: Read the shapefile generated in Step 1, and sequentially process the unprocessed next layer depth temperature through spatial processing and analysis operations such as interpolation, rendering, and transformation to convert the grid data into isosurfaces. Then, assign color information (such as RGB values) to each isosurface based on its temperature value, and output it as a shapefile.
[0049] Step 3: Using the isosurfaces formed in Step 2 as input features, clip them using a vector format global land contour layer, and output the clipped data as a visual layer in shapefile format. Write the temperature range and corresponding color information of each surface into the attribute table, and delete the shapefile generated in Step 2.
[0050] Step 4: Read the visualization layer formed in Step 3, use the "Feature to Point" geoprocessing operation to generate a point-like shapefile format marker layer, and write the feature value range corresponding to each point into the attribute table of the marker layer.
[0051] Step 5: Read the visualization layer shapefile and write the coordinates and color information of the isosurface into a text file.
[0052] Step 6: Read the marked layer shapefile and write the coordinate information and temperature range of each point into the text file generated in Step 5.
[0053] Step 7: Determine whether all the data for each layer has been read and generated. If so, proceed to step (1) to process the next element; otherwise, proceed to step (2).
[0054] After conversion, a large number of text-formatted ocean scalar field visualization data files will be obtained. Due to the large number of files, to facilitate retrieval and file management, the newly generated text files will be named using a unified rule, including information such as data time, features, and depth. For example, the sea surface height visualization file for January 2008 at a depth of -50 meters can be named "HMG_200801_depth50.txt", where HMG represents the feature sea surface height, 200801 is the time, and depth50 is the depth of -50 meters.
[0055] (3) Data storage
[0056] The generated ocean scalar field visualization data files are deployed and stored in a fixed directory on the server for later retrieval and access.
[0057] (4) Visual expression
[0058] After creating and deploying the ocean scalar field visualization data file, it is still necessary to read the file and visualize it. This method uses ArcGIS API for Javascript to complete the visualization on a two-dimensional map.
[0059] ArcGIS API for Javascript is a set of scripts implemented by ESRI using JavaScript technology to call the ArcGIS Server REST API interface. It provides a lightweight solution for building high-performance, browser-only Web GIS applications. On the client side, the Javascript API can be easily used to call the map services provided by ArcGIS Server as a positioning framework and spatial analysis tools to realize map application and geoprocessing functions.
[0060] After loading the base map using the ArcGIS API for Javascript, the visualization of the marine scalar field data file is completed by reading the file from the server and stitching it together to generate geometric data, with the browser frontend only performing parsing and rendering. When the backend receives a request from a user on the browser frontend to view a visualization of a specific date and depth, it first stitches the date, depth, and features together to form the corresponding visualization file name. Based on the name, it reads the corresponding visualization data file from a fixed directory, then stitches it together into a JSON format string that can be parsed by the ArcGIS API for Javascript, and returns it to the browser frontend. The browser frontend performs JSON serialization and reads information such as isosurfaces, RGB colors, markers, and annotations. Finally, it uses the interfaces provided by the ArcGIS API for Javascript to draw the data onto the map.
[0061] To ensure fast response times, data requests are sent asynchronously from the browser frontend to the server. When reading TXT text information, due to the large number of isosurface data and limitations on the amount of data transferred between the frontend and backend in a single transaction, as well as the amount of geometry drawn in a single transaction using the ArcGIS API for Javascript interface, a method of limiting the number of faces read at one time and drawing multiple times is adopted to complete the data transfer and visualization between the frontend and backend.
[0062] This invention is a highly efficient and automated method for processing marine scalar field data, which reduces server resource consumption, alleviates network transmission pressure, and improves visualization response speed. It is also a visualization representation method based on the ArcGIS API for Javascript, meeting the needs of marine scalar field visualization while reducing the performance requirements of client devices, thus making the method more widely applicable. Furthermore, this invention can be applied to lightweight visualization architectures for embedded devices and can be widely used in ocean navigation and fishing activities, supporting tasks such as route delineation and fishing location planning.
[0063] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A lightweight method for visualizing ocean scalar fields, characterized in that: Includes the following steps: (1) Select a grid-based marine environmental data source; (2) Data processing: The original gridded marine environment data source is converted into SHP format marine scalar field visualization data, and further output in a unified text format; the specific steps are: Step 1: Read a marine environmental data file, select an unprocessed element and convert it into grid data in shapefile format, then write the values of each grid point into the attribute table. Step 2: Read the shapefile generated in Step 1, perform spatial processing and analysis on the unprocessed next layer data in sequence, convert the grid data into isosurfaces, assign color information to each isosurface according to its value, and output as a shapefile. Step 3: Use the isosurfaces formed in Step 2 as input features, clip them using a vector format global land contour layer, output the clipped data as a shapefile format visualization layer, write the numerical range and corresponding color information of each isosurface into the attribute table, and delete the shapefile generated in Step 2. Step 4: Read the visualization layer formed in Step 3, use the "feature to point" geoprocessing operation to generate a point-like shapefile format marker layer, and write the feature value range corresponding to each point into the attribute table of the marker layer. Step 5: Read the visualization layer shapefile and write the coordinates and color information of the isosurface into a text file; Step 6: Read the marked layer shapefile and write the coordinate information and temperature range of each point into the text file generated in Step 5; Step 7: Determine whether all the data for each layer has been read and generated. If so, proceed to Step 1 to process the next element; otherwise, proceed to Step 2. (3) Data storage: The generated ocean scalar field visualization data files are deployed and stored in a fixed directory on the server for reading and retrieval. (4) Visualize the marine scalar field data file on a two-dimensional map using ArcGIS API for Javascript.
2. The lightweight ocean scalar field visualization method according to claim 1, characterized in that: For grid-based marine environmental data sources, the CORA V2.0 reanalysis product provided by the National Marine Science Data Center is used.
3. According to the lightweight marine scalar field visualization method of claim 1, the specific method of visualization expression in step (4) is as follows: after loading the base map using ArcGIS API for Javascript, for the marine scalar field visualization data file, the method of reading the file from the server and splicing it to generate geometric data is used, and the browser front-end performs parsing and drawing; when the back-end receives a request from the browser front-end user to view a visualization of a certain date and depth, it first splices the date, depth, and features to form the corresponding visualization file name, reads the corresponding visualization data file from the fixed directory according to the name, splices it into a JSON format string that can be parsed by ArcGIS API for Javascript, and then returns it to the browser front-end. The browser front-end completes JSON serialization and reads the isosurface, RGB color, label points and annotation information in it, and finally draws it on the map using the interface provided by ArcGIS API for Javascript.
4. The lightweight ocean scalar field visualization method according to claim 3, characterized in that: Step (4) uses an asynchronous method to send data requests from the browser front-end to the server.
5. A lightweight method for visualizing ocean scalar fields according to claim 3, characterized in that: Step (4) uses a method of limiting the number of faces read in a single reading and drawing multiple times to complete the front-end and back-end data transfer and visualization drawing.