CN110766626A - Method and device for enhancing map expression in WebGIS environment - Google Patents
Method and device for enhancing map expression in WebGIS environment Download PDFInfo
- Publication number
- CN110766626A CN110766626A CN201910978398.9A CN201910978398A CN110766626A CN 110766626 A CN110766626 A CN 110766626A CN 201910978398 A CN201910978398 A CN 201910978398A CN 110766626 A CN110766626 A CN 110766626A
- Authority
- CN
- China
- Prior art keywords
- picture
- saturation
- layer
- map
- pixels
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 26
- 230000002708 enhancing effect Effects 0.000 title claims abstract description 25
- 230000014509 gene expression Effects 0.000 title claims abstract description 25
- 238000009877 rendering Methods 0.000 claims description 19
- 230000003313 weakening effect Effects 0.000 claims description 18
- 238000002955 isolation Methods 0.000 claims description 16
- 230000009467 reduction Effects 0.000 claims description 8
- 238000012163 sequencing technique Methods 0.000 claims description 6
- 230000008569 process Effects 0.000 claims description 5
- 238000006243 chemical reaction Methods 0.000 claims description 4
- 230000000694 effects Effects 0.000 abstract description 7
- 230000000007 visual effect Effects 0.000 description 3
- 230000004888 barrier function Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 239000012141 concentrate Substances 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- G06T5/90—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/05—Geographic models
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
Abstract
The invention is suitable for the field of geographic information systems, and provides a method and a device for enhancing map expression in a WebGIS environment, wherein the method weakens the color saturation and increases the contrast with a target map layer on the premise of not changing the overall background effect by calculating the color space of the background map layer; meanwhile, the target map layer can be further enhanced, the map surface expression during map overlaying is further improved, the picture display effect is good, and the method and the device are particularly suitable for overlaying browsing of map layers such as roads and pipelines.
Description
Technical Field
The invention belongs to the field of geographic information systems, and particularly relates to a method and a device for enhancing map expression in a WebGIS environment.
Background
In a geographic information system for industrial applications, various specific geographic information data other than background data such as electronic maps and images are managed. Such as road data of various grades in a traffic geographic information system, various land planning and surveying data of a natural resource industry and the like.
When a user uses the system, in order to look up related data, various thematic map data are often put into a map container in sequence for superposition browsing. Under the prior art means, in order to highlight the data of a certain layer, other unrelated layers can be directly hidden; or when a plurality of background images must be overlaid, the image layer is often placed at the topmost layer so as not to be blocked by other image layers. The scheme can solve the capping problem during browsing to a certain extent, but has the main defects that when a plurality of background pictures are superposed and the color matching of the background pictures is complicated, the picture surface expression is disordered, a user can difficultly distinguish the boundary between a target observation picture layer and the background picture, and the view experience of the user is greatly influenced.
Disclosure of Invention
In view of the above problems, an object of the present invention is to provide a method and an apparatus for enhancing map expression in a WebGIS environment, and to solve the technical problems of unclear display and influence on experience in the existing map layer overlay.
In one aspect, the method for enhancing map expression in a WebGIS environment comprises the following steps:
traversing each layer in the map object;
acquiring an example of a background layer object, storing a content screenshot quoted to the current window range in each background layer into a preset picture set to be adjusted, and weakening each picture in the picture set to be adjusted;
when image enhancement is enabled, acquiring an example of an object of a target layer, acquiring a rendering picture in a current window range, superposing an isolation color on each pixel point in the rendering picture, applying the isolation color to the target layer, and placing the target layer on the topmost layer of a map container;
and re-rendering all layers for display.
Further, the picture weakening process specifically includes the following steps:
aiming at each picture in the picture set to be adjusted, acquiring the RGB value of each pixel point in the picture, and converting the RGB value into an HSL color mode to obtain the HSL value of each pixel point in the picture;
and sequencing the saturation components of the pixels from high to low, and reducing the saturation of the first K% of the pixels.
Further, the saturation is reduced by the following specific steps:
summing the saturation of the last (100-K)% of the pixels, marking the sum as S1, summing the saturations of all the pixels of the picture, marking the sum as S2, and adjusting the coefficient T to be S1/S2;
and multiplying the saturation of the front K% pixel points by a proportional coefficient T, and applying the calculated saturation to each pixel.
Further, wherein K is 20.
Further, the RGBA value of the barrier color is (255, 255, 255, 0.1).
In another aspect, the apparatus for enhancing map expression in WebGIS environment includes:
the traversing unit is used for traversing each layer in the map object;
the weakening processing unit is used for acquiring an example of a background layer object, storing a content screenshot quoted to the current window range in each background layer into a preset picture set to be adjusted, and weakening each picture in the picture set to be adjusted;
the enhancement processing unit is used for acquiring an example of an object of a target layer, acquiring a rendering picture in a current window range, superposing an isolation color on each pixel point in the rendering picture, applying the isolation color to the target layer and placing the target layer on the topmost layer of the map container;
and the display unit is used for re-rendering and displaying all the layers.
Further, the weakening unit includes:
the pixel conversion module is used for acquiring the RGB value of each pixel point in the picture aiming at each picture in the picture set to be adjusted, and converting the RGB value into the HSL color mode to obtain the HSL value of each pixel point in the picture;
and the reduction processing module is used for sequencing the saturation components of the pixels from high to low and reducing the saturation of the first K% of the pixels.
Further, the reduction processing module includes:
the first processing unit is used for summing the saturation of the last (100-K)% of the pixels and marking the sum as S1, summing the saturations of all the pixels of the picture and marking the sum as S2, and adjusting the coefficient T to be S1/S2;
and the second processing unit is used for multiplying the saturation of the front K% pixel point by the proportion coefficient T and applying the calculated saturation to each pixel.
Further, wherein K is 20.
Further, the RGBA value of the barrier color is (255, 255, 255, 0.1).
The invention has the beneficial effects that: according to the invention, through color comparison processing of the target layer and the background layer, in a specific scheme, the saturation of partial pixel points is reduced by automatically rendering the background layer, meanwhile, the target layer is enhanced, the finally displayed image is changed, the visual expression of the main layer can be highlighted, and the purpose that the human eye impression can be concentrated on the data of the target layer is realized; the invention provides a method for weakening a background layer and enhancing a target layer from a visual angle on the basis of keeping the existing scheme, further improves the drawing expression when the layers are stacked, and is particularly suitable for the stacking browsing of the layers such as roads, pipelines and the like.
Drawings
FIG. 1 is a flowchart of a method for enhancing map representation in a WebGIS environment according to a first embodiment of the present invention;
fig. 2 is a block diagram illustrating an apparatus for enhancing map representation in a WebGIS environment according to a second embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is 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 order to explain the technical means of the present invention, the following description will be given by way of specific examples.
The first embodiment is as follows:
fig. 1 shows a flow of a method for enhancing map representation in a WebGIS environment according to an embodiment of the present invention, and for convenience of description, only the portions related to the embodiment of the present invention are shown.
The method for enhancing map expression in the WebGIS environment provided by the embodiment comprises the following steps:
and step S1, traversing each layer in the map object.
The map container is provided with a plurality of layers, and if 5 layers are provided, one layer which needs to be used as a main observation object is used as a target layer and is set as a Layertarget; the other 4 layers are background layers and are LayerBackground. When a user needs to observe a target layer LayerTarget, each layer in the map object is traversed first.
Step S2, the background image is weakened. Acquiring an example of a background layer object, storing a content screenshot quoted to the current window range in each background layer into a preset picture set to be adjusted, and weakening each picture in the picture set to be adjusted.
In the traversal process, each background layer and the current window range of the window displayed by the current client are obtained, the content in the background layer within the current window range is subjected to screenshot, and the picture, generally in a PNG format, is stored into the picture set to be adjusted.
And weakening each picture in the set to increase the contrast with the target layer. Specifically, the color saturation of the background image layer is weakened by calculating the color space of the background image layer on the premise of not changing the overall background effect of the background image layer. In the step, firstly, the RGB value of each pixel point in the picture is obtained, and the HSL value of each pixel point in the picture is obtained by converting the RGB value into the HSL color mode; and then, sequencing the saturation components S of the pixels from high to low, and reducing the saturation of the first K% of the pixels. Since the pixel points are at a lower saturation, if the saturation is further reduced, the display expression of the pixel may be affected. Therefore, in this embodiment, the pixel points are sorted according to the saturation value, and only the saturation of the first K% pixel points is reduced, where K is 20.
The calculation method of the percentage reduction of saturation comprises the following steps: and (5-K) the saturation summation of the pixels accounts for the proportion of the whole image saturation after the use, and the saturation of the pixels of K% before the use is reduced by the proportion. Specifically, firstly summing the saturation of the last (100-K)% of the pixels, marking as S1, summing the saturation of all the pixels of the picture, marking as S2, and setting an adjustment coefficient T as S1/S2; and multiplying the saturation of the front K% pixel points by a proportional coefficient T, and applying the calculated saturation to each pixel. By the adjusting method, the adjustment proportion of the saturation of the front K% pixel point is not fixed and is related to the saturation of other pixel points, and the design is very reasonable, so that the saturation of the pixel cannot be reduced sharply, and the difference between the saturation of the pixel and the saturation of other pixel points is not great.
And step S3, enhancing the target image. When image enhancement is enabled, obtaining an example of an object of a target layer, obtaining a rendering picture in a current window range, superposing an isolation color on each pixel point in the rendering picture, applying the isolation color to the target layer, and placing the target layer on the topmost layer of a map container.
In the application level, the embodiment is provided with a switch, and a user can decide whether to adopt image enhancement to enhance the image expression effect. When image enhancement is enabled, obtaining a layer object of a target layer LayerTarget, obtaining a rendering picture in a current window range, then superposing each pixel with an RGBA (255, 255, 255, 0.1) value for each pixel in the obtained rendering picture, namely adding an isolation color, and applying the isolation color to the target layer after superposing the isolation color and the original pixel. And finally, placing the target layer LayerTarget at the topmost layer of the map container.
And step S4, re-rendering and displaying all layers.
And after all the layers are re-rendered, the display effect of the superposed layers can be seen. Meanwhile, if the range of the current view window map is changed after the operation is passed, the operation can be triggered by the steps.
In summary, in the method of the present embodiment, by calculating the color space of the background layer, on the premise of not changing the overall background effect, the color saturation is weakened, and the contrast with the target layer is increased; meanwhile, the target map layer can be further enhanced, the map surface expression during map overlaying is further improved, and the method is particularly suitable for overlaying and browsing the map layers such as roads, pipelines and the like.
Example two:
fig. 2 illustrates a structure of a device for enhancing map representation in a WebGIS environment according to an embodiment of the present invention, and only a portion related to the embodiment of the present invention is illustrated for convenience of description.
The device for enhancing map expression in the WebGIS environment provided by the embodiment comprises:
the traversing unit 21 is configured to traverse each layer in the map object;
the weakening processing unit 22 is configured to obtain an instance of a background layer object, store a content screenshot, which is referred to in a current window range in each background layer, in a preset to-be-adjusted picture set, and weaken each picture in the to-be-adjusted picture set;
the enhancement processing unit 23 is configured to, when image enhancement is enabled, obtain an instance of obtaining a target layer object, obtain a rendered picture within a current window range, superimpose an isolation color on each pixel point in the rendered picture, apply the superimposed isolation color to the target layer, and place the target layer on the topmost layer of the map container;
and the display unit 24 is used for re-rendering and displaying all the layers.
The functional units 21 to 24 correspondingly implement steps S1 to S4 in the first embodiment, after the image layer is traversed, the weakening processing unit weakens the image of the background image layer, and meanwhile, the enhancement processing unit may further enhance the target image layer to enlarge the contrast between the target image layer and the background image layer, highlight the visual expression of the main target image layer, realize that the human eye can concentrate on the target data, and improve the image expression effect.
Wherein the weakening processing unit includes:
the pixel conversion module is used for acquiring the RGB value of each pixel point in the picture aiming at each picture in the picture set to be adjusted, and converting the RGB value into the HSL color mode to obtain the HSL value of each pixel point in the picture;
and the reduction processing module is used for sequencing the saturation components of the pixels from high to low and reducing the saturation of the first K% of the pixels.
The reduction processing module includes:
the first processing unit is used for summing the saturation of the last (100-K)% of the pixels and marking the sum as S1, summing the saturations of all the pixels of the picture and marking the sum as S2, and adjusting the coefficient T to be S1/S2; wherein K is 20;
and the second processing unit is used for multiplying the saturation of the front K% pixel point by the proportion coefficient T and applying the calculated saturation to each pixel.
In this embodiment, during the weakening process, the pixel HSL value is obtained through the pixel conversion module, then the saturation of the pixels in a certain range is reduced through the reduction processing module, mainly the saturation of the previous K% pixels is multiplied by the proportionality coefficient T, so that the weakening adjustment is realized, and the specific adjustment is realized through the first processing unit and the second processing unit. This process is described in the first embodiment, and is not described herein again.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.
Claims (10)
1. A method for enhancing map expression in a WebGIS environment, the method comprising the steps of:
traversing each layer in the map object;
acquiring an example of a background layer object, storing a content screenshot quoted to the current window range in each background layer into a preset picture set to be adjusted, and weakening each picture in the picture set to be adjusted;
when image enhancement is enabled, acquiring an example of an object of a target layer, acquiring a rendering picture in a current window range, superposing an isolation color on each pixel point in the rendering picture, applying the isolation color to the target layer, and placing the target layer on the topmost layer of a map container;
and re-rendering all layers for display.
2. The method for enhancing map expression in the WebGIS environment according to claim 1, wherein the picture weakening process is as follows:
aiming at each picture in the picture set to be adjusted, acquiring the RGB value of each pixel point in the picture, and converting the RGB value into an HSL color mode to obtain the HSL value of each pixel point in the picture;
and sequencing the saturation components of the pixels from high to low, and reducing the saturation of the first K% of the pixels.
3. The method for enhancing map expression in a WebGIS environment as claimed in claim 2, wherein said saturation is reduced by the following steps:
summing the saturation of the last (100-K)% of the pixels, marking the sum as S1, summing the saturations of all the pixels of the picture, marking the sum as S2, and adjusting the coefficient T to be S1/S2;
and multiplying the saturation of the front K% pixel points by a proportional coefficient T, and applying the calculated saturation to each pixel.
4. The method of enhancing map expression in a WebGIS environment of claim 3, wherein K-20.
5. The method of enhancing map expressions in a WebGIS environment as claimed in claim 1, wherein the RGBA values of the isolated color are (255, 255, 255, 0.1).
6. An apparatus for enhancing map representation in a WebGIS environment, the apparatus comprising:
the traversing unit is used for traversing each layer in the map object;
the weakening processing unit is used for acquiring an example of a background layer object, storing a content screenshot quoted to the current window range in each background layer into a preset picture set to be adjusted, and weakening each picture in the picture set to be adjusted;
the enhancement processing unit is used for acquiring an example of an object of a target layer when image enhancement is enabled, acquiring a rendering picture in a current window range, superposing an isolation color on each pixel point in the rendering picture, applying the isolation color to the target layer and placing the target layer on the topmost layer of the map container;
and the display unit is used for re-rendering and displaying all the layers.
7. The apparatus for enhancing map representation in WebGIS environment according to claim 6, wherein the weakening processing unit comprises:
the pixel conversion module is used for acquiring the RGB value of each pixel point in the picture aiming at each picture in the picture set to be adjusted, and converting the RGB value into the HSL color mode to obtain the HSL value of each pixel point in the picture;
and the reduction processing module is used for sequencing the saturation components of the pixels from high to low and reducing the saturation of the first K% of the pixels.
8. The apparatus for enhancing map expressions in a WebGIS environment of claim 7, wherein the reduction processing module comprises:
the first processing unit is used for summing the saturation of the last (100-K)% of the pixels and marking the sum as S1, summing the saturations of all the pixels of the picture and marking the sum as S2, and adjusting the coefficient T to be S1/S2;
and the second processing unit is used for multiplying the saturation of the front K% pixel point by the proportion coefficient T and applying the calculated saturation to each pixel.
9. The apparatus for enhancing map expression in a WebGIS environment of claim 8, wherein K-20.
10. The apparatus for enhancing map representation in WebGIS environment as claimed in claim 6, wherein RGBA value of the isolation color is (255, 255, 255, 0.1).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910978398.9A CN110766626B (en) | 2019-10-15 | 2019-10-15 | Method and device for enhancing map expression in WebGIS environment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910978398.9A CN110766626B (en) | 2019-10-15 | 2019-10-15 | Method and device for enhancing map expression in WebGIS environment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110766626A true CN110766626A (en) | 2020-02-07 |
CN110766626B CN110766626B (en) | 2022-08-30 |
Family
ID=69331412
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910978398.9A Active CN110766626B (en) | 2019-10-15 | 2019-10-15 | Method and device for enhancing map expression in WebGIS environment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110766626B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102663786A (en) * | 2012-03-30 | 2012-09-12 | 惠州Tcl移动通信有限公司 | Layer superposition method and mobile terminal employing the same |
CN105138658A (en) * | 2015-08-31 | 2015-12-09 | 百度在线网络技术(北京)有限公司 | Method and device for displaying map information |
CN106331427A (en) * | 2016-08-24 | 2017-01-11 | 北京小米移动软件有限公司 | Saturation enhancement method and apparatuses |
CN109934795A (en) * | 2019-03-04 | 2019-06-25 | 京东方科技集团股份有限公司 | A kind of display methods, device, electronic equipment and computer readable storage medium |
-
2019
- 2019-10-15 CN CN201910978398.9A patent/CN110766626B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102663786A (en) * | 2012-03-30 | 2012-09-12 | 惠州Tcl移动通信有限公司 | Layer superposition method and mobile terminal employing the same |
CN105138658A (en) * | 2015-08-31 | 2015-12-09 | 百度在线网络技术(北京)有限公司 | Method and device for displaying map information |
CN106331427A (en) * | 2016-08-24 | 2017-01-11 | 北京小米移动软件有限公司 | Saturation enhancement method and apparatuses |
CN109934795A (en) * | 2019-03-04 | 2019-06-25 | 京东方科技集团股份有限公司 | A kind of display methods, device, electronic equipment and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110766626B (en) | 2022-08-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3391247B1 (en) | Split tile map rendering | |
US8471732B2 (en) | Method for re-using photorealistic 3D landmarks for nonphotorealistic 3D maps | |
US9424673B2 (en) | Efficient composition and rendering of graphical elements | |
US9390544B2 (en) | 3D navigation methods using nonphotorealistic (NPR) 3D maps | |
US20110144909A1 (en) | Personalized and context-sensitive 3d route guidance | |
CN104657458B (en) | The methods of exhibiting and device of the target information of foreground target in scene image | |
WO2006005003A9 (en) | Composition of raster and vector graphics in geographic information systems | |
KR102001191B1 (en) | Rendering a text image following a line | |
CN110832278A (en) | Rendering map data using a description of grid differences | |
CA2820305A1 (en) | Systems and methods for generating and displaying stereoscopic image pairs of geographical areas | |
CN105823475B (en) | Three-dimensional representation method of scene | |
EP2804149B1 (en) | Water representation by color gradients on a digital map | |
CN104182498B (en) | Electronic chart engine and without time delay display methods under Android platform | |
Gil et al. | DEM shading method for the correction of pseudoscopic effect on multi-platform satellite imagery | |
CN110766626B (en) | Method and device for enhancing map expression in WebGIS environment | |
CN106846449B (en) | Rendering method and device for visual angle material or map | |
Hoarau et al. | Color and texture interpolation between orthoimagery and vector data | |
CN115496829A (en) | Method and device for quickly manufacturing local high-definition image map based on webpage | |
US10621757B2 (en) | Method for producing a 2D image of a 3D surface | |
She et al. | Rendering 2d lines on 3d terrain model with optimization in visual quality and running performance | |
US20130038630A1 (en) | Image drawing device and image drawing method | |
JP6247456B2 (en) | Navigation device and map drawing method | |
KR100977396B1 (en) | Apparatus and method for processing mipmap image | |
CN116486026A (en) | Map rendering method, navigation method, device, electronic equipment and storage medium | |
Gil Docampo et al. | DEM shading method for the correction of pseudoscopic effect on multi-platform satellite imagery |
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 | ||
CB02 | Change of applicant information |
Address after: 430223 Wuda science and Technology Park, Jiangxia Avenue, Miaoshan community, Donghu Development Zone, Wuhan City, Hubei Province Applicant after: Geospace Information Technology Co., Ltd. Address before: 430223 Wuda science and Technology Park, Jiangxia Avenue, Miaoshan community, Donghu Development Zone, Wuhan City, Hubei Province Applicant before: WUDA GEOINFORMATICS Co.,Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |