CN105824843B - Map rendering method and device for geographic information system - Google Patents

Map rendering method and device for geographic information system Download PDF

Info

Publication number
CN105824843B
CN105824843B CN201510008904.3A CN201510008904A CN105824843B CN 105824843 B CN105824843 B CN 105824843B CN 201510008904 A CN201510008904 A CN 201510008904A CN 105824843 B CN105824843 B CN 105824843B
Authority
CN
China
Prior art keywords
tile
map
target point
rendering
tiles
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
CN201510008904.3A
Other languages
Chinese (zh)
Other versions
CN105824843A (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.)
China Mobile Group Henan Co Ltd
Original Assignee
China Mobile Group Henan 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 China Mobile Group Henan Co Ltd filed Critical China Mobile Group Henan Co Ltd
Priority to CN201510008904.3A priority Critical patent/CN105824843B/en
Publication of CN105824843A publication Critical patent/CN105824843A/en
Application granted granted Critical
Publication of CN105824843B publication Critical patent/CN105824843B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to the technical field of image rendering, and discloses a map rendering method of a geographic information system, which comprises the following steps: acquiring coordinate information of a target point on a map; determining whether the target point is positioned at the boundary of at least two tiles on the map according to the coordinate information of the target point on the map; if so, determining a reference tile and enabling the target point to be located inside the reference tile; re-slicing the map according to the reference tiles; rendering the map according to the re-sliced slice with the reference tile as a center. The method solves the problem that rendering of the whole GIS map is influenced due to the fact that rendering tiles are incomplete because target data are located at boundaries of the tiles and cannot be accurately positioned.

Description

Map rendering method and device for geographic information system
Technical Field
The invention relates to the technical field of image rendering, in particular to a map rendering method and device for a geographic information system.
Background
The Geographic Information System (GIS) is a technical System for collecting, storing, managing, operating, analyzing, displaying and describing Geographic distribution data in the whole or part of the space of the earth surface (including the atmosphere) under the support of a computer hardware and software System. The GIS map is stored by using a Tile technology (MapTile), the map Tile technology cuts the configured map with a certain coordinate range into a plurality of square pictures in rows and columns according to a fixed scale and the specified picture size, the square pictures are stored into an image file in a specified format, and a map slice obtained by cutting the map is also called a Tile (Tile).
After the initial rendering of the GIS map is finished, a user needs to check or analyze and process certain spatial data, can click an area where the spatial data is located on the map, or needs to input coordinates of a target point when the target point is not in a visible range, and at the moment, the map can be re-rendered, and all tiles are spirally rendered around the tile where the target point is located. However, when the target point happens to be located at the boundary of at least two tiles (as in fig. 1), it cannot be determined whether the target point is on the a-tile or the B-tile, and thus it cannot be determined which tile is the starting tile at all for rendering. Further, the phenomenon will affect A, B rendering of two tiles, and since the whole map is spirally rendered by using one tile as a start tile, there may be a problem that the spiral rendering of the tile is not successful, so that many fuzzy areas are shown on the map, which affects the rendering of the whole map.
Disclosure of Invention
The embodiment of the invention provides a map rendering method and device for a geographic information system, which are used for solving the problems that in the prior art, rendering cannot be accurately positioned due to the fact that target data are located at boundaries of tiles, rendering tiles are incomplete, and rendering of the whole GIS map is affected.
The method comprises the following steps:
a geographic information system map rendering method, comprising:
acquiring coordinate information of a target point on a map;
determining whether the target point is located at the boundary of at least two tiles on the map according to the coordinate information of the target point on the map, if so, executing:
determining a reference tile with the target point inside the reference tile;
re-slicing the map according to the reference tiles;
rendering the map according to the re-sliced slice with the reference tile as a center.
The determining a reference tile with the target point inside the reference tile comprises:
selecting one tile from at least two tiles at the boundary;
and changing the rendering range of the selected tile to obtain a reference tile, and enabling the target point to fall into the reference tile.
Changing the rendering range of the selected tile to obtain a reference tile, including:
increasing the length of the diagonal of the selected tile, resulting in a reference tile whose center point coincides with the center point of the selected tile.
Changing the rendering range of the selected tile to obtain a reference tile, including:
determining coordinate increment according to the position relation of the target point and the selected tile;
and moving the selected tile according to the coordinate increment to obtain a reference tile, wherein the area of the reference tile is the same as that of the selected tile.
Selecting one tile from the at least two tiles at the boundary includes randomly selecting one tile from the at least two tiles at the boundary.
A geographic information system map rendering apparatus, comprising:
the acquisition module is used for acquiring coordinate information of the target point on the map;
the judging module is used for determining whether the target point is positioned at the boundary of at least two tiles on the map according to the coordinate information of the target point on the map acquired by the acquiring module;
the determining module is used for determining a reference tile when the judging module judges that the target point is positioned at the boundary of at least two tiles on the map, so that the target point is positioned inside the reference tile;
a slicing module for re-slicing the map according to the reference tile determined by the determination module;
and the rendering module is used for rendering the map according to the slice obtained by slicing again by the slicing module by taking the reference tile determined by the determining module as a center.
The determining module comprises: a selection unit and a modification unit;
the selection unit is for selecting one tile from at least two tiles at the boundary;
the changing unit is used for changing the rendering range of the selected tile to obtain a reference tile, and the target point is made to fall into the reference tile.
The changing unit is used for increasing the length of the diagonal line of the selected tile to obtain a reference tile, and the central point of the reference tile is coincided with the central point of the selected tile.
The alteration unit is configured to:
determining coordinate increment according to the position relation of the target point and the selected tile;
and moving the selected tile according to the coordinate increment to obtain a reference tile, wherein the area of the reference tile is the same as that of the selected tile.
The selection unit is used for randomly selecting one tile from at least two tiles at the boundary.
According to the embodiment of the invention, aiming at the condition that the target point is positioned at the boundary of at least two tiles during GIS map rendering, the rendering range of the tiles is changed, so that the target point is positioned in one tile, the problem that the rendering of the whole GIS map is influenced due to the incomplete rendering of the tiles is solved, the reaction speed of a GIS system is increased, and the user experience is improved.
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 prior art situation when the target point happens to be at the boundary of at least two tiles;
FIG. 2 is a flowchart illustrating a method for rendering a map by a geographic information system according to an embodiment of the invention;
FIG. 3 is a block diagram of a geographic information system map rendering apparatus according to an embodiment of the present invention;
fig. 4 is a flowchart of a map rendering method of a geographic information system 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 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.
Example one
An embodiment of the present invention provides a map rendering method for a geographic information system, where a flow of the method is shown in fig. 2, and the method includes:
s101, acquiring coordinate information of a target point on a map;
s102, determining whether the target point is positioned at the boundary of at least two tiles on the map according to the coordinate information of the target point on the map, and if so, executing a step S103;
s103, determining a reference tile, and enabling the target point to be located inside the reference tile;
s104, re-slicing the map according to the reference tiles;
s105 renders the map from the re-sliced slice centered on the reference tile.
Preferably, step S103 further comprises selecting one tile from at least two tiles at the boundary; and changing the rendering range of the selected tile to obtain a reference tile, and enabling the target point to fall into the reference tile.
Tiles of a GIS map are divided according to coordinates on the map, and when a user clicks a target point or inputs coordinates of the target point, the following situations may occur: the target point is located inside a tile, on a common edge of two tiles or at a common vertex of four tiles. When the latter two conditions occur, because the system cannot judge from which tile the rendering starts, the rendering is incomplete, the rendering of the whole GIS map is affected, and the user experience is affected.
The method is used for re-slicing the map according to the condition that the target point is located at the boundary of at least two tiles, so that the target point is located inside one tile, the problem that when the target point is located at the boundary of at least two tiles, a system cannot judge which tile is used as a starting tile for rendering is solved, all slices can be completely displayed, the reaction speed of a GIS system is improved, and the user experience is improved.
Preferably, selecting one tile from the at least two tiles at the boundary comprises: randomly selecting one tile from the at least two tiles at the boundary.
Based on the same technical concept, an embodiment of the present invention further provides a map rendering apparatus for a geographic information system, which can execute the above method embodiment, and the apparatus, as shown in fig. 3, includes an obtaining module, a determining module, a slicing module, and a rendering module.
The acquisition module is used for acquiring coordinate information of the target point on the map;
the judging module is used for determining whether the target point is positioned at the boundary of at least two tiles on the map according to the coordinate information of the target point on the map acquired by the acquiring module;
the determining module is used for determining a reference tile when the judging module judges that a target point is positioned at the boundary of at least two tiles on the map, so that the target point is positioned inside the reference tile;
a slicing module for re-slicing the map according to the reference tile determined by the determination module;
and the rendering module is used for rendering the map according to the slice obtained by slicing again by the slicing module by taking the reference tile determined by the determining module as a center.
The determining module comprises a selecting unit and a changing unit;
a selection unit for selecting one tile from at least two tiles at the boundary; and the modifying unit is used for changing the rendering range of the selected tile to obtain a reference tile, so that the target point falls into the reference tile.
Preferably, the modifying unit is configured to increase the length of the diagonal of the selected tile, resulting in a reference tile, the center point of which coincides with the center point of the selected tile.
Or the changing unit is used for determining coordinate increment according to the position relation of the target point and the selected tile; and moving the selected tile according to the coordinate increment to obtain a reference tile, wherein the area of the reference tile is the same as that of the selected tile.
Preferably, the selection unit is adapted to randomly select one tile from at least two tiles at said boundary.
Example two
The second embodiment of the invention provides a map rendering method for a geographic information system, and the flow of the method is shown in figure 4
S201 acquires coordinate information of the target point on the map.
S202, according to coordinate information of the target point on the map, determining whether the target point is located at a boundary of at least two tiles on the map, if so, executing a step S204; if not, go to step S203.
S203, taking the tile where the target point is located as a starting tile, and rendering surrounding tiles in a spiral mode until the whole map is rendered;
s204 randomly selects one tile from the at least two tiles at the boundary.
If the target point is located on a common edge of the two tiles, randomly selecting one tile from the two tiles; if the target point is a common vertex of four tiles, one tile is randomly selected from the four tiles.
S205, changing the rendering range of the selected tile to obtain a reference tile, and enabling the target point to fall into the reference tile.
Preferably, there are two schemes for changing the rendering range of the tile:
a. keeping the coordinates of the center point of the tile unchanged, and increasing the length of the diagonal line of the tile, wherein a variable can be subtracted from the coordinates of the top point of the lower left corner of the tile, and a variable is added to the coordinates of the top point of the upper right corner of the tile;
b. according to the position relation between the target point and the tile, the longitude of the four vertexes of the tile is unchanged, the latitude is increased by one variable, or the latitude is unchanged, the longitude is increased by one variable, namely the tile is moved towards the direction of the target point, and the areas of the tile before and after the movement are unchanged.
S206 re-slices the map according to the reference tile.
And re-dividing the map by taking the size and the position of the tile with the changed rendering range as a reference.
S207, spirally rendering the map according to the slice obtained by re-slicing by taking the reference tile as a center.
Starting from the reference tile, rendering the tile of the whole map in a spiral rendering mode.
The following describes a method for changing the rendering range of a tile in a second embodiment of the present invention by using an example in practical application:
if the tile A and the tile B are two adjacent tiles, the coordinate of the vertex at the lower left corner of the tile A is (0,0), the coordinate of the vertex at the upper right corner of the tile A is (10,10), the coordinate of the vertex at the lower left corner of the tile B is (10,0), the coordinate of the vertex at the upper right corner of the tile B is (20,10), the coordinate of the target point is (10,5), and the target point is located on the common edge of the tile A and the tile B. When a user clicks a target point or inputs the coordinate of the target point, the map needs to be re-rendered, but at the moment, the target point is located on the common edge of the two tiles, and the tiles need to be re-divided. Randomly selecting a tile A, and changing the rendering range of the tile A:
a. the coordinate of the vertex of the lower left corner of the A tile is reduced by 2 to be (-2, -2); the coordinate of the vertex at the upper right corner is added with 2 to become (12, 12). Thus, the target point is within the range of the a-tile. Correspondingly, the coordinates of the vertex at the lower left corner of the B tile become (12, -2) and the coordinates of the vertex at the upper right corner become (26, 12).
b. All vertex latitude coordinates of the a-tile plus 2, the longitude coordinates do not change, i.e., the vertex coordinates of the a-tile become (2,0), (2,10) (12,0), and (12, 10). Thus, the target point is within the range of the a-tile. Accordingly, the vertex coordinates of the B tile become (12,0) (12,10) (22,0) and (22,10), respectively.
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 (8)

1. A geographic information system map rendering method, the method comprising:
acquiring coordinate information of a target point on a map;
determining whether the target point is located at the boundary of at least two tiles on the map according to the coordinate information of the target point on the map, if so, executing:
selecting one tile from at least two tiles at the boundary;
changing the rendering range of the selected tile to obtain a reference tile, and enabling the target point to fall into the reference tile;
re-slicing the map according to the reference tiles;
rendering the map according to the re-sliced slice with the reference tile as a center.
2. The geographic information system map rendering method of claim 1, wherein said changing a rendering range of the selected tile to obtain a reference tile comprises:
increasing the length of the diagonal of the selected tile, resulting in a reference tile whose center point coincides with the center point of the selected tile.
3. The geographic information system map rendering method of claim 1, wherein said changing a rendering range of the selected tile to obtain a reference tile comprises:
determining coordinate increment according to the position relation of the target point and the selected tile;
and moving the selected tile according to the coordinate increment to obtain a reference tile, wherein the area of the reference tile is the same as that of the selected tile.
4. The geographic information system map rendering method of any of claims 1-3, wherein said selecting one tile from at least two tiles at the boundary comprises:
randomly selecting one tile from the at least two tiles at the boundary.
5. A geographic information system map rendering apparatus, comprising:
the acquisition module is used for acquiring coordinate information of the target point on the map;
the judging module is used for determining whether the target point is positioned at the boundary of at least two tiles on the map according to the coordinate information of the target point on the map acquired by the acquiring module;
the determining module is used for determining a reference tile when the judging module judges that the target point is positioned at the boundary of at least two tiles on the map, so that the target point is positioned inside the reference tile;
the determining module comprises: a selecting unit for selecting one tile from at least two tiles at the boundary; a changing unit, configured to change a rendering range of the tile selected by the selecting unit, to obtain a reference tile, and enable the target point to fall inside the reference tile;
a slicing module for re-slicing the map according to the reference tile determined by the determination module;
and the rendering module is used for rendering the map according to the slice obtained by slicing again by the slicing module by taking the reference tile determined by the determining module as a center.
6. The geographic information system map rendering apparatus of claim 5, wherein the altering unit is to:
increasing the length of the diagonal of the selected tile, resulting in a reference tile whose center point coincides with the center point of the selected tile.
7. The geographic information system map rendering apparatus of claim 5, wherein the altering unit is to:
determining coordinate increment according to the position relation of the target point and the selected tile;
and moving the selected tile according to the coordinate increment to obtain a reference tile, wherein the area of the reference tile is the same as that of the selected tile.
8. The geographic information system map rendering apparatus of any of claims 5 to 7, wherein the selection unit is to:
randomly selecting one tile from the at least two tiles at the boundary.
CN201510008904.3A 2015-01-08 2015-01-08 Map rendering method and device for geographic information system Active CN105824843B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510008904.3A CN105824843B (en) 2015-01-08 2015-01-08 Map rendering method and device for geographic information system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510008904.3A CN105824843B (en) 2015-01-08 2015-01-08 Map rendering method and device for geographic information system

