Grid data visualization method, device, equipment and medium based on C#
By setting interaction rules and NetCDF clipping technology, combined with MapGIS IGS and Web map services, the problem of low grid data extraction and visualization efficiency is solved, efficient processing and multi-dimensional display are achieved, and user experience and data sharing are improved.
Patent Information
- Application Number
- CN202410923174.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-07-10
AI Technical Summary
Existing grid data extraction methods are inefficient when processing continuous time periods and multiple time periods, and cannot perform regional operations in batches, resulting in long data processing time, coordinate point information loss during the cropping process, and poor data visualization effects. .
By setting the visual interaction rule constraints of meteorological and oceanic data, connecting to the environmental simulation resource library to batch package grid product data, and using NetCDF clipping technology, combined with MapGIS IGS and Web map services, to achieve multiple product clipping and data visualization display, supporting multi-dimensional Page display.
It improves the processing efficiency and visualization effect of grid data, improves user interaction experience, promotes network sharing and accessibility of data, and solves the problems of efficient processing, high-quality visualization and data sharing.
Smart Images

Figure CN118467623B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of meteorological and oceanographic data visualization, and in particular to a C#-based grid data visualization method, device, equipment and medium. Background Art
[0002] At present, grid data plays an important role in the research of environmental simulation. During the research, it is necessary to extract, analyze and apply grid data to meet the production of simulation training data for specific areas.
[0003] The existing grid data extraction methods generally process and analyze the data of a single area and a single period; when extracting and analyzing continuous time periods and multiple time periods, it is not possible to perform regional operations in batches, and the operation process has disadvantages such as long time consumption and low efficiency. At the same time, when cutting and extracting grid data, there are problems such as loss of information such as coordinate points, and the effect of data visualization is generally poor.
[0004] The existing regional scale extraction methods for grid data have the following problems: they cannot automatically extract regional scale in batches, lack processing methods for grid regional data with different spatial precision, have low grid data extraction efficiency and low extraction accuracy, and have average visualization presentation methods and effects. Summary of the invention
[0005] Based on this, it is necessary to provide a C#-based grid data visualization method, device, equipment and medium that can ensure processing accuracy while displaying grid data in multiple dimensions in response to the above technical problems.
[0006] A grid data visualization method based on C#, the method comprising:
[0007] Set visualization interaction rule constraints for meteorological and oceanographic data, where the visualization interaction rule constraints include data extraction constraints and data clipping constraints.
[0008] According to the data extraction constraints, the environmental simulation resource library is connected to batch package the meteorological and ocean grid product data to obtain the grid data package.
[0009] The grid data package is clipped by NetCDF according to the data clipping constraint conditions to obtain the NetCDF original data set, and the NetCDF original data set is clipped by multiple product clipping to obtain the NetCDF grid data package.
[0010] The NetCDF grid data package is processed according to the scene display requirements, and MapGIS IGS is used to publish the processed NetCDF grid data package to the Web map service for visual display.
[0011] In one of the embodiments, it also includes: setting visualization interaction rule constraints of meteorological and oceanographic data according to element information of meteorological and oceanographic data.
[0012] In one of the embodiments, it also includes: connecting to the environmental simulation resource library to query the meteorological and oceanographic data according to the data extraction constraint conditions, and packaging and downloading the meteorological and oceanographic grid product data corresponding to the data extraction constraint conditions to obtain a grid data packet.
[0013] In one of the embodiments, it also includes: performing NetCDF clipping on the grid data packet according to the data clipping constraint condition to obtain the NetCDF original data set, and using the typical weather process product clipping method and the underwater three-dimensional rapid reconstruction product clipping method to perform data clipping according to each dimensional element information of the grid data in the NetCDF original data set to obtain the NetCDF grid data packet.
[0014] In one of the embodiments, it also includes: using the typical weather process product clipping method and the underwater three-dimensional rapid reconstruction product to call the corresponding clipping function in C# to perform data clipping according to each dimensional element information of the grid data in the NetCDF original data set to obtain a NetCDF grid data packet.
[0015] In one embodiment, the data extraction constraint supports setting encryption and packaging options of meteorological and oceanographic grid product data in advance. The clipping function includes: a ClipTypicalWeatherByRect function corresponding to the clipping method of the typical weather process product and a ClipUnderwater3DrapidRecsByRect function corresponding to the underwater 3D rapid reconstruction product.
[0016] In one of the embodiments, it also includes: processing the NetCDF grid data packet according to the scene display requirements, if the current selected scene display is a two-dimensional display, the MapGIS desktop system is used to detect the structure definition of the NetCDF grid data packet, and the NetCDF grid data packet is processed according to the structure definition. If the data structure of the data in the NetCDF grid data packet is a two-dimensional or higher-dimensional feature variable, the data structure of the data element in the NetCDF grid data packet is converted to a two-dimensional data format, and the NetCDF grid data packet in the two-dimensional data format is published through ncWMS for visual display. If the data structure of the data in the NetCDF grid data packet is a two-dimensional feature variable, the NetCDF grid data packet in the two-dimensional data format is published through ncWMS for WMS service for visual display. If the current selected scene display is a three-dimensional display, the MapGIS desktop system is used to detect the structure definition of the NetCDF grid data packet, and an HDB spatial database is created in the MapGIS10.6 database. After the NetCDF grid data packets are batch imported into the HDB spatial database, the data structure of the NetCDF grid data packet is parsed to generate grid voxel model data, and the grid voxel model data is published to the Web map service through MapGIS IGS for visual preview display.
[0017] A C#-based grid data visualization device, the device comprising:
[0018] The constraint setting module is used to set the visual interaction rule constraint conditions of meteorological and oceanographic data, wherein the visual interaction rule constraint conditions include data extraction constraint conditions and data clipping constraint conditions.
[0019] The grid data packet acquisition module is used to connect the environmental simulation resource library to batch package the meteorological and ocean grid product data according to the data extraction constraints to obtain the grid data packet.
[0020] The clipping data acquisition module is used to perform NetCDF clipping on the grid data package according to the data clipping constraint conditions to obtain the NetCDF original data set, and adopt the multiple product clipping method to clip the NetCDF original data set to obtain the NetCDF grid data package.
[0021] The Web preview display module is used to process NetCDF grid data packets according to scene display requirements, and use MapGISIGS to publish the processed NetCDF grid data packets to the Web map service for visual display.
[0022] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0023] Set visualization interaction rule constraints for meteorological and oceanographic data, where the visualization interaction rule constraints include data extraction constraints and data clipping constraints.
[0024] According to the data extraction constraints, the environmental simulation resource library is connected to batch package the meteorological and ocean grid product data to obtain the grid data package.
[0025] The grid data package is clipped by NetCDF according to the data clipping constraint conditions to obtain the NetCDF original data set, and the NetCDF original data set is clipped by multiple product clipping to obtain the NetCDF grid data package.
[0026] The NetCDF grid data package is processed according to the scene display requirements, and MapGIS IGS is used to publish the processed NetCDF grid data package to the Web map service for visual display.
[0027] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0028] Set visualization interaction rule constraints for meteorological and oceanographic data, where the visualization interaction rule constraints include data extraction constraints and data clipping constraints.
[0029] According to the data extraction constraints, the environmental simulation resource library is connected to batch package the meteorological and ocean grid product data to obtain the grid data package.
[0030] The grid data package is clipped by NetCDF according to the data clipping constraint conditions to obtain the NetCDF original data set, and the NetCDF original data set is clipped by multiple product clipping to obtain the NetCDF grid data package.
[0031] The NetCDF grid data package is processed according to the scene display requirements, and MapGIS IGS is used to publish the processed NetCDF grid data package to the Web map service for visual display.
[0032] The above-mentioned C#-based grid data visualization method, device, equipment and medium, by setting specific data extraction constraints and data clipping constraints, accurately extract and clip constraints, and efficiently extract and process meteorological and oceanographic grid product data from a large-scale environmental simulation resource library. By using the NetCDF format and fast three-dimensional reconstruction technology, in conjunction with MapGIS IGS and Web map services, seamless integration from data processing to visualization is achieved, processing efficiency is improved, and high-quality visualization effects are generated. At the same time, the NetCDF grid data packet can be processed according to the scene display requirements to achieve multi-dimensional page visualization, which greatly improves the user's interactive experience and enables users to intuitively and deeply understand complex multi-dimensional data. In addition, the solution also promotes network sharing and accessibility of data, expanding the scope of data visualization from local viewing to wide sharing. Overall, it solves the technical problems of efficient processing, high-quality visualization, improvement of user interaction experience and data sharing of meteorological and oceanographic data, and realizes the optimization of the whole process from data extraction to multi-dimensional visualization. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A schematic diagram of a flow chart of a grid data visualization method based on C# in one embodiment;
[0034] Figure 2 A schematic diagram of a process of mesh data clipping, extraction and visualization steps based on C# in one embodiment;
[0035] Figure 3 A preview effect diagram of raster voxel metadata generated in one embodiment;
[0036] Figure 4 This is a visualization diagram of underwater 3D rapid reconstruction product data before and after cropping in one embodiment, where Figure 4 (a) is the visualization diagram before cropping. Figure 4 (b) is the cropped visualization image;
[0037] Figure 5 It is a structural block diagram of a grid data visualization device based on C# in one embodiment;
[0038] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0040] In one embodiment, Figure 1 As shown, a C#-based grid data visualization method is provided, including the following steps:
[0041] Step 102, setting the visualization interaction rule constraints of the meteorological and oceanographic data.
[0042] Visual interaction rule constraints include data extraction constraints and data clipping constraints.
[0043] Set the visual interaction rule constraints, including environment type, data type, product classification, spatial range (maximum longitude, minimum longitude, maximum latitude, minimum latitude), time range (start time and end time), feature type and other custom conditions. Select product data under meteorological and oceanographic environment, product type is underwater 3D rapid reconstruction product; select longitude: 24.1-24.5° for spatial range, latitude range: 101.2-102.3°; start time and end time are 2023-11-07~2023-11-25 respectively; all feature types are checked; no other constraints.
[0044] Step 104, according to the data extraction constraint condition, the environmental simulation resource library is connected to batch package the meteorological and oceanographic grid product data to obtain a grid data packet.
[0045] Specifically, a certain environmental simulation resource library is then connected according to the constraint conditions, and the data in the library is automatically queried according to the set environment type, data type, spatial range, product type, time range, element type and other conditions.
[0046] Furthermore, the data that meets the conditions is automatically downloaded and packaged. The constraints of data extraction support the setting of packaging and encryption options in advance. If not selected, the queried list data is packaged and downloaded by default.
[0047] Step 106, perform NetCDF clipping on the grid data package according to the data clipping constraint condition to obtain a NetCDF original data package, and use a multiple product clipping method to clip the NetCDF original data package to obtain a NetCDF grid data package.
[0048] Specifically, the packaged downloaded data is clipped according to the constrained spatial range, time range and other conditions. The underwater 3D rapid reconstruction product data contains multi-dimensional element information such as temperature, sea surface height, salinity, density, pressure, V-direction flow velocity and U-direction flow velocity.
[0049] In particular, the cropped product NetCDF original dataset supports: 1. Supports the cropping of the NetCDF data typical weather process product underwater 3D rapid reconstruction product provided by the environmental system according to the rectangular range; 2. Supports the single file cropping of the NetCDF data underwater 3D rapid reconstruction product provided by the environmental system; 3. Supports the cropping of the folder path where the data is stored and the original NetCDF data name that contains Chinese characters.
[0050] Step 108, processing the NetCDF grid data package according to the scene display requirements, and using MapGIS IGS to publish the processed NetCDF grid data package to the Web map service for visual display.
[0051] Specifically, the system automatically detects the folder where the NetCDF raw data that has been downloaded in batches is located, automatically loops through to obtain the NetCDF raw data files, and automatically calls the methods in the C# function dynamic link library (.net framework v4.5.2) for the newly added NetCDF raw data files to clip the NetCDF raw data files. The ClipTypicalWeatherByRect method is called to clip the typical weather process product NetCDF data, the ClipUnderwater3DRapidRecsByRect method is called to clip the underwater 3D rapid reconstruction product NetCDF data, and so on. The system uses the clipping function in the clipping class to clip a single file of the underwater 3D rapid reconstruction product as follows:
[0052] using NetCDFClip;
[0053] / / Single file cutting of underwater 3D fast reconstruction product
[0054] string srcUrl = @"originaldata\underwater3DrapidRecs\CUR2022070101.nc";
[0055] string dstUrl = @"resultdata\underwater3DrapidRecs\outputcur.nc";
[0056] double startLat = 0.0; / / Starting latitude index
[0057] double endLat = 40.0; / / End latitude index
[0058] double startLon = 70.0; / / Start longitude index
[0059] double endLon = 110.0; / / End longitude index
[0060] double[] rect = new double[4]{ startLon, endLon, startLat, endLat};
[0061] ClipData.ClipUnderwater3DRapidRecsByRect(srcUrl, dstUrl, 0, rect);
[0062] Furthermore, the underwater 3D rapid reconstruction product NetCDF data file generated by clipping is stored in the underwater3DrapidRecs folder of the resultdata folder by default. The system uses the C# function dynamic link library to perform the clipping operation, and the output log file is netcdfclip.log in the same directory; after the clipping process of the above grid product data file is completed, the log will output the basic information of the original NetCDF data, the path of the clipped NetCDF file, the size and number of data files, the overall execution time of all data files, the number and cause of error data files, and the execution time of a single data file, etc., to evaluate the efficiency of the program.
[0063] Furthermore, the system automatically creates an HDB spatial database in the database management of MapGIS10.6 to store NetCDF format data; then, the system automatically imports NetCDF format file data in batches in the raster element dataset; finally, the system automatically generates raster element model data by parsing and converting the NetCDF data, which can be displayed in the three-dimensional scene of the system view, such as Figure 3 shown.
[0064] Furthermore, the confirmed release files are integrated and browsed in the system using WebView container technology to view information of different dimensions of underwater 3D rapid reconstruction product data. Specifically, C# uses NetCDF to read [Underwater 3D Rapid Reconstruction Product->CUR2022070101.nc], and clips the latitudinal flow (CUR) through the longitude and latitude rectangular range (xmin, xmax, ymin, ymax) to output the clipped NetCDF file (outputcur.nc), and use the system to open the effect for comparison. In addition, WebView container technology is used to visualize the raster voxel model data on multi-dimensional pages. In this implementation case, the visualization results of the CUR2022070101.nc data before and after clipping are shown as follows. Figure 4 shown.
[0065] In the above C#-based grid data visualization method, by setting specific data extraction constraints and data clipping constraints, accurate data extraction and clipping constraints are implemented, and meteorological and oceanographic grid product data are efficiently extracted and processed from a large-scale environmental simulation resource library. By using the NetCDF format and fast three-dimensional reconstruction technology, in conjunction with MapGIS IGS and Web map services, seamless integration from data processing to visualization is achieved, processing efficiency is improved, and high-quality visualization effects are generated. At the same time, the NetCDF grid data packet can be processed according to the scene display requirements to achieve multi-dimensional page visualization, which greatly improves the user's interactive experience and enables users to intuitively and deeply understand complex multi-dimensional data. In addition, the solution also promotes network sharing and accessibility of data, expanding the scope of data visualization from local viewing to wide sharing. Overall, the technical problems of efficient processing, high-quality visualization, improved user interaction experience, and data sharing of meteorological and oceanographic data are solved, and the full process optimization from data extraction to multi-dimensional visualization is achieved.
[0066] In one of the embodiments, the visualization interaction rule constraint conditions of the meteorological and oceanographic data are set according to the element information of the meteorological and oceanographic data.
[0067] In one of the embodiments, the environmental simulation resource library is connected to query the meteorological and oceanographic data according to the data extraction constraint condition, and the meteorological and oceanographic grid product data corresponding to the data extraction constraint condition is packaged and downloaded to obtain a grid data packet.
[0068] In one of the embodiments, NetCDF clipping is performed on the grid data packet according to the data clipping constraint condition to obtain the NetCDF original data set, and the typical weather process product clipping method and the underwater three-dimensional rapid reconstruction product clipping method are respectively used to perform data clipping according to each dimensional element information of the grid data in the NetCDF original data set to obtain the NetCDF grid data packet.
[0069] In one of the embodiments, a typical weather process product clipping method and an underwater three-dimensional rapid reconstruction product are respectively used to call the corresponding clipping function in C# to perform data clipping according to each dimensional element information of the grid data in the NetCDF original data set to obtain a NetCDF grid data packet.
[0070] In one embodiment, the data extraction constraint supports setting encryption and packaging options of meteorological and oceanographic grid product data in advance. The clipping function includes: a ClipTypicalWeatherByRect function corresponding to the clipping method of the typical weather process product and a ClipUnderwater3DrapidRecsByRect function corresponding to the underwater 3D rapid reconstruction product.
[0071] It is worth noting that the input, output and return parameters of the trimming function are as follows:
[0072] 1) The input parameters of the cropping function are shown in Table 1 and Table 2:
[0073] Table 1 ClipTypicalWeatherByRect function input parameter description
[0074]
[0075] Table 2 ClipUnderwater3DRapidRecsByRect function input parameter description
[0076]
[0077] 2) The return parameters of the cropping function are shown in Table 3 and Table 4:
[0078] Table 3 ClipTypicalWeatherByRect function return parameter description
[0079]
[0080] Table 4 ClipUnderwater3DRapidRecsByRect function return parameter description
[0081]
[0082] After the NetCDF data of the underwater 3D rapid reconstruction product is clipped, the data evaluation is as follows:
[0083] Data name: CUR2022070101.nc
[0084] Data Type: Zonal Flow
[0085] Data size: 73.6 MB
[0086] Clipping range: [xmin: 70.0, xmax: 110.0, ymin: 30.0, ymax: 40.0]
[0087] Cropping time: 322.4745 ms
[0088] In one of the embodiments, the NetCDF grid data packet is processed according to the scene display requirements. If the currently selected scene display is a two-dimensional display, the MapGIS desktop system is used to detect the structural definition of the NetCDF grid data packet, and the NetCDF grid data packet is processed according to the structural definition. If the data structure of the data in the NetCDF grid data packet is a two-dimensional or higher-dimensional feature variable, the data structure of the data element in the NetCDF grid data packet is converted to a two-dimensional data format, and the NetCDF grid data packet in the two-dimensional data format is published through ncWMS for visual display. If the data structure of the data in the NetCDF grid data packet is a two-dimensional feature variable, the NetCDF grid data packet in the two-dimensional data format is published through ncWMS for WMS service for visual display. If the currently selected scene display is a three-dimensional display, the MapGIS desktop system is used to detect the structural definition of the NetCDF grid data packet, and an HDB spatial database is created in the MapGIS10.6 database. After the NetCDF grid data packets are batch imported into the HDB spatial database, the data structure of the NetCDF grid data packet is parsed to generate grid voxel model data, and the grid voxel model data is published to the Web map service through MapGIS IGS for visual preview display.
[0089] It is worth noting that before publishing, the raster cells need to be successfully installed and deployed in the MapGIS10.6 operating environment. The specific steps for ncWMS data parsing and publishing are as follows:
[0090] (1) Data acquisition: The system automatically detects the folder where the clipped NetCDF result data is located, and automatically loops through it to obtain the NetCDF result data file;
[0091] (2) Data parsing: The system automatically calls the datasetStatus method of ncWMS to detect the data, check whether it conforms to the structure definition of NetCDF, determine whether the data is a two-dimensional feature variable, and obtain data according to conditions (depth / time) for data with feature dimensions greater than two dimensions, convert the data into two-dimensional data, and call the ncWMS service to parse the processed NetCDF data;
[0092] (3) Data publishing: The system automatically calls the addDataSet method of the ncWMS service to publish single-file data, and the system automatically calls the encapsulated batchPublish method to publish data in batches.
[0093] In addition, the specific steps for generating raster metadata are as follows:
[0094] (1) Create a spatial database: The system automatically creates an HDB spatial database in the database management of MapGIS10.6 to store NetCDF format data;
[0095] (2) Batch import of grid data: The system automatically batch imports NetCDF format file data in the grid voxel dataset;
[0096] (3) Data generation: The system automatically generates raster volume model data by parsing and converting NetCDF data. The data can be displayed in the three-dimensional scene of the system view. The display effect is as follows: Figure 4 As shown, Figure 4 (a) is the visualization diagram before cropping. Figure 4 (b) is the cropped visualization image.
[0097] It can be seen that the file and metadata relationship preservation interface is used to automatically connect to the thematic database to obtain information in the thematic database. Through the rule matching query interface and the metadata file query interface, based on the visual interaction rule constraints, the meteorological and oceanographic data that meet the conditions are obtained. The above-mentioned grid product data files that meet the conditions are automatically packaged in batches. After downloading, the current data is automatically cropped based on the time, range, elements, etc. constrained in the visual interaction rule constraints until all the data are cropped. The cropped output format is NetCDF, so that the meteorological and oceanographic data sets can be efficiently stored, managed, acquired and distributed, and a large amount of array-oriented data can also be efficiently transmitted.
[0098] Then, using ncWMS, the generated meteorological and ocean grid product catalog is automatically published as a Web map service, and the web catalog is searched, added, deleted, and modified, and the published results are previewed.
[0099] Finally, the extracted and cropped meteorological and oceanic grid data are output and visualized. The WebView container technology is used to integrate the browsing data in the tool system to intuitively display the results of meteorological and oceanic data extraction and cropping, which is convenient for scientific researchers and project personnel to conduct cropping, extraction and visualization research on meteorological and oceanic data.
[0100] In one embodiment, if Figure 2 As shown, a C#-based grid data clipping, extraction and visualization step is provided, which specifically includes:
[0101] S1: Set the visual interaction rule constraints of meteorological and oceanographic data, including data extraction constraints and data clipping constraints;
[0102] S2: Connect to a certain environment simulation resource library and query data using the set data extraction constraints;
[0103] S3: Batch download of grid product data files that meet the requirements;
[0104] S4: Use the time, range, elements, etc. set in the data clipping constraints to clip and extract the grid data under the limited conditions, and save the clipped and extracted grid data in NetCDF format. Batch process the grid product data until all files are processed;
[0105] S5: Use ncWMS to publish the generated grid product catalog or desktop-based raster voxel dataset to Web map service;
[0106] S6: Use WebView container technology to integrate and browse underwater 3D data in the tool system.
[0107] It can be seen that the acquisition and packaging of grid data are automatically packaged and downloaded; based on the set visualization interaction rule constraints, all grid data are automatically cropped until all data is cropped to obtain the corresponding grid data; based on C#, the grid data within the target range is accurately obtained and saved in NetCDF format to facilitate efficient storage, acquisition, management and distribution of grid data; different types of grid data obtained by cropping are classified and automatically published; based on WebView container technology, multi-dimensional data page visualization and visualization of raster element datasets based on Mapgis10.6 are supported.
[0108] In one embodiment, ncWMS is used to publish underwater 3D rapid reconstruction products as OGC-compliant Web Map Services (WMS). The steps of inputting underwater 3D rapid reconstruction products in NetCDF format for publishing are as follows:
[0109] 1. Place the ncwms folder in the same directory in D:\package, and run startup.bat to start the ncwms publishing service and ncwmsservice-0.0.1 automatic publishing service;
[0110] 2. The swagger access port of the ncwmsservice-0.0.1 service is http: / / localhost:9005 / swagger-ui / index.html;
[0111] 3. Run start_tomcat.bat to start only the ncwms publishing service:
[0112] (1) Visit http: / / localhost:8000 / ncWMS2 to enter the ncWMS homepage;
[0113] (2) Visit http: / / localhost:8000 / ncWMS2 / admin to enter the dataset configuration page, enter the account and password automatically, and log in to the page; automatically fill in the id title location parameters, and then click save configuration. The location is the absolute address of the .nc file, and the status is READY, indicating that the data is valid.
[0114] (3) Visit http: / / localhost:8000 / ncWMS2 / Godiva3.html and click the dataset in the directory tree on the left. You can preview the ncWMS service in the middle view.
[0115] (4) Visit the homepage http: / / localhost:8000 / ncWMS2 again. You can see the ncWMS service list in DataSets. Click WMS 1.3.0 in the service list to obtain the URL address of the WMS service.
[0116] It should be understood that although Figure 1-Figure 2 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-2 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0117] In one embodiment, Figure 5 As shown, a C#-based grid data visualization device is provided, including: a constraint condition setting module 502, a grid data packet acquisition module 504, a clipping data acquisition module 506 and a Web preview display module 508, wherein:
[0118] The constraint condition setting module 502 is used to set the visual interaction rule constraint conditions of the meteorological and oceanographic data, wherein the visual interaction rule constraint conditions include data extraction constraint conditions and data clipping constraint conditions.
[0119] The grid data packet acquisition module 504 is used to connect to the environmental simulation resource library to batch package the meteorological and oceanographic grid product data according to the data extraction constraint conditions to obtain the grid data packet.
[0120] The clipping data acquisition module 506 is used to perform NetCDF clipping on the grid data package according to the data clipping constraint condition to obtain the NetCDF original data package, and clip the NetCDF original data package using a multiple product clipping method to obtain the NetCDF grid data package.
[0121] The Web preview display module 508 is used to process the NetCDF grid data package according to the scene display requirements, and use MapGIS IGS to publish the processed NetCDF grid data package to the Web map service for visual display.
[0122] For the specific definition of the C#-based grid data visualization device, please refer to the definition of the C#-based grid data visualization method above, which will not be repeated here. Each module in the above-mentioned C#-based grid data visualization device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0123] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a grid data visualization method based on C# is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0124] Those skilled in the art will understand that Figure 5-Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0125] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0126] Set visualization interaction rule constraints for meteorological and oceanographic data, where the visualization interaction rule constraints include data extraction constraints and data clipping constraints.
[0127] According to the data extraction constraints, the environmental simulation resource library is connected to batch package the meteorological and ocean grid product data to obtain the grid data package.
[0128] The grid data package is clipped by NetCDF according to the data clipping constraint conditions to obtain the NetCDF original data set, and the NetCDF original data set is clipped by multiple product clipping to obtain the NetCDF grid data package.
[0129] The NetCDF grid data package is processed according to the scene display requirements, and MapGIS IGS is used to publish the processed NetCDF grid data package to the Web map service for visual display.
[0130] In one embodiment, when the processor executes the computer program, the following steps are also implemented: processing the NetCDF grid data packet according to the scene display requirements, if the current selected scene display is a two-dimensional display, the MapGIS desktop system is used to detect the structure definition of the NetCDF grid data packet, and the NetCDF grid data packet is processed according to the structure definition. If the data structure of the data in the NetCDF grid data packet is a two-dimensional or higher-dimensional feature variable, the data structure of the data element in the NetCDF grid data packet is converted to a two-dimensional data format, and the NetCDF grid data packet in the two-dimensional data format is published through ncWMS for visual display. If the data structure of the data in the NetCDF grid data packet is a two-dimensional feature variable, the NetCDF grid data packet in the two-dimensional data format is published through ncWMS for WMS service for visual display. If the current selected scene display is a three-dimensional display, the MapGIS desktop system is used to detect the structure definition of the NetCDF grid data packet, and an HDB spatial database is created in the database of MapGIS10.6. After the NetCDF grid data packets are batch imported into the HDB spatial database, the data structure of the NetCDF grid data packet is parsed to generate grid cell model data, and the grid cell model data is published to the Web map service through MapGIS IGS for visual preview display.
[0131] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0132] Set visualization interaction rule constraints for meteorological and oceanographic data, where the visualization interaction rule constraints include data extraction constraints and data clipping constraints.
[0133] According to the data extraction constraints, the environmental simulation resource library is connected to batch package the meteorological and ocean grid product data to obtain the grid data package.
[0134] The grid data package is NetCDF clipped according to the data clipping constraints to obtain the NetCDF original data set, and the NetCDF original data set is clipped using multiple products to obtain the NetCDF grid data package.
[0135] The NetCDF grid data package is processed according to the scene display requirements, and MapGIS IGS is used to publish the processed NetCDF grid data package to the Web map service for visual display.
[0136] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: processing the NetCDF grid data packet according to the scene display requirements, if the current selected scene display is a two-dimensional display, the MapGIS desktop system is used to detect the structure definition of the NetCDF grid data packet, and the NetCDF grid data packet is processed according to the structure definition. If the data structure of the data in the NetCDF grid data packet is a two-dimensional or higher-dimensional feature variable, the data structure of the data element in the NetCDF grid data packet is converted to a two-dimensional data format, and the NetCDF grid data packet in the two-dimensional data format is published through ncWMS for visual display. If the data structure of the data in the NetCDF grid data packet is a two-dimensional feature variable, the NetCDF grid data packet in the two-dimensional data format is published through ncWMS for WMS service for visual display. If the current selected scene display is a three-dimensional display, the MapGIS desktop system is used to detect the structure definition of the NetCDF grid data packet, and an HDB spatial database is created in the MapGIS10.6 database. After the NetCDF grid data packets are batch imported into the HDB spatial database, the data structure of the NetCDF grid data packet is parsed to generate grid cell model data, and the grid cell model data is published to the Web map service through MapGIS IGS for visual preview display.
[0137] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SynchLink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0138] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0139] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A grid data visualization method based on C#, characterized in that: The method comprises: Setting visualization interaction rule constraints of meteorological and oceanographic data, wherein the visualization interaction rule constraints include data extraction constraints and data clipping constraints; According to the data extraction constraint conditions, the environmental simulation resource library is connected to batch package the meteorological and oceanographic grid product data to obtain a grid data packet; Performing NetCDF clipping on the grid data packet according to the data clipping constraint condition to obtain a NetCDF original data set, wherein the data extraction constraint condition supports setting encryption and packaging options of the meteorological and oceanographic grid product data in advance; The NetCDF original data set is clipped using a multiple product clipping method to obtain a NetCDF grid data packet, including: using a typical weather process product clipping method and an underwater three-dimensional rapid reconstruction product clipping method to call a corresponding clipping function in C# to clip data according to each dimensional element information of the grid data in the NetCDF original data set to obtain a NetCDF grid data packet; The clipping functions include: a ClipTypicalWeatherByRect function corresponding to the clipping method of the typical weather process product and a ClipUnderwater3DrapidRecsByRect function corresponding to the underwater three-dimensional rapid reconstruction product; ClipTypicalWeatherByRect function input parameter description: ClipUnderwater3DRapidRecsByRect function input parameter description: ClipTypicalWeatherByRect function returns parameter description: ClipUnderwater3DRapidRecsByRect function returns parameter description: The NetCDF grid data packet is processed according to the scene display requirements, and the processed NetCDF grid data packet is published to the Web map service for visual display using MapGIS IGS.
2. The method according to claim 1, characterized in that Set the interactive visualization rules and constraints for meteorological and oceanographic data, including: The visualization interaction rule constraints of meteorological and oceanographic data are set according to the element information of meteorological and oceanographic data.
3. The method according to claim 1, characterized in that According to the data extraction constraint conditions, the environmental simulation resource library is connected to batch package the meteorological and oceanographic grid product data to obtain a grid data package, including: According to the data extraction constraint condition, the environmental simulation resource library is connected to query the meteorological and oceanographic data, and the meteorological and oceanographic grid product data corresponding to the data extraction constraint condition is packaged and downloaded to obtain a grid data packet.
4. The method according to claim 3, characterized in that The NetCDF grid data packet is processed according to the scene display requirements, and the processed NetCDF grid data packet is published to the Web map service through MapGIS IGS for visual display, including: Process the NetCDF grid data package according to the scene display requirements. If the currently selected scene display is a two-dimensional display, the MapGIS desktop system is used to detect the NetCDF grid data package. The structure definition of the NetCDF grid data packet is used to process the NetCDF grid data packet according to the structure definition; if the data structure of the data in the NetCDF grid data packet is a two-dimensional or higher-dimensional feature variable, the data structure of the data elements in the NetCDF grid data packet is converted into a two-dimensional data format, and the NetCDF grid data packet in the two-dimensional data format is published through ncWMS for WMS service for visual display; if the data structure of the data in the NetCDF grid data packet is a two-dimensional feature variable, the NetCDF grid data packet in the two-dimensional data format is published through ncWMS for WMS service for visual display; if the current selected scene display is a three-dimensional display, the structure definition of the NetCDF grid data packet is detected by using the MapGIS desktop system, and an HDB spatial database is created in the MapGIS10.6 database. After the NetCDF grid data packets are batch imported into the HDB spatial database, the data structure of the NetCDF grid data packet is parsed to generate grid cell model data, and the grid cell model data is published to the Web map service through MapGIS IGS for visual preview display.
5. A grid data visualization device based on C#, characterized in that: The device comprises: A constraint setting module, used to set the visual interaction rule constraint conditions of meteorological and oceanographic data, wherein the visual interaction rule constraint conditions include data extraction constraint conditions and data clipping constraint conditions; A grid data packet acquisition module, used to connect to the environment simulation resource library to batch package the meteorological and oceanographic grid product data according to the data extraction constraint conditions to obtain a grid data packet; A clipping data acquisition module is used to perform NetCDF clipping on the grid data packet according to the data clipping constraint condition to obtain a NetCDF original data set, wherein the data extraction constraint condition supports setting the encryption and packaging options of the meteorological ocean grid product data in advance; the NetCDF original data set is clipped using a multiple product clipping method to obtain a NetCDF grid data packet, including: using a typical weather process product clipping method and an underwater three-dimensional rapid reconstruction product clipping method to call the corresponding clipping function in C# to perform data clipping according to each dimensional element information of the grid data in the NetCDF original data set to obtain a NetCDF grid data packet; the clipping function includes: a ClipTypicalWeatherByRect function corresponding to the typical weather process product clipping method and a ClipUnderwater3DrapidRecsByRect function corresponding to the underwater three-dimensional rapid reconstruction product; ClipTypicalWeatherByRect function input parameter description: ClipUnderwater3DRapidRecsByRect function input parameter description: ClipTypicalWeatherByRect function returns parameter description: ClipUnderwater3DRapidRecsByRect function returns parameter description: The Web preview display module is used to process the NetCDF grid data packet according to the scene display requirements, and use MapGISIGS to publish the processed NetCDF grid data packet to the Web map service for visual display.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
