CN108898644B - Dynamic rendering method, system and storage medium for raster data - Google Patents

Dynamic rendering method, system and storage medium for raster data Download PDF

Info

Publication number
CN108898644B
CN108898644B CN201810654233.1A CN201810654233A CN108898644B CN 108898644 B CN108898644 B CN 108898644B CN 201810654233 A CN201810654233 A CN 201810654233A CN 108898644 B CN108898644 B CN 108898644B
Authority
CN
China
Prior art keywords
rendering
value
data
factor
color
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
Application number
CN201810654233.1A
Other languages
Chinese (zh)
Other versions
CN108898644A (en
Inventor
杨东来
张弓
顾竹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jiage Tiandi Technology Co ltd
Original Assignee
Beijing Jiage Tiandi Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Jiage Tiandi Technology Co ltd filed Critical Beijing Jiage Tiandi Technology Co ltd
Priority to CN201810654233.1A priority Critical patent/CN108898644B/en
Publication of CN108898644A publication Critical patent/CN108898644A/en
Application granted granted Critical
Publication of CN108898644B publication Critical patent/CN108898644B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)

Abstract

The invention relates to the technical field of Internet and multimedia. And more particularly, to a method, apparatus, and computer-readable storage medium for dynamically rendering raster data. In one embodiment of a method for dynamically rendering raster data based on Webgl, the method includes setting rendering parameters, wherein the rendering parameters include a rendering upper limit max, a rendering lower limit min and a color table; calculating the value of a rendering factor of each pixel, wherein the factor is (value-min)/(max-min), and the value is the value of each pixel point; and dynamically rendering the geographic data by using Webgl according to the color corresponding to the rendering factor value of each pixel in the color selecting table. The data processing process is positioned in the browser, server resources are not consumed, the requirement on the computing capacity of the server is reduced, and different rendering effects can be realized only by requesting data for the first time and caching the data to the browser end and then adjusting parameters at the browser end without requesting the data again.

Description

Dynamic rendering method, system and storage medium for raster data
Technical Field
The invention relates to a method for dynamically rendering raster data, in particular to a method and a device for dynamically rendering raster data and a computer readable storage medium.
Background
The description of the background of the invention pertaining to the present invention is intended only for the purpose of illustration and for the purpose of facilitating an understanding of the summary of the invention, and should not be taken as an admission or admission that the applicant is aware of or is aware of the prior art at the date of filing this application as first filed.
Since the appearance of the Web, computer images play an important role, and it can be said that the appearance of multimedia elements such as various images, audio and video attracts people's attention greatly, and the internet flourishes today. Images used on the Web can be classified into raster images and vector images. At present, most of the Web images are raster images, such as: GIF, JPEG, PNG, and the like.
Raster data is a form of data in which a space is divided into regular grids, each grid is called a cell, and each cell is assigned a corresponding attribute value to represent an entity. Raster images are those which describe an image in a bitmap lattice, which has some limitations: first, the raster image must include information for each point to display the image, and therefore image files are typically large and not conducive to network transmission. Second, raster images are not "intelligent," and they cannot "carry" information that can be searched for by themselves. Moreover, raster images cannot be directly edited, and cannot be scaled without losing data, thereby affecting their resolution and color. The characteristics of the raster image make it unable to interact well with the user, containing a small amount of information. The ability to render complex maps on the Web is extremely limited.
The dynamic rendering of raster data refers to that the same raster data source can present different rendering effects by adjusting parameters through an operation end. The conventional common raster data dynamic rendering method comprises a Pc end and a Web end. The Pc end processes local data mainly through professional software. The Web end mainly carries out calculation through a server end and transmits the calculation to a browser for rendering through a network.
Because the image collected by the remote sensing system is often a raster image, and because of the characteristics of the raster image, aiming at the rendering problem of the geographic information image, the Pc end needs to use professional software to render raster data, the operation is complex, and the display is inconvenient; the dynamic rendering of the Web end has the limitation of data transmission speed, the server end is required to recalculate and transmit data again after each parameter adjustment, and the rendering speed is limited by the network transmission speed and is slower after each parameter adjustment.
Disclosure of Invention
To solve the above-mentioned drawbacks of the prior art, embodiments of the present invention provide a method and an apparatus for dynamically rendering raster data, and a computer-readable storage medium.
To this end, an embodiment of the present invention provides a method for dynamically rendering raster data, including: setting rendering parameters, wherein the rendering parameters comprise a rendering upper limit value max, a rendering lower limit value min and a color taking table; calculating a value of a rendering factor for each pixel, factor ═ (value-min)/(max-min), where value is the value of each pixel point; and dynamically rendering the geographic data by using Webgl according to the color corresponding to the rendering factor value of each pixel in the color selecting table.
Preferably, the method for dynamically rendering raster data further includes: and detecting whether the geographic data is cached, and if not, requesting the geographic data.
Preferably, in the grid data dynamic rendering method, the step of dynamically rendering the geographic data by using Webgl is to perform calculation by using a GPU.
Preferably, in the grid data dynamic rendering method, 0 is less than or equal to factor is less than or equal to 1.
The invention provides a raster data dynamic rendering system, which comprises a first module, a second module and a third module, wherein the first module is used for setting rendering parameters, and the rendering parameters comprise a rendering upper limit value max, a rendering lower limit value min and a color taking table; a second module, configured to calculate a value of a rendering factor for each pixel, where the factor is (value-min)/(max-min), and the value is a value of each pixel; and the third module is used for dynamically rendering the geographic data by using Webgl according to the color corresponding to the rendering factor value of each pixel in the color selecting table.
Preferably, the grid data dynamic rendering system further comprises: and the fourth module is used for detecting whether the geographic data is cached or not, and requesting the geographic data if the geographic data is not cached.
Preferably, in the third module of the grid data dynamic rendering system, the dynamic rendering of the geographic data by using Webgl is performed by using a GPU.
Furthermore, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the program is characterized in that it implements the steps of the above-mentioned method when executed by a processor.
Furthermore, the present invention provides a computer device comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor implements the steps of the above method when executing the program.
By adopting the technical scheme, the Webgl is used in the field of dynamic rendering of the raster data, so that the data processing process is positioned in the browser, server resources are not consumed, the requirement on the computing capacity of the server is reduced, and different rendering effects can be realized only by requesting the data for the first time and caching the data to the browser end and then not requesting the data again after the parameters of the browser end are adjusted.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings used in the description of the embodiments will be briefly described as follows:
FIG. 1 is a flow chart of a method for dynamically rendering raster data according to the present application;
FIG. 2 illustrates a block diagram schematic of a raster data dynamic rendering system of the present application;
FIG. 3 is a flow chart illustrating a further method for dynamic rendering of raster data according to the present application;
FIG. 4 is a block diagram illustrating a further raster data dynamic rendering system according to the present application;
FIG. 5 shows a schematic diagram of a color picking table according to a preferred embodiment of the present invention;
fig. 6(a) - (c) show three different rendering effect graphs of the same region when different color sampling tables are configured under the same raster data.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as implying relative importance.
The following description provides embodiments of the invention, which may be combined with or substituted for various embodiments, and the invention is thus to be construed as embracing all possible combinations of the same and/or different embodiments described. Thus, if one embodiment includes feature A, B, C and another embodiment includes feature B, D, then the invention should also be construed as including embodiments that include one or more of all other possible combinations of A, B, C, D, even though such embodiments may not be explicitly recited in the following text.
By adopting the technical scheme, the contour line can be generated in the browser in real time, the timeliness is fast, and the updating efficiency is greatly improved.
Fig. 1 shows a specific embodiment of a method for dynamically rendering raster data according to the present application, which includes the following steps:
step 101, setting rendering parameters, wherein the rendering parameters comprise a rendering upper limit value max, a rendering lower limit value min and a color taking table.
The raster data source can be viewed as having a digital value on each pixel of the screen, as shown in the following figure, where a grid represents a pixel and a number represents the value on the pixel, as follows:
Figure BDA0001705055380000041
the parameters needing external configuration comprise a rendering upper limit value max, a rendering lower limit value min and a color table. max and min are numbers, and the color table is a color bar (preferably a color bar with an interval of 0-1), for example, 0-0.2 is red, 0.2-0.5 is yellow, and 0.5-1 is blue.
Step 102, calculating a value of a rendering factor for each pixel, where the factor is (value-min)/(max-min), and the value is a value of each pixel.
And (4) taking out the value of each pixel point, and calculating a value factor with max and min. For example, we set max to 10, min to 0, and pixel point value to 4, then factor-min (value-min)/(max-min) — (4-0)/(10-0) — 0.4.
And 103, dynamically rendering the geographic data by using Webgl according to the color corresponding to the rendering factor value of each pixel in the color selecting table.
In the above example, the factor is 0.4, and 0.4 is between 0.2 and 0.5, then after 0.4 is compared with the left color-taking table in fig. 5, the rendering effect of the pixel point is obtained as yellow, and Webgl is used to dynamically render yellow to the geographic data.
In addition, the color sampling table may also be set as a transition color, as shown in the right color sampling table of fig. 5, if the value factor is 0.4, the final color is a transition color between blue (0.2) and gray (0.5).
According to the scheme, Webgl is used in the field of raster data dynamic rendering, the technical problems that data transmission speed is limited in Web end dynamic rendering, a server side needs to recalculate after parameters are adjusted each time, data are transmitted again, and the Web transmission speed is limited after the parameters are adjusted each time, the rendering speed is low are solved, so that the data processing process is located in a browser, server resources are not consumed, the requirement for the computing capacity of the server is reduced, only the data are required to be requested for the first time and cached in the browser end, and the data do not need to be requested again after the parameters are adjusted by the browser end, and different rendering effects can be achieved.
Preferably, in consideration of the influence of network transmission of massive spatial data on the information service quality, as shown in fig. 3, the method for dynamically rendering raster data according to the present invention further includes the steps of: and detecting whether the geographic data is cached, and if not, requesting the geographic data. Therefore, a caching mechanism suitable for geographic data is adopted to improve the interaction performance of the network geographic information service.
Preferably, in consideration of the fact that processing of massive data in geographic information, especially in remote sensing image information, is very large in computation amount, in the raster data dynamic rendering method of the present application, the step of dynamically rendering the geographic data using Webgl is to use a GPU for computation. The image processing based on the GPU parallel technology can be realized, optimization, memory optimization and instruction use optimization are realized and executed in consideration of algorithm involvement and division of processing tasks, so that the overall processing efficiency is improved, resampling acceleration of remote sensing geographic image data is realized on the basis, and the calculation efficiency is remarkably improved.
Preferably, considering that the raster data is expressed by different gray scale values of 0-255, in order to simplify the algorithm, the invention innovatively sets the factor value of the color taking strip to be 2 gray scales, namely two levels of 0 and 1, and all required rendering colors correspond to the factor value of 0-1. Therefore, through color band setting and the reduction of the three-bit gray value to a decimal number in 0-1, the method for representing the chromaticity of each pixel is greatly simplified while the color is accurately expressed, and the operation speed is further increased.
FIG. 2 illustrates a specific embodiment of a raster data dynamic rendering system to which the present application relates, including:
a first module 201, configured to set rendering parameters, where the rendering parameters include an upper rendering limit max, a lower rendering limit min, and a color sampling table; a second module 202, configured to calculate a value of a rendering factor, (value-min)/(max-min), where value is a value of each pixel; and a third module 203, configured to perform dynamic rendering on the geographic data by using Webgl according to the color corresponding to the rendering factor value in the color sampling table.
Preferably, in consideration of the influence of network transmission of massive spatial data on the information service quality, as shown in fig. 4, the grid data dynamic rendering system of the present invention further includes: a fourth module 204 is configured to detect whether the geographic data is cached, and if not, request the geographic data. Therefore, a caching mechanism suitable for geographic data is adopted to improve the interaction performance of the network geographic information service.
Fig. 6 shows three different rendering effect graphs of the same region when different color sampling tables are configured under the same raster data.
While various embodiments of the invention have been described above, it will be understood by those skilled in the art that various embodiments may be substituted or combined, and the invention is therefore intended to include all possible combinations of the same and/or different embodiments described. Thus, if one embodiment includes feature A, B, C and another embodiment includes feature B, D, then the invention should also be construed as including embodiments that include one or more of all other possible combinations of A, B, C, D, even though such embodiments may not be explicitly recited in the following text.
The "module" and "unit" in this specification refer to software and/or hardware that can perform a specific function independently or in cooperation with other components, where the hardware may be, for example, an FPGA (Field-Programmable Gate Array), an IC (Integrated Circuit), or the like.
The invention also provides a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method for authorising a management control request. The computer-readable storage medium may include, but is not limited to, any type of disk including floppy disks, optical disks, DVD, CD-ROMs, microdrive, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data.
The invention also provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method for authorising a management control request are implemented when the processor executes the program. In the embodiment of the present invention, the processor is a control center of a computer system, and may be a processor of a physical machine or a processor of a virtual machine.
The foregoing description is only a preferred embodiment of the invention and is not intended to limit the invention in any way, either in nature or in any way. Although the present invention has been described with reference to the preferred embodiments, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention. However, any simple modification, equivalent replacement, improvement and the like of the above embodiments according to the technical spirit of the present invention should be included in the protection scope of the present invention without departing from the spirit and principle of the present invention.