Publications (2)

Publication Number Publication Date
CN105824843A CN105824843A (en) 2016-08-03
CN105824843B true CN105824843B (en) 2020-05-01

Family

ID=56514885

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510008904.3A Active CN105824843B (en) 2015-01-08 2015-01-08 Map rendering method and device for geographic information system

Country Status (1)

Country Link
CN (1) CN105824843B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107301194B (en) * 2016-10-09 2021-01-01 上海炬宏信息技术有限公司 Compressed storage and release method of tile type grid map
CN106844537B (en) * 2016-12-30 2020-11-17 重庆大学 Organization management method for space-time map tile data
CN111047676B (en) * 2018-10-12 2023-04-25 中国移动通信集团广西有限公司 Image rendering method, device and storage medium
CN111881230A (en) * 2020-06-17 2020-11-03 汉海信息技术(上海)有限公司 Rendering method and device for map area and electronic equipment
CN112380489B (en) * 2020-11-03 2024-04-16 武汉光庭信息技术股份有限公司 Data processing time calculation method, data processing platform evaluation method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101894167A (en) * 2010-07-26 2010-11-24 武汉大学 User event model-driven network map service method
CN102722549A (en) * 2012-05-28 2012-10-10 中国科学院遥感应用研究所 Cluster-based real-time rendering service of remote sensing data set
CN102819530A (en) * 2011-06-10 2012-12-12 中兴通讯股份有限公司 Method and device for displaying electronic map

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7599790B2 (en) * 2004-03-23 2009-10-06 Google Inc. Generating and serving tiles in a digital mapping system
KR102046910B1 (en) * 2013-03-08 2019-11-22 한국전자통신연구원 System and method for providing tile-map using electronic navigation chart

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101894167A (en) * 2010-07-26 2010-11-24 武汉大学 User event model-driven network map service method
CN102819530A (en) * 2011-06-10 2012-12-12 中兴通讯股份有限公司 Method and device for displaying electronic map
CN102722549A (en) * 2012-05-28 2012-10-10 中国科学院遥感应用研究所 Cluster-based real-time rendering service of remote sensing data set

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
利用用户事件模型的网络地图服务策略;亢孟军等;《武汉大学学报信息科学版》;20110430;第36卷(第5期);第560-563页 *

Also Published As

Publication number Publication date
CN105824843A (en) 2016-08-03

Similar Documents

Publication Publication Date Title
CN105824843B (en) Map rendering method and device for geographic information system
EP3336805A1 (en) Method and device for a placement of a virtual object of an augmented or mixed reality application in a real-world 3d environment
US9684947B2 (en) Indicating availability of indoor content on a digital map
CN109994038B (en) Method and device for determining interest points in irregular area and electronic equipment
US20150109290A1 (en) Device and method for removing noise points in point clouds
US9355484B2 (en) System and method of tile management
CN109741436B (en) Method and device for rendering vector data
CN110990516A (en) Map data processing method and device and server
JP2015531918A (en) Hit test method and apparatus
EP2595118A2 (en) Methods for providing 3d building information
US9653042B2 (en) Travel path analysis support device and method
CN109213949A (en) The method for drafting and device of thermodynamic chart
CN108038491B (en) Image classification method and device
CN116628123A (en) Dynamic slice generation method and system based on spatial database
CN107833227B (en) Drawing method and system for circular cutting area
CN107424583B (en) Display data processing method and system for special-shaped image
RU2009130339A (en) METHOD AND DEVICE FOR DATA PROCESSING
US9275481B2 (en) Viewport-based contrast adjustment for map features
US9361719B1 (en) Label placement on a digital map
CN112381715B (en) Method and device for parallel generation of map tiles by mass remote sensing images
CN106897333B (en) Data processing method and equipment thereof
RU2637903C2 (en) Method and computer device for creating simplified borders of graphic objects
CN110580731B (en) 3D character rendering method, medium, device and apparatus
CN114238528A (en) Map loading method and device, electronic equipment and storage medium
JP7086180B2 (en) Dynamic styling of digital maps

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant