CN106485767B - Method and device for drawing symbols - Google Patents

Method and device for drawing symbols Download PDF

Info

Publication number
CN106485767B
CN106485767B CN201510527769.3A CN201510527769A CN106485767B CN 106485767 B CN106485767 B CN 106485767B CN 201510527769 A CN201510527769 A CN 201510527769A CN 106485767 B CN106485767 B CN 106485767B
Authority
CN
China
Prior art keywords
image
grid
drawn
area
position information
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
CN201510527769.3A
Other languages
Chinese (zh)
Other versions
CN106485767A (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.)
Founder International Co Ltd
Founder International Beijing Co Ltd
Original Assignee
Founder International Co Ltd
Founder International Beijing 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 Founder International Co Ltd, Founder International Beijing Co Ltd filed Critical Founder International Co Ltd
Priority to CN201510527769.3A priority Critical patent/CN106485767B/en
Publication of CN106485767A publication Critical patent/CN106485767A/en
Application granted granted Critical
Publication of CN106485767B publication Critical patent/CN106485767B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a method and a device for drawing symbols, firstly determining a to-be-selected grid corresponding to an image to be drawn in a region image according to position information of the image to be drawn, then obtaining the drawing condition of each to-be-selected grid, determining whether each to-be-selected grid is an effective grid of the image to be drawn according to the drawing condition of each to-be-selected grid, if each to-be-selected grid is the effective grid of the image to be drawn or the total usable drawing region of the image to be drawn in the corresponding region of the to-be-selected grid is not less than a first threshold value, drawing the image to be drawn in the corresponding region of the to-be-selected grid, and showing the distribution condition of space point data rapidly without performing any operation processing of space analysis on the position information of the obtained image to be drawn, thereby rapidly completing the drawing of the image to be drawn in the region image, and improving the drawing rate, and further, the speed of displaying the distribution situation of the spatial point data is improved.

Description

Method and device for drawing symbols
Technical Field
The invention belongs to the technical field of geographic information, and particularly relates to a method and a device for drawing symbols.
Background
When the amount of the spatial point data is large, in order to show the distribution condition of the spatial point data, the spatial aggregation is usually performed on the spatial point data or the spatial point data is shown in a hot zone form, the spatial aggregation showing mode is that point location information is aggregated into a plurality of points according to the distance between the point location information and the spatial point data, and each point displays the aggregated point coordinates and the amount of the point data aggregated to the point; the space hot area is analyzed and operated to convert the point data into hot plane data, and the macro display point data is shown in the aggregation and distribution conditions and expressed in different colors in different aggregation areas. In both of the above two methods, the spatial point data needs to be analyzed and operated, so the speed of displaying the distribution of the spatial point data is slow.
Disclosure of Invention
The embodiment of the invention provides a method and a device for drawing symbols, which are used for improving the speed of displaying the distribution situation of spatial point data.
The method for drawing the symbol provided by the embodiment of the invention comprises the following steps:
determining a grid to be selected corresponding to an image to be drawn in an area image according to position information of the image to be drawn, wherein the area image is divided into a plurality of grids, the size of the grid is not smaller than that of the image to be drawn, and the number of the grids to be selected is more than or equal to 1;
obtaining the drawing condition of each grid to be selected;
determining whether each grid to be selected is an effective grid of the image to be drawn according to the drawing condition of each grid to be selected, and drawing the image to be drawn in a corresponding area of each grid to be selected if each grid to be selected is the effective grid of the image to be drawn; or,
and when the total available drawing area of the image to be drawn in the corresponding area of the grid to be selected is determined to be not less than a first threshold value according to the drawing condition of each grid to be selected, drawing the image to be drawn in the corresponding area of the grid to be selected.
Preferably, before determining the grid to be selected corresponding to the image to be drawn in the region image according to the position information of the image to be drawn, the method further includes:
acquiring the size of the image to be drawn and the size of the area image;
determining the size of a grid according to the size of the image to be drawn;
and carrying out meshing on the area image according to the size of the mesh.
Preferably, before the grid division is performed on the area image according to the size of the grid, the method further includes:
and performing expansion processing on the area image, so that the pixel number of the processed area image is in accordance with the nth power of 2 and is closest to the pixel number of the area image.
Preferably, determining a grid to be selected corresponding to the image to be drawn in the region image according to the position information of the image to be drawn includes:
determining first position information of the image to be drawn in the area image according to the position information of the image to be drawn;
and determining the grid to be selected corresponding to the image to be drawn according to the first position information and the relation between the area image and the processed area image.
Preferably, determining whether each candidate grid is an effective grid of the image to be drawn according to the drawing condition of each candidate grid includes:
and if the drawn area of the Nth grid to be selected is not larger than a second threshold value, the Nth grid to be selected is an effective grid of the image to be drawn.
Preferably, after the image to be drawn is drawn in the area corresponding to the grid to be selected, the drawing condition of the grid to be selected is updated.
Preferably, after updating the drawing condition of the grid to be selected, the method further includes:
and judging whether the drawing rate of the area image is greater than a third threshold value, if so, stopping drawing the image to be drawn.
The embodiment of the present invention further provides a device for drawing symbols, including:
the device comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a grid to be selected corresponding to an image to be drawn in a region image according to position information of the image to be drawn, the region image is divided into a plurality of grids, the size of the grid is not smaller than that of the image to be drawn, and the number of the grids to be selected is more than or equal to 1;
the acquisition module is used for acquiring the drawing condition of each grid to be selected;
the drawing module is used for determining whether each grid to be selected is an effective grid of the image to be drawn according to the drawing condition of each grid to be selected, and drawing the image to be drawn in a corresponding area of each grid to be selected if each grid to be selected is the effective grid of the image to be drawn; or,
and the method is used for drawing the image to be drawn in the corresponding area of the to-be-selected grid when the total drawing area which can be used in the corresponding area of the to-be-selected grid is determined to be not less than a first threshold value according to the drawing condition of each to-be-selected grid.
Preferably, before the determining module is configured to determine, according to the position information of the image to be drawn, the grid to be selected corresponding to the image to be drawn in the area image, the determining module is further configured to:
instructing the acquisition module to acquire the size of the image to be drawn and the size of the area image;
determining the size of a grid according to the size of the image to be drawn;
and carrying out meshing on the area image according to the size of the mesh.
Preferably, the determining module is further configured to:
and according to the size of the grid, before the area image is subjected to grid division, the area image is subjected to expansion processing, so that the pixel number of the processed area image is in accordance with the nth power of 2 and is closest to the pixel number of the area image.
Preferably, the determining module is specifically configured to:
determining first position information of the image to be drawn in the area image according to the position information of the image to be drawn;
and determining the grid to be selected corresponding to the image to be drawn according to the first position information and the relation between the area image and the processed area image.
Preferably, the drawing module is specifically configured to:
and if the drawn area of the Nth grid to be selected is not larger than a second threshold value, the Nth grid to be selected is an effective grid of the image to be drawn.
Preferably, after the image to be drawn is drawn in the area corresponding to the grid to be selected, the drawing condition of the grid to be selected is updated.
Preferably, the drawing module is further configured to:
and after the drawing condition of the grid to be selected is updated, judging whether the drawing rate of the area image is greater than a third threshold value, if so, stopping drawing the image to be drawn.
According to the method and the device for drawing the symbol, firstly, the grid to be selected corresponding to the image to be drawn is determined in the area image according to the position information of the image to be drawn. And then obtaining the drawing condition of each to-be-selected grid, determining whether each to-be-selected grid is an effective grid of the to-be-drawn image according to the drawing condition of each to-be-selected grid, and drawing the to-be-drawn image in the corresponding area of the to-be-selected grid if each to-be-selected grid is the effective grid of the to-be-drawn image or determining that the total usable drawing area of the to-be-drawn image in the corresponding area of the to-be-selected grid is not less than a first threshold value according to the drawing condition of each to-be-selected grid. Because the original position information is drawn and is not changed, the distribution situation of the spatial point data can be more accurately shown. In addition, when the amount of the spatial point data is large, all the spatial point data cannot be completely drawn without changing, so that a better drawing effect is achieved, and the distribution condition of the spatial point data can be displayed more clearly.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart of a rendering method according to an embodiment of the present invention;
fig. 2 is a flowchart of a rendering method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a region image after grid division according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an area image of an image to be drawn after grid division according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a grid according to an embodiment of the present invention;
fig. 6 is a flowchart of a method for drawing an image according to a third embodiment of the present invention;
fig. 7 is a schematic structural diagram of a drawing image according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The latitude and longitude data in the embodiment of the invention are used for illustration only, and may come in and go out with the actual latitude and longitude data.
Example one
Fig. 1 is a flowchart of a method for drawing symbols according to an embodiment of the present invention. As shown in fig. 1, the process may include:
s101, determining a grid to be selected corresponding to the image to be drawn in the area image according to the position information of the image to be drawn.
The area image may be divided into a plurality of meshes, the number of pixels of the meshes is greater than or equal to that of the image to be drawn, and the number of the meshes to be selected is greater than or equal to 1.
And S102, obtaining the drawing condition of each grid to be selected.
S103, judging whether each grid to be selected is an effective grid of the image to be drawn according to the drawing condition of each grid to be selected.
If yes, go to step S104, otherwise, end the process.
And S104, drawing an image to be drawn in a corresponding area of the grid to be selected.
Example two
Fig. 2 is a flowchart of a method for drawing symbols according to a second embodiment of the present invention. As shown in fig. 2, the process may include:
s201, determining a grid to be selected corresponding to the image to be drawn in the area image according to the position information of the image to be drawn.
The area image may be divided into a plurality of meshes, the number of pixels of the meshes is greater than or equal to that of the image to be drawn, and the number of the meshes to be selected is greater than or equal to 1.
S202, obtaining the drawing condition of each grid to be selected.
S203, judging whether the total drawing area of the image to be drawn, which can be used in the corresponding area of the grid to be selected, is not less than a first threshold value according to the drawing condition of each grid to be selected, if so, turning to the step S204, otherwise, ending the process.
And S204, drawing an image to be drawn in a corresponding area of the grid to be selected.
Before the above step S101 or S201, the size of the image to be drawn and the size of the area image may be acquired, and then the size of the mesh may be determined according to the acquired size of the image to be drawn. Meanwhile, in order to perform integer displacement algorithm, the region image can be expanded to make the pixel number of the processed region image accord with the n power of 2, and finally, the processed region image is subjected to grid division according to the size of the grid.
For example, when the number of pixels of the acquired image to be rendered is 4(px) × 4(px), the number of pixels of the mesh may be determined to be 5(px) × 5(px), 6(px) × 6(px), 7(px) × 7(px), 8(px) × 8(px), or the mesh in which the number of pixels determined from the number of pixels of the acquired image to be rendered, 4(px) < 4(px), is greater than the number of pixels of the image to be rendered. In specific implementation, the smaller the pixel number value of the grid is, the more the grid is divided, and the better the display effect is.
In order to perform integer shift operation to quickly determine the position of the grid, the number of pixels of the processed area image is set to the nth power of 2, and the number of pixels of the expanded area image is set to be closest to the original area image, that is, the number of pixels of the area image before processing.
For example, when the number of pixels of the acquired region image is 500(px) × 1000(px), it may be expanded to 512(px) × 1024(px), where 512 is the 9 th power of 2, 1024 is the 10 th power of 2, and 512 is closest to 500, 1024 is closest to 1000.
Optionally, before step S101 or step S201, the position information of the image to be drawn may also be stored in the memory, and a spatial index is established, where the spatial index is a storage path of the image to be drawn in the memory. When the position information of the image to be drawn is stored in the memory, the position information of the image to be drawn can be rapidly acquired, so that the drawing speed of the image to be drawn can be increased, and the display speed of the distribution situation of the spatial point data can be increased.
In the above steps S101 and S201, in order to determine the grid to be selected corresponding to the image to be drawn in the region image, first position information of the image to be drawn in the region image may be determined according to the position information of the image to be drawn, and then the grid to be selected corresponding to the image to be drawn may be determined according to the first position information and the relationship between the region image and the processed region image.
Specifically, when it is determined that the spatial range of the region image is a region composed of latitude and longitude data (x1, y1) and (x2, y2), the number of pixels of the region image is m1(px) × n1(px), and the expanded number of pixels of the region image is m2(px) × n2(px), the spatial range of the region image becomes a region composed of (x1, y1) and (x3, y 3). Wherein:
x3 ═ x1+ (m2/m1) (x2-x1) [ formula 1]
y3 ═ y1+ (n2/n1) (y2-y1) [ equation 2]
X1, x2, and x3 in the above formula [1] are longitude data, and y1, y2, and y3 in the above formula [2] are latitude data.
When the determined grid pixel number is m (px), dividing the expanded region image according to the determined grid pixel number m (px), namely after dividing the pixel number m2(px) n2(px) of the expanded region image according to the grid pixel number m (px), and if the obtained position information of the image to be drawn is longitude and latitude data (x, y), determining the position of the grid of the obtained image to be drawn in the expanded region image to be (m3, n3), wherein:
m3 (x-x 1)/(x 4-x 1) (n2/m) [ formula 3]
n3 (y-y 1)/(y 4-y 1) (m2/m) [ formula 4]
M3 in the above formula [3] is a grid value in a row direction of the image to be drawn in the expanded region image, and n3 in the formula [4] is a grid value in a column direction of the image to be drawn in the expanded region image.
After the position of the image to be drawn in the expanded region image is determined, the grid to be selected corresponding to the image to be drawn is determined according to the position of the image to be drawn in the expanded region image. If the to-be-selected grid corresponding to the to-be-drawn image is an effective grid, when the to-be-drawn image is drawn in the corresponding area of the to-be-selected grid, in order to increase the drawing speed, the position of the to-be-drawn image in the expanded area image can be used as the central point of the to-be-drawn image, and certainly, the position of the to-be-drawn image in the expanded area image can also be used as any point of the to-be-drawn image.
It should be noted that, when the spatial range of the area image is an area composed of latitude and longitude data (x1, y1) and (x2, y2), the area may be a rectangular area or a square area, or may be an area with other shapes, such as a circular area, an oval area, and the like, that is, the shape of the area is not limited in the embodiment of the present invention.
In order to increase the flexibility of the determination mechanism, in step S102, when determining whether each candidate grid is an effective grid of the image to be drawn according to the drawing condition of each candidate grid, the following method may be used for determining.
And if the drawn area of the Nth grid to be selected is smaller than or equal to the second threshold, the Nth grid to be selected is an effective grid of the image to be drawn.
For example, when the second threshold is 80%, if the drawn area of the nth candidate grid is less than or equal to 80%, the nth candidate grid may be used as an effective grid of the image to be drawn. And if the drawn area of the Nth candidate grid is more than 80%, the Nth candidate grid cannot be used as an effective grid of the image to be drawn.
In order to avoid that a large amount of data is covered so as to reduce the display attractiveness, the corresponding area of the to-be-selected grid can be marked after the corresponding area of the to-be-selected grid draws the to-be-drawn image, and the drawing condition of the to-be-selected grid can be updated after the corresponding area of the to-be-selected grid is marked.
Further, in order to increase the speed of display, after the drawing condition of the to-be-selected grid is updated, whether the drawing rate of the area image is greater than a third threshold value or not can be judged, and if yes, the drawing of the to-be-drawn image is stopped. The drawing rate of the area image is calculated according to the drawing condition of each grid.
The following explains the determination of the candidate mesh corresponding to the image to be rendered in the region image and the determination of whether the candidate mesh is an effective mesh in detail according to the position information of the image to be rendered.
For example, assuming that the longitude and latitude data of the diagonal line of the area image a are (110, 28) and (120, 38), the longitude and latitude data of the four corners of the area image a can be determined as (110, 28), (120, 38) and (110, 38), respectively, and then a square area, which is the spatial range of the current area image, can be composed according to the longitude and latitude data of the four corners of the area image a, that is, (110, 28), (120, 38) and (110, 38). Further, assuming that the original number of pixels of the area image a is 100(px) × 100(px), the number of pixels of the expanded area image a is 128(px) × 128(px), and assuming that the number of pixels of the image M to be rendered is 4(px) × 4(px), and the number of pixels of the determined mesh is 8(px) × 8(px), when the expanded area image a is divided according to the number of pixels 8(px) × 8(px) of the determined mesh, the number of meshes of the divided area image a may be represented by 16 × 16, that is, the divided area image a has 16 meshes having 8(px) × 8(px) pixels in the row direction, and also has 16 meshes having 8(px) × 8(px) pixels in the column direction.
The expanded region image a is divided according to the number of pixels 8(px) × 8(px) of the grid, and the schematic structure diagram can be seen in fig. 3. In fig. 3, each small grid has 8(px) × 8(px) pixels.
Then, by substituting the longitude and latitude data (110, 28) which may specifically correspond to x1 and y1 in the formulas [1] and [2], the longitude and latitude data (120, 38) which may specifically correspond to x2 and y2 in the formulas [1] and [2], the original number of pixels 100(px) × 100(px) of the region image a which may specifically correspond to m1 and n1 in the formulas [1] and [2], the number of pixels 128(px) × 128(px) of the expanded region image a which may specifically correspond to m2 and n2 in the formulas [1] and [2] into the formulas [1] and [2], it is determined that the longitude and latitude data of the diagonal line of the expanded region image a are (110, 28) and (122.8, 40.8), wherein the longitude and latitude data (122.8, 40.8) may specifically correspond to x1 and y1 in the formulas [1] and [2], and the longitude and latitude data (120, 38) which may specifically correspond to the four corners of the expanded region image a which may correspond to x3 and 3, respectively, 28) (122.8, 28), (122.8, 40.8) and (110, 40.8), that is, the spatial range of the expanded area image a is the square area formed by (110, 28), (122.8, 40.8) and (110, 40.8).
Further assuming that the acquired position information of the image to be rendered is latitude and longitude data (116.4, 34.4), the latitude and longitude data (116.4, 34.4) may specifically correspond to x and y in the formulas [3] and [4], the latitude and longitude data (110, 28) may specifically correspond to x1 and y1 in the formulas [3] and [4], the latitude and longitude data (122.8, 40.8) may specifically correspond to x3 and y3 in the formulas [3] and [4], the number of pixels 128(px) × 128(px) of the expanded region image may specifically correspond to m2 and n2 in the formulas [3] and [4], and the number of pixels 8(px) < 8(px) of the grid may specifically correspond to m in the formulas [3] and [4], and after the obtained position information is substituted into the formulas [3] and [4], it may be determined that the image to be used for dividing the grid into the grid for the image to be rendered, 8) this grid position is indicated as the intersection of the 8 th row grid in the row direction and the 8 th column grid in the column direction in the area image a after the meshing.
And because the number of pixels of the image M to be drawn is 4(px) × 4(px), if the grid position, that is, the intersection point of the 8 th row grid in the row direction and the 8 th column grid in the column direction in the area image a after grid division is taken as the central point of the image to be drawn, then the grid a, the grid b, the grid c and the grid d are all the grids to be selected corresponding to the image M to be drawn. The areas of the image to be rendered in which grid a, grid b, grid c and grid d are located can be seen in fig. 4.
Based on fig. 4, when determining whether the grid to be selected, i.e., grid a, grid b, grid c, and grid d, of the image M to be rendered is an effective grid, the following situations may be included, but are not limited to:
situation one
If the grid a, the grid b, the grid c and the grid d are all blank grids, the grid a, the grid b, the grid c and the grid d are all effective grids of the image M to be drawn, and the image M to be drawn can be drawn in the grid a, the grid b, the grid c and the grid d.
In practical implementation, a coordinate system may be established separately for grid a, and a schematic structural diagram of the coordinate system may be established separately for grid a, as shown in fig. 5.
In fig. 5, each grid represents one pixel, and the total number of pixels of grid a is 8(px) × 8(px), i.e., the total number of pixels of grid a is 64 (px).
The drawing area of the image M to be drawn in the grid a is an area composed of the coordinate values (6, 6), (6, 8), (8, 8) and (8, 6) of the grid a, i.e., a gray area in fig. 4. After the portion of the image M to be drawn in the grid a is drawn, the region composed of the coordinate values (6, 6), (6, 8), (8, 8) and (8, 6) may also be marked.
The determination method of the drawing area of the image M to be drawn in the grid b, the drawing area of the image M to be drawn in the grid c and the drawing area of the image M to be drawn in the grid d is similar to the method of the image M to be drawn in the grid a, and is not described herein again.
Situation two
Referring to fig. 5, if regions (6, 6) (6, 8) (8, 8) and (8, 6) of grid a, i.e., gray regions in fig. 4, have been drawn, the image to be drawn is not drawn in the drawing regions of grid b, grid c and grid d. If the first threshold value of the total rendering area available for the image to be rendered in the corresponding area of the candidate mesh is 70%, since 75% of the image to be rendered M is renderable, in this case, the image to be rendered M is rendered even if the area made up of the areas (6, 6) (6, 8) (8, 8) and (8, 6) of the mesh a is rendered. If the first threshold value of the total drawing area of the image to be drawn that can be used in the corresponding area of the candidate grid is 80%, since only 75% of the image M to be drawn is drawable, in this case, the image M to be drawn is not drawn.
Situation three
If the grid a, the grid b, the grid c and the grid d are not blank grids, the threshold values of the drawn areas of the to-be-selected grid a, the to-be-selected grid b, the to-be-selected grid c and the to-be-selected grid d are 85%, and 90% of the areas of the to-be-selected grid a, the to-be-selected grid b, the to-be-selected grid c and the to-be-selected grid d are drawn, therefore, in this case, the image to be drawn is not drawn.
EXAMPLE III
On the basis of the methods for drawing symbols provided in the first and second embodiments, a flowchart of a method for drawing symbols provided in a third embodiment of the present invention can be seen in fig. 6.
S601, storing the position information of the image to be drawn in a memory, and establishing a spatial index.
And S602, acquiring the size of the image to be drawn and the size of the area image.
And S603, determining the size of the grid according to the size of the image to be drawn.
S604, the regional image is expanded, so that the pixel number of the processed regional image is in accordance with the n power of 2 and is closest to the pixel number of the regional image.
And S605, meshing the expanded area image according to the size of the mesh.
And S606, acquiring the position information of the image to be drawn.
And S607, determining a grid to be selected corresponding to the image to be drawn in the expanded region image according to the position information of the image to be drawn.
And S608, obtaining the drawing condition of each grid to be selected, and determining whether each grid to be selected is an effective grid of the image to be drawn according to the drawing condition of each grid to be selected.
And S609, judging whether each grid to be selected is an effective grid of the image to be drawn, if so, turning to the step S610, and if not, ending the process.
S610, judging whether the total drawing area of the image to be drawn, which can be used in the corresponding area of the grid to be selected, is not smaller than a first threshold value, if so, turning to the step S611, otherwise, ending the process.
And S611, drawing the image to be drawn in the corresponding area of the grid to be selected.
And S612, judging whether the drawing rate of the expanded regional image is greater than a third threshold value, if not, turning to the step S606, and if so, ending the process.
As can be seen from the above, in the method for drawing a symbol provided in the above embodiment, first, according to the position information of the image to be drawn, the grid to be selected corresponding to the image to be drawn is determined in the region image. And then obtaining the drawing condition of each to-be-selected grid, determining whether each to-be-selected grid is an effective grid of the to-be-drawn image according to the drawing condition of each to-be-selected grid, if each to-be-selected grid is the effective grid of the to-be-drawn image, or determining that the total usable drawing area of the to-be-drawn image in the corresponding area of the to-be-selected grid is not less than a first threshold value according to the drawing condition of each to-be-selected grid, drawing the to-be-drawn image in the corresponding area of the to-be-selected grid, and it can be seen that no operation processing of any space analysis is required to be carried out on the position information of the obtained to-be-drawn image, so that the drawing of the to. Due to the improvement of the drawing speed, the distribution situation of the spatial point data can be rapidly displayed, and the speed of displaying the distribution situation of the spatial point data is further improved. Because the original position information is drawn and is not changed, the distribution situation of the spatial point data can be more accurately shown. In addition, when the amount of the spatial point data is large, all the spatial point data cannot be completely drawn without changing, so that a better drawing effect is achieved, and the distribution condition of the spatial point data can be displayed more clearly.
Based on the same technical concept, the embodiment of the invention also provides a device for drawing the symbol, and the device can execute the method embodiment.
Fig. 7 is a schematic structural diagram of a device for drawing symbols according to an embodiment of the present invention. As shown in fig. 7, the apparatus may include: a determining module 701, an obtaining module 702 and a drawing module 703.
A determining module 701, configured to determine, according to position information of an image to be drawn, a grid to be selected corresponding to the image to be drawn in an area image, where the area image is divided into multiple grids, the size of the grid is not smaller than the size of the image to be drawn, and the number of the grid to be selected is greater than or equal to 1;
an obtaining module 702, configured to obtain a drawing condition of each grid to be selected;
a drawing module 703, configured to determine whether each grid to be selected is an effective grid of the image to be drawn according to a drawing condition of each grid to be selected, and if each grid to be selected is an effective grid of the image to be drawn, draw the image to be drawn in a corresponding area of the grid to be selected; or,
and the method is used for drawing the image to be drawn in the corresponding area of the to-be-selected grid when the total drawing area which can be used in the corresponding area of the to-be-selected grid is determined to be not less than a first threshold value according to the drawing condition of each to-be-selected grid.
Preferably, the determining module 701, before being configured to determine, according to the position information of the image to be drawn, the grid to be selected corresponding to the image to be drawn in the area image, is further configured to:
instructing the acquisition module to acquire the size of the image to be drawn and the size of the area image;
determining the size of a grid according to the size of the image to be drawn;
and carrying out meshing on the area image according to the size of the mesh.
Preferably, the determining module 701 is further configured to:
and according to the size of the grid, before the area image is subjected to grid division, the area image is subjected to expansion processing, so that the pixel number of the processed area image is in accordance with the nth power of 2 and is closest to the pixel number of the area image.
Preferably, the determining module 701 is specifically configured to:
determining first position information of the image to be drawn in the area image according to the position information of the image to be drawn;
and determining the grid to be selected corresponding to the image to be drawn according to the first position information and the relation between the area image and the processed area image.
Preferably, the rendering module 703 is specifically configured to:
and if the drawn area of the Nth grid to be selected is not larger than a second threshold value, the Nth grid to be selected is an effective grid of the image to be drawn.
Preferably, after the image to be drawn is drawn in the area corresponding to the grid to be selected, the drawing condition of the grid to be selected is updated.
Preferably, the rendering module 703 is further configured to:
and after the drawing condition of the grid to be selected is updated, judging whether the drawing rate of the area image is greater than a third threshold value, if so, stopping drawing the image to be drawn.
To sum up, according to the method and the device for drawing a symbol provided by the above embodiment, a grid to be selected corresponding to an image to be drawn is determined in an area image according to position information of the image to be drawn. And then obtaining the drawing condition of each to-be-selected grid, determining whether each to-be-selected grid is an effective grid of the to-be-drawn image according to the drawing condition of each to-be-selected grid, if each to-be-selected grid is the effective grid of the to-be-drawn image, or determining according to the drawing condition of each to-be-selected grid, and when the total usable drawing area of the to-be-drawn image in the corresponding area of the to-be-selected grid is not less than a first threshold value, drawing the to-be-drawn image in the corresponding area of the to-be-selected grid, it can be seen that no operation processing of any space analysis is needed to be carried out on the position information of the obtained to-be-drawn image, so that the drawing of the to-be-drawn image can be rapidly completed in the area image, the drawing speed is increased, and the distribution condition of. Because the original position information is drawn and is not changed, the distribution situation of the spatial point data can be more accurately shown. In addition, when the amount of the spatial point data is large, all the spatial point data cannot be completely drawn without changing, so that a better drawing effect is achieved, and the distribution condition of the spatial point data can be displayed more clearly.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (12)

1. A method of drawing a symbol, comprising:
determining a grid to be selected corresponding to an image to be drawn in an area image according to position information of the image to be drawn, wherein the area image is divided into a plurality of grids, the size of the grid is not smaller than that of the image to be drawn, and the number of the grids to be selected is more than or equal to 1; the position information of the image to be drawn is the absolute position of the image to be drawn;
obtaining the drawing condition of each grid to be selected;
determining whether each grid to be selected is an effective grid of the image to be drawn according to the drawing condition of each grid to be selected, and drawing the image to be drawn in a corresponding area of each grid to be selected if each grid to be selected is the effective grid of the image to be drawn; or,
when the total available drawing area of the image to be drawn in the corresponding area of the grid to be selected is determined to be not less than a first threshold value according to the drawing condition of each grid to be selected, drawing the image to be drawn in the corresponding area of the grid to be selected;
determining whether each grid to be selected is an effective grid of the image to be drawn according to the drawing condition of each grid to be selected, wherein the method comprises the following steps:
and if the drawn area of the Nth grid to be selected is not larger than a second threshold value, the Nth grid to be selected is an effective grid of the image to be drawn.
2. The method as claimed in claim 1, wherein before determining the grid to be selected corresponding to the image to be rendered in the region image according to the position information of the image to be rendered, further comprising:
acquiring the size of the image to be drawn and the size of the area image;
determining the size of a grid according to the size of the image to be drawn;
and carrying out meshing on the area image according to the size of the mesh.
3. The method of claim 2, wherein prior to meshing the region image according to the size of the mesh, further comprising:
and performing expansion processing on the area image, so that the pixel number of the processed area image is in accordance with the nth power of 2 and is closest to the pixel number of the area image.
4. The method of claim 3, wherein determining a grid to be selected in the region image corresponding to the image to be rendered according to the position information of the image to be rendered comprises:
determining first position information of the image to be drawn in the area image according to the position information of the image to be drawn; the first position information is the relative position of the image to be drawn in the area image;
and determining the grid to be selected corresponding to the image to be drawn according to the first position information and the relation between the area image and the processed area image.
5. The method of claim 1, wherein the drawing condition of the to-be-selected mesh is updated after the to-be-drawn image is drawn in the corresponding area of the to-be-selected mesh.
6. The method of claim 5, after updating the rendering conditions of the candidate grid, further comprising:
and judging whether the drawing rate of the area image is greater than a third threshold value, if so, stopping drawing the image to be drawn.
7. An apparatus for drawing symbols, comprising:
the device comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a grid to be selected corresponding to an image to be drawn in a region image according to position information of the image to be drawn, the region image is divided into a plurality of grids, the size of the grid is not smaller than that of the image to be drawn, and the number of the grids to be selected is more than or equal to 1; the position information of the image to be drawn is the absolute position of the image to be drawn;
the acquisition module is used for acquiring the drawing condition of each grid to be selected;
the drawing module is used for determining whether each grid to be selected is an effective grid of the image to be drawn according to the drawing condition of each grid to be selected, and drawing the image to be drawn in a corresponding area of each grid to be selected if each grid to be selected is the effective grid of the image to be drawn; or,
the system comprises a display device, a control device and a display device, wherein the display device is used for displaying an image to be drawn in a corresponding area of a grid to be selected;
wherein the rendering module is specifically configured to:
and if the drawn area of the Nth grid to be selected is not larger than a second threshold value, the Nth grid to be selected is an effective grid of the image to be drawn.
8. The apparatus of claim 7, wherein the determining module, before being configured to determine, according to the position information of the image to be drawn, the grid to be selected in the region image corresponding to the image to be drawn, is further configured to:
instructing the acquisition module to acquire the size of the image to be drawn and the size of the area image;
determining the size of a grid according to the size of the image to be drawn;
and carrying out meshing on the area image according to the size of the mesh.
9. The apparatus of claim 8, wherein the determination module is further configured to:
and according to the size of the grid, before the area image is subjected to grid division, the area image is subjected to expansion processing, so that the pixel number of the processed area image is in accordance with the nth power of 2 and is closest to the pixel number of the area image.
10. The apparatus of claim 9, wherein the determination module is specifically configured to:
determining first position information of the image to be drawn in the area image according to the position information of the image to be drawn; the first position information is the relative position of the image to be drawn in the area image;
and determining the grid to be selected corresponding to the image to be drawn according to the first position information and the relation between the area image and the processed area image.
11. The apparatus according to claim 7, wherein the drawing condition of the candidate mesh is updated after the corresponding region of the candidate mesh draws the image to be drawn.
12. The apparatus of claim 11, wherein the rendering module is further configured to:
and after the drawing condition of the grid to be selected is updated, judging whether the drawing rate of the area image is greater than a third threshold value, if so, stopping drawing the image to be drawn.
CN201510527769.3A 2015-08-25 2015-08-25 Method and device for drawing symbols Active CN106485767B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510527769.3A CN106485767B (en) 2015-08-25 2015-08-25 Method and device for drawing symbols

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510527769.3A CN106485767B (en) 2015-08-25 2015-08-25 Method and device for drawing symbols

Publications (2)

Publication Number Publication Date
CN106485767A CN106485767A (en) 2017-03-08
CN106485767B true CN106485767B (en) 2021-07-02

Family

ID=58233333

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510527769.3A Active CN106485767B (en) 2015-08-25 2015-08-25 Method and device for drawing symbols

Country Status (1)

Country Link
CN (1) CN106485767B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114580168A (en) * 2022-03-03 2022-06-03 山东瑞智飞控科技有限公司 Method for fusion display of unmanned aerial vehicle monitoring atmospheric pollution data and three-dimensional GIS

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101908062A (en) * 2010-07-02 2010-12-08 中国科学院计算技术研究所 Method for judging predicates in GIS (Geographic Information System) space and system thereof
CN102270236A (en) * 2011-08-04 2011-12-07 中国科学院计算技术研究所 Rasterized geographic information system (GIS)-based spatial relationship judging method and system
US8681154B1 (en) * 2010-07-15 2014-03-25 Rockwell Collins, Inc. Adaptive rendering of indistinct objects
CN104657367A (en) * 2013-11-18 2015-05-27 北京四维图新科技股份有限公司 Network map local update method and network map local update device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101908062A (en) * 2010-07-02 2010-12-08 中国科学院计算技术研究所 Method for judging predicates in GIS (Geographic Information System) space and system thereof
US8681154B1 (en) * 2010-07-15 2014-03-25 Rockwell Collins, Inc. Adaptive rendering of indistinct objects
CN102270236A (en) * 2011-08-04 2011-12-07 中国科学院计算技术研究所 Rasterized geographic information system (GIS)-based spatial relationship judging method and system
CN104657367A (en) * 2013-11-18 2015-05-27 北京四维图新科技股份有限公司 Network map local update method and network map local update device

Also Published As

Publication number Publication date
CN106485767A (en) 2017-03-08

Similar Documents

Publication Publication Date Title
RU2581163C1 (en) Multi-display control device and multi-display system
US9466146B2 (en) Image processing apparatus, image processing method and data structure of image file
CN110738722B (en) Thermodynamic diagram texture generation method, device and equipment
CN106648510B (en) The display methods and device of a kind of display resolution
CN101447091A (en) Method and apparatus for processing graphics
US20160343155A1 (en) Dynamic filling of shapes for graphical display of data
CN110570491B (en) Thermodynamic diagram generation method and device
US20170287201A1 (en) Texture generation system
CN101656037A (en) Method for displaying large-format picture on small screen equipment and small screen equipment
CN107424583B (en) Display data processing method and system for special-shaped image
CN106485767B (en) Method and device for drawing symbols
CN107833227B (en) Drawing method and system for circular cutting area
CN109598672B (en) Map road rendering method and device
CN111462278B (en) Depth-based material sequencing rendering method, medium, equipment and device
CN110176207B (en) Image data determination method and device and electronic equipment
CN101483771B (en) Method and apparatus for promoting frame rate
CN114692034A (en) Image display method, image display device, electronic equipment and computer storage medium
JP4664169B2 (en) Graphic drawing apparatus and graphic drawing program
US7646385B2 (en) Computer graphics rendering method and apparatus
CN115129191B (en) Three-dimensional object pickup method, device, equipment and storage medium
CN107330905B (en) Image processing method, device and storage medium
CN113126944B (en) Depth map display method, display device, electronic device, and storage medium
US20180150990A1 (en) Animation display apparatus and animation display method
JP5735939B2 (en) Map display device, map display method, and map display program
CN112445989A (en) WebGIS (Web geographic information System) -based map text label avoidance display method and device

Legal Events

Date Code Title Description
C06 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