Claims (8)

1. A method for dynamically rendering raster data, comprising:
setting rendering parameters, wherein the rendering parameters comprise a rendering upper limit value max, a rendering lower limit value min and a color taking table, and the color taking table is a color band with an interval of 0-1;
calculating a value of a rendering factor for each pixel, the factor being (value-min)/(max-min), where value is the value of each pixel, the rendering factor including two gray levels of 0 and 1, 0 ≦ factor ≦ 1; and
and dynamically rendering the raster data in the geographic data by using WebGL according to the color corresponding to the rendering factor value of each pixel in the color taking table.
2. The method for dynamically rendering raster data as recited in claim 1, further comprising:
and detecting whether the geographic data is cached, and if not, requesting the geographic data.
3. The raster data dynamic rendering method of claim 1,
the step of dynamically rendering the geographic data by using the WebGL is to perform calculation by using a GPU.
4. A raster data dynamic rendering system, comprising:
the system comprises a first module, a second module and a third module, wherein the first module is used for setting rendering parameters, and the rendering parameters comprise a rendering upper limit value max, a rendering lower limit value min and a color taking table, wherein the color taking table is a color band in an interval of 0-1;
a second module for calculating, for each pixel, a value of a rendering factor, the factor being (value-min)/(max-min), wherein value is the value of each pixel, the rendering factor including two gray levels, 0 and 1, and 0 ≦ factor ≦ 1; and
and the third module is used for dynamically rendering the raster data in the geographic data by using WebGL according to the color corresponding to the rendering factor value of each pixel in the color taking table.
5. The raster data dynamic rendering system of claim 4, further comprising:
and the fourth module is used for detecting whether the geographic data is cached or not, and if the geographic data is not cached, requesting the geographic data.
6. The grid data dynamic rendering system of claim 4, wherein the third module dynamically renders the geographic data using WebGL for computation using a GPU.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1-3 are implemented when the program is executed by the processor.
8. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1-3.
CN201810654233.1A 2018-06-22 2018-06-22 Dynamic rendering method, system and storage medium for raster data Active CN108898644B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810654233.1A CN108898644B (en) 2018-06-22 2018-06-22 Dynamic rendering method, system and storage medium for raster data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810654233.1A CN108898644B (en) 2018-06-22 2018-06-22 Dynamic rendering method, system and storage medium for raster data

Publications (2)

Publication Number Publication Date
CN108898644A CN108898644A (en) 2018-11-27
CN108898644B true CN108898644B (en) 2022-09-16

Family

ID=64345891

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810654233.1A Active CN108898644B (en) 2018-06-22 2018-06-22 Dynamic rendering method, system and storage medium for raster data

Country Status (1)

Country Link
CN (1) CN108898644B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109871418A (en) * 2019-01-04 2019-06-11 广州市城市规划勘测设计研究院 A kind of space index method and system of space-time data
CN111198975B (en) * 2019-12-25 2023-12-01 上海杰狮信息技术有限公司 Grid-based space-time big data visualization method and system
CN116342820A (en) * 2023-03-01 2023-06-27 北京数识科技有限公司 Raster data color distribution system, method and computer readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102903148A (en) * 2012-08-17 2013-01-30 北京地拓科技发展有限公司 Method and device for rendering raster data
CN105718514A (en) * 2016-01-14 2016-06-29 中国科学院计算机网络信息中心 WEB-based method for carrying out free combined rendering on multiple bands of remote sensing images
CN106846451A (en) * 2017-01-22 2017-06-13 南通大学 The sense of reality body of facing mobile apparatus is rendered and interactive system and its method of work
CN106873931A (en) * 2017-02-15 2017-06-20 北京佳格天地科技有限公司 Raster data visualization device, method and computer system
CN107133272A (en) * 2017-04-07 2017-09-05 南京南瑞集团公司 A kind of Web ends magnanimity power network resources GIS data dynamic dispatching and rendering intent
CN107223264A (en) * 2016-12-26 2017-09-29 深圳前海达闼云端智能科技有限公司 A kind of rendering intent and device
CN108182717A (en) * 2017-12-15 2018-06-19 北京金风科创风电设备有限公司 Geographic information image generation method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7911474B2 (en) * 2006-04-03 2011-03-22 Siemens Medical Solutions Usa, Inc. Memory management system and method for GPU-based volume rendering
US8368705B2 (en) * 2008-07-16 2013-02-05 Google Inc. Web-based graphics rendering system
US8681176B1 (en) * 2011-09-20 2014-03-25 Google Inc. Rendering a map using style identifiers
EP2997546B1 (en) * 2013-05-15 2020-09-02 Google LLC Efficient composition and rendering of graphical elements
US10198856B2 (en) * 2013-11-11 2019-02-05 Oxide Interactive, LLC Method and system of anti-aliasing shading decoupled from rasterization
CN104899368B (en) * 2015-05-29 2019-04-30 浙江宇视科技有限公司 Monitoring based on data temperature is layouted demand drawing generating method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102903148A (en) * 2012-08-17 2013-01-30 北京地拓科技发展有限公司 Method and device for rendering raster data
CN105718514A (en) * 2016-01-14 2016-06-29 中国科学院计算机网络信息中心 WEB-based method for carrying out free combined rendering on multiple bands of remote sensing images
CN107223264A (en) * 2016-12-26 2017-09-29 深圳前海达闼云端智能科技有限公司 A kind of rendering intent and device
CN106846451A (en) * 2017-01-22 2017-06-13 南通大学 The sense of reality body of facing mobile apparatus is rendered and interactive system and its method of work
CN106873931A (en) * 2017-02-15 2017-06-20 北京佳格天地科技有限公司 Raster data visualization device, method and computer system
CN107133272A (en) * 2017-04-07 2017-09-05 南京南瑞集团公司 A kind of Web ends magnanimity power network resources GIS data dynamic dispatching and rendering intent
CN108182717A (en) * 2017-12-15 2018-06-19 北京金风科创风电设备有限公司 Geographic information image generation method and device

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Research on graphic rendering of grid data;Sun Yingying et al.;《IEEE》;20061119;第1-3页 *
基于Cesium的WebGIS三维客户端实现技术研究;高云成;《中国优秀硕士学位论文全文数据库信息科技辑》;20160415;第1-95页 *
基于WebGL的地理信息三维可视化技术研究;牛艺博;《中国优秀硕士学位论文全文数据库基础科学辑》;20160415;第1-80页 *
矢量瓦片支持下的在线交互可视化工具设计与实现;宋磊 等;《测绘通报》;20180415(第4期);第125-130页 *

Also Published As

Publication number Publication date
CN108898644A (en) 2018-11-27

Similar Documents

Publication Publication Date Title
CN108898644B (en) Dynamic rendering method, system and storage medium for raster data
CN104715445B (en) Image processing method and system
US8446411B2 (en) Adaptive image rendering and use of imposter
CN109478150A (en) Dynamic vision focus adjustment
CN108229591A (en) Neural network adaptive training method and apparatus, equipment, program and storage medium
US8706911B2 (en) Power saving display information converting system and method
US11727632B2 (en) Shader binding management in ray tracing
JP2022520264A (en) Image brightness adjustment methods and devices, electronic devices and computer programs
CN106934058A (en) Vector data read method and system, vector data method for visualizing and system
US11232544B1 (en) History clamping for denoising dynamic ray-traced scenes using temporal accumulation
CN110597900A (en) Method for generating vector slice by GDB data in real time according to needs
CN109377552B (en) Image occlusion calculating method, device, calculating equipment and storage medium
US11683358B2 (en) Dynamic user-device upscaling of media streams
CN113779040A (en) Progressive online high-precision map service engine system
CN109410136A (en) Even color method and processing unit based on most short transmission path
JP2022526514A (en) Character string display processing method and its devices, terminals and computer programs
CN109416828A (en) Frame buffering is mapped to the device and method of logic eye
CN110909085A (en) Data processing method, device, equipment and storage medium
CN109803157A (en) A kind of sequence frame picture transmission method, system and electronic equipment based on video
CN116091292A (en) Data processing method and related device
KR102415821B1 (en) System and method for providing GIS web service based on the international standard S-101 platform
CN113689333A (en) Image enhancement method and device
CN115604410A (en) Video processing method, device, equipment and computer readable storage medium
CN105607886A (en) Education cloud video data display processing system and method based on Internet of things
CN116561081B (en) Data processing method, device, electronic equipment, storage medium and program product

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