CN103903508A - Tile map segmenting method and system - Google Patents

Tile map segmenting method and system Download PDF

Info

Publication number
CN103903508A
CN103903508A CN201210589555.5A CN201210589555A CN103903508A CN 103903508 A CN103903508 A CN 103903508A CN 201210589555 A CN201210589555 A CN 201210589555A CN 103903508 A CN103903508 A CN 103903508A
Authority
CN
China
Prior art keywords
tile
cut
area
compared
coordinate
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.)
Pending
Application number
CN201210589555.5A
Other languages
Chinese (zh)
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.)
SHANGHAI YOOTU INFORMATION TECHNOLOGY Co Ltd
Original Assignee
SHANGHAI YOOTU INFORMATION TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHANGHAI YOOTU INFORMATION TECHNOLOGY Co Ltd filed Critical SHANGHAI YOOTU INFORMATION TECHNOLOGY Co Ltd
Priority to CN201210589555.5A priority Critical patent/CN103903508A/en
Publication of CN103903508A publication Critical patent/CN103903508A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Processing Of Stones Or Stones Resemblance Materials (AREA)

Abstract

The embodiment of the invention provides a tile map segmenting method and system. The method and system aim to solve the problem that all tiles in a bounding rectangular area are segmented, and accordingly time and space are wasted. The method includes the steps of setting a segmentation area in advance; calculating a bounding rectangular area of the segmentation area, wherein the bounding rectangular area comprises one or more tiles to be segmented; judging whether the tiles to be segmented are in the segmentation area according to each tile to be segmented in the bounding rectangular area; when the tiles to be segmented are in the segmented area, segmenting the tiles. According to the method and system, not all the tiles in the bounding rectangular area are segmented, only the tiles in the segmentation area are cut, and accordingly waste of time and space caused by segmentation of the tiles outside the segmentation area is avoided.

Description

Method and system for cutting tile map
Technical Field
The embodiment of the invention relates to the technical field of tile maps, in particular to a method and a system for cutting a tile map.
Background
The tile map pyramid model is a multi-resolution hierarchical model, and the resolution is lower and lower from the bottom layer to the top layer of the tile pyramid, but the represented geographical range is unchanged. When the tile map is manufactured, map data is processed by map software (such as ArcGIS software) to prepare a required map layer scheme, the scheme is stored, and then the self-contained function of the software is used for cutting.
At present, when a tile map is cut, a cutting area is set first, then vector data of the area is separated from original data, a maximum outsourcing rectangular area of the area is calculated, and then tiles are cut.
However, in the above cutting process, when a cutting area is set, only a rectangular area or the entire map range is supported, and only one area is supported per cutting; in addition, all the tiles in the calculated outsourced rectangular area are cut whether or not they are within the cutting area, thus causing a waste of time and space.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide a method and a system for cutting a tile map, so as to solve the problem of time and space waste caused by cutting all tiles in an externally-wrapped rectangular area.
In order to solve the above problems, the present invention discloses a method for cutting a tile map, comprising:
presetting a cutting area;
calculating an outsourcing rectangular area of the cutting area, wherein the outsourcing rectangular area comprises one or more tiles to be cut;
judging whether the tiles to be cut are in the cutting area or not aiming at each tile to be cut in the outsourcing rectangular area;
cutting the tile to be cut when the tile is within the cutting area.
Optionally, the cutting area is a multi-tile area or a polygonal area.
Optionally, the multi-tile region includes one or more tiles to be compared,
when the cutting area is a multi-tile area, the judging whether the tile to be cut is in the cutting area includes:
acquiring the grade l, the horizontal coordinate x and the vertical coordinate y of the tile to be cut;
sequentially acquiring the grade L, the transverse coordinate X and the longitudinal coordinate Y of each tile to be compared in the multi-tile area;
aiming at the current tile to be compared, judging whether the current tile to be compared contains the tile to be cut or not according to the level L, the transverse coordinate X and the longitudinal coordinate Y of the tile to be cut, and the level L, the transverse coordinate X and the longitudinal coordinate Y of the current tile to be compared;
and when the current tile to be compared contains the tile to be cut, stopping judging the next tile to be compared, and determining that the tile to be cut is in the cutting area.
Optionally, the determining whether the tile to be currently compared contains the tile to be cut includes:
comparing the level L of the tile to be cut with the level L of the current tile to be compared;
when L is equal to L, respectively comparing the transverse coordinate X of the tile to be cut with the transverse coordinate X of the current tile to be compared, and comparing the longitudinal coordinate Y of the tile to be cut with the longitudinal coordinate Y of the current tile to be compared;
when X is X and Y is Y, determining that the current tile to be compared contains the tile to be cut;
when L is larger than L, shifting the horizontal coordinate X of the current tile to be compared to the right by L-L bit and recording as X ', shifting the vertical coordinate Y of the current tile to be compared to the right by L-L bit and recording as Y', and respectively comparing X 'with X, and Y' with Y;
when X 'is X and Y' is Y, determining that the current tile to be compared contains the tile to be cut;
when L is less than L, shifting the horizontal coordinate X of the tile to be cut to the right by L-L bit, recording as X ', shifting the longitudinal coordinate Y of the tile to be cut to the right by L-L bit, recording as Y', and comparing X with X ', and Y with Y';
when X 'is X and Y' is Y, determining that the current tile to be compared contains the tile to be cut.
Optionally, when the cutting area is a polygonal area, the determining whether the tile to be cut is in the cutting area includes:
transforming the coordinates of the tile to be cut into world coordinates matched with the polygonal area through pixel coordinates;
acquiring the coordinates of the polygonal area, and judging whether the tile to be cut is intersected with the polygonal area or not according to the coordinates of the polygonal area and the transformed coordinates of the tile to be cut;
when intersecting, determining that the tile to be cut is within the cutting area.
On the other hand, the invention also discloses a system for cutting the tile map, which is characterized by comprising the following steps:
the setting module is used for presetting a cutting area;
the calculation module is used for calculating an outsourcing rectangular area of the cutting area, and the outsourcing rectangular area comprises one or more tiles to be cut;
the judging module is used for judging whether the tiles to be cut are in the cutting area or not aiming at each tile to be cut in the outsourcing rectangular area;
and the cutting module is used for cutting the tiles to be cut when the tiles to be cut are in the cutting area.
Optionally, the cutting area is a multi-tile area or a polygonal area.
Optionally, the multi-tile area includes one or more tiles to be compared, and the determining module includes:
the obtaining submodule is used for obtaining the grade L, the transverse coordinate X and the longitudinal coordinate Y of the tile to be cut when the cutting area is a multi-tile area, and obtaining the grade L, the transverse coordinate X and the longitudinal coordinate Y of each tile to be compared in the multi-tile area in sequence;
the first judgment submodule is used for judging whether the tile to be currently compared contains the tile to be cut or not according to the level L, the transverse coordinate X and the longitudinal coordinate Y of the tile to be currently compared, and the level L, the transverse coordinate X and the longitudinal coordinate Y of the tile to be currently compared;
and the first determining submodule is used for stopping judging the next tile to be compared when the current tile to be compared contains the tile to be cut, and determining that the tile to be cut is in the cutting area.
Optionally, the first determining sub-module includes:
the level comparison subunit is used for comparing the level L of the tile to be cut with the level L of the current tile to be compared;
the first coordinate comparison subunit is used for respectively comparing the transverse coordinate X of the tile to be cut with the transverse coordinate X of the current tile to be compared, and comparing the longitudinal coordinate Y of the tile to be cut with the longitudinal coordinate Y of the current tile to be compared when L is equal to L; when X is X and Y is Y, determining that the current tile to be compared contains the tile to be cut;
the second coordinate comparison subunit is used for shifting the horizontal coordinate X of the current tile to be compared to the right by L-L bit to be marked as X ', shifting the vertical coordinate Y of the current tile to be compared to the right by L-L bit to be marked as Y' when L is larger than L, and respectively comparing X 'with X, and Y' with Y; when X 'is X and Y' is Y, determining that the current tile to be compared contains the tile to be cut;
the third coordinate comparison subunit is used for shifting the horizontal coordinate X of the tile to be cut to the right by L-L bit as X 'when L is less than L, shifting the longitudinal coordinate Y of the tile to be cut to the right by L-L bit as Y', and comparing X and X 'and Y and Y' respectively; when X 'is X and Y' is Y, determining that the current tile to be compared contains the tile to be cut.
Optionally, the determining module includes:
the transformation submodule is used for transforming the coordinates of the tile to be cut into world coordinates matched with the polygonal area from pixel coordinates when the cutting area is the polygonal area;
the second judgment submodule is used for acquiring the coordinates of the polygonal area and judging whether the tiles to be cut are intersected with the polygonal area or not according to the coordinates of the polygonal area and the transformed coordinates of the tiles to be cut;
and the second determining submodule is used for determining that the tile to be cut is in the cutting area when the tile to be cut is intersected with the polygonal area.
Compared with the prior art, the embodiment of the invention has the following advantages:
firstly, the embodiment of the invention can preset a cutting area, calculate an outsourcing rectangular area of the cutting area, wherein the outsourcing rectangular area comprises one or more tiles to be cut, judge whether the tiles to be cut are in the cutting area or not aiming at each tile to be cut in the outsourcing rectangular area, and cut the tiles when the tiles to be cut are in the cutting area. In the embodiment of the invention, all the tiles in the outer rectangular area are not cut, but only the tiles in the cutting area are cut, so that the waste of time and space caused by cutting the tiles which are not in the cutting area is avoided.
Secondly, the cutting area provided in the embodiment of the present invention is not limited to a rectangle or one area, and may be a multi-tile area or a polygonal area, so that the cutting process is more flexible.
Drawings
FIG. 1 is a flowchart of a method for cutting a tile map according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of an outer rectangular region of a multi-tile region according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an outer rectangular region of a polygonal region according to an embodiment of the present invention;
FIG. 4 is a flowchart of a specific method for cutting a tile map according to a first embodiment of the present invention;
FIG. 5 is a schematic diagram of a tile to be cut intersecting a polygonal area according to a first embodiment of the present invention;
FIG. 6 is a schematic cutting diagram illustrating a cutting area being a polygonal area according to a first embodiment of the present invention;
FIG. 7 is a block diagram of a system for cutting a tile map according to a second embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The first embodiment is as follows:
at present, when a tile map is cut, a cutting area is set first, then vector data of the area is separated from original data, a maximum outsourcing rectangular area of the area is calculated, and then tiles are cut.
However, in the above cutting process, when a cutting area is set, only a rectangular area or the entire map range is supported, and only one area is supported per cutting; in addition, all the tiles in the calculated outsourced rectangular area are cut whether or not they are within the cutting area, thus causing a waste of time and space.
In view of the above problem, an embodiment of the present invention provides a method for cutting a tile map, where the method only cuts tiles that satisfy a condition in an externally-wrapped rectangular area, and the cut area is not limited to the rectangular area or one area.
Referring to fig. 1, a flowchart of a method for cutting a tile map according to a first embodiment of the present invention is shown, where the method may include:
step 100, presetting a cutting area.
In an embodiment of the present invention, the cutting area is not limited to a rectangular area or an area, and the cutting area may be a multi-tile area or a polygonal area, where the multi-tile area may include one or more tiles to be compared.
Of course, the cutting area may also be in other forms, and the embodiment of the present invention is not limited thereto.
102, calculating an outsourcing rectangular area of the cutting area, wherein the outsourcing rectangular area comprises one or more tiles to be cut.
After the cutting area is set in step 100, an outsourcing rectangular area of the cutting area may be calculated, and the outsourcing rectangular area may be a minimum rectangle capable of enclosing the cutting area.
In the embodiment of the present invention, when calculating the rectangular region surrounding the cutting region, the minimum abscissa in the cutting region may be recorded as XminAnd the maximum abscissa is denoted as XmaxAnd the minimum ordinate is denoted as YminThe maximum ordinate is denoted as YmaxThe coordinate of the upper left corner of the bounding rectangle is (X)min,Ymin) The coordinate of the lower right corner is (X)max,Ymax) Thereby, the outsourcing rectangular area can be generated. In the tile map, the ordinate is gradually increased from top to bottom, that is, the minimum ordinate is above and the maximum ordinate is below.
As shown in fig. 2, is a schematic diagram of an outsourcing rectangular area of a multi-tile area. In fig. 2, the multi-tile area is an area composed of tile 1, tile 2, and tile 3, and the rectangle M is an outer-surrounding rectangular area of the multi-tile area.
For example, the coordinate of point m1 at the top left corner of tile 1 is (x1, y1), and the coordinate of point m2 at the bottom right corner of tile 3 is (x2, y 2). As can be seen from FIG. 2, the smallest abscissa X in the multi-tile regionminX1, maximum abscissa XmaxX2, minimum ordinate YminY1, maximum ordinate YmaxTherefore, the coordinates of the upper left corner of the envelope rectangle are (x1, y1) and the coordinates of the lower right corner are (x2, y2), and the envelope rectangle area M can be generated by these two coordinates (x1, y1) and (x2, y 2).
As shown in fig. 3, a schematic diagram of an outer rectangular region of the polygonal region is shown. In fig. 2, a pentagon P is the polygonal region, and a rectangle N is an outer rectangular region of the polygonal region.
For example, the coordinates of points n1, n2, n3, n4, and n5 in the polygonal region are n1(x1, y1), n2(x2, y2), n3(x3, y3), n4(x4, y4), and n5(x5, y5), respectively. As can be seen from FIG. 3, the smallest abscissa X in the polygonal areaminX5, maximum abscissa XmaxX2, minimum ordinate YminY1, maximum ordinate YmaxY3 or YmaxSince y4 (y 3 is y4), the coordinates of the upper left corner of the envelope rectangle are (x5, y1), and the coordinates of the lower right corner are (x2, y3), and the envelope rectangle area N can be generated by these two coordinates (x5, y1) and (x2, y 3).
For the above specific process of calculating the outsourced rectangular region, a person skilled in the art may perform corresponding processing according to actual situations, and the embodiment of the present invention is not discussed in detail here.
And 104, judging whether the tiles to be cut are in the cutting area or not aiming at each tile to be cut in the outsourcing rectangular area.
In the embodiment of the invention, the outsourcing rectangular area can comprise one or more tiles to be cut, but the embodiment of the invention does not cut all the tiles in the outsourcing rectangular area, and only the tiles meeting the conditions can be cut.
Therefore, according to the embodiment of the invention, for each tile to be cut in the outsourcing rectangular area, whether the tile to be cut is in the cutting area can be judged firstly, if the tile to be cut is in the cutting area, the tile is cut, and if the tile is not in the cutting area, the tile is not cut, so that the cutting time and the cutting space can be greatly saved.
And 106, cutting the tile to be cut when the tile is in the cutting area.
If the tile to be cut is determined to be in the cutting area in step 104, the tile may be cut, and for a specific cutting process, a person skilled in the art may perform related processing according to actual experience, which is not discussed in detail herein.
The method for cutting a tile map according to the embodiment of the present invention is described in detail below.
In the embodiment of the present invention, the cutting region is a multi-tile region or a polygonal region.
Fig. 4 is a flowchart illustrating a specific tile map cutting method according to a first embodiment of the present invention.
First, it should be noted that fig. 4 only includes the processing procedure after calculating the rectangular region for outsourcing of the cutting region, and for the specific processes of setting the cutting region and calculating the rectangular region for outsourcing of the cutting region, reference is made to the above description, and the embodiment of the present invention is not discussed in detail here.
The method may include:
and 400, selecting the next tile to be cut in the outsourcing rectangular area.
In the embodiment of the invention, one tile to be cut can be selected from the outsourcing rectangular area for processing each time until all the tiles to be cut are processed.
Step 402, judging whether the tile to be cut is in a multi-tile area.
In the embodiment of the present invention, if the tile to be cut is in the multi-tile area, it can be said that the tile to be cut is in the cutting area, and therefore the tile can be cut, that is, step 408 is executed; if the tile to be cut is not in the multi-tile region, step 404 may be performed.
Specifically, whether the tile to be cut is in a multi-tile area (i.e., whether the tile to be cut is in the cutting area) may be determined by:
a1, acquiring the level l, the horizontal coordinate x and the vertical coordinate y of the tile to be cut.
a2, sequentially acquiring the level L, the horizontal coordinate X and the vertical coordinate Y of each tile to be compared in the multi-tile area.
In the embodiment of the invention, L, X, Y, L, X and Y are positive integer data.
a3, aiming at the current tile to be compared, judging whether the current tile to be compared contains the tile to be cut according to the level L, the horizontal coordinate X and the vertical coordinate Y of the tile to be cut, and the level L, the horizontal coordinate X and the vertical coordinate Y of the current tile to be compared.
The step a3 may include:
a31, comparing the level L of the tile to be cut with the level L of the current tile to be compared.
a32, when L ═ L, respectively comparing the horizontal coordinate X of the tile to be cut with the horizontal coordinate X of the tile to be compared currently, and the vertical coordinate Y of the tile to be cut with the vertical coordinate Y of the tile to be compared currently.
When X is X and Y is Y, it may be determined that the tile to be currently compared includes the tile to be cut, and perform step a 4; otherwise, step a2 is executed for the next tile to be compared.
a33, when L > L, shifting the horizontal coordinate X of the tile to be compared to the right by L-L bit, and recording as X ', shifting the vertical coordinate Y of the tile to be compared to the right by L-L bit, and recording as Y', and comparing X 'and X, and Y' and Y respectively.
When X 'and Y' are equal to X and Y, it may be determined that the tile to be currently compared includes the tile to be cut, and perform step a 4; otherwise, step a2 is executed for the next tile to be compared.
a34, when L is less than L, shifting the horizontal coordinate X of the tile to be cut to the right by L-L position as X ', shifting the vertical coordinate Y of the tile to be cut to the right by L-L position as Y', and comparing X and X ', and Y and Y' respectively.
When X 'is X and Y' is Y, it may be determined that the tile to be currently compared includes the tile to be cut, and perform step a 4; otherwise, step a2 is executed for the next tile to be compared.
a4, when the current tile to be compared contains the tile to be cut, stopping judging the next tile to be compared, and determining that the tile to be cut is in the cutting area.
Step 404, tile coordinate transformation.
In the embodiment of the present invention, if it is determined in step 402 that the tile to be cut is not in the multi-tile area, it may be further determined whether the tile to be cut intersects with the polygon area.
Therefore, tile coordinate transformation can be performed first, that is, the coordinates of the tile to be cut can be transformed from pixel coordinates to world coordinates matching the polygonal area.
For a specific coordinate transformation process, a person skilled in the art may perform corresponding processing according to actual situations, and the embodiment of the present invention is not discussed in detail herein.
And 406, judging whether the tile to be cut is intersected with the polygonal area.
If the to-be-cut tile is judged to be intersected with the polygonal area, the to-be-cut tile can be determined to be in the cutting area, so that the to-be-cut tile can be cut, namely step 408 is executed; if the to-be-cut tile is not intersected with the polygonal area, it may be determined that the to-be-cut tile is not within the cutting area, and thus the to-be-cut tile may not be cut, and step 410 is performed.
In the embodiment of the invention, after the coordinates of the tile to be cut are transformed into the world coordinates matched with the polygonal area by the pixel coordinates, the coordinates of the polygonal area can be obtained, and whether the tile to be cut is intersected with the polygonal area is judged according to the coordinates of the polygonal area and the transformed coordinates of the tile to be cut.
As shown in fig. 5, which is a schematic diagram of intersection of tiles to be cut and a polygonal area, tile a, tile B, and tile C in the diagram are 3 tiles to be cut in an outer rectangular area (the outer rectangular area of the polygonal area is not marked in the diagram), and it can be seen from the diagram that all the 3 tiles to be cut intersect with the polygonal area K, so that all the 3 tiles to be cut are cut in the embodiment of the present invention.
It should be noted that, in the embodiment of the present invention, the step 404 and the step 406 may be a process of judging whether the tile to be cut is in the cutting area when the cutting area is a polygonal area.
And step 408, cutting the tile to be cut.
Embodiments of the present invention will not be discussed in detail herein with respect to a particular cutting process.
Step 410, determine whether the cutting is finished.
In the embodiment of the invention, the step is to judge whether the tile to be cut which is not processed still exists, if so, the cutting is not finished, and the step 400 can be returned to select the next tile; if all tiles to be cut in the outsourced rectangular area have been processed, the cutting can be ended.
Finally, it should be noted that, in the embodiment of the present invention, if part of a tile is included in the outer rectangular area, the tile is considered as a tile to be cut.
The method for cutting a tile map according to an embodiment of the present invention is described below by way of a specific example.
Referring to fig. 6, a schematic cutting diagram is shown when the cutting area is a polygonal area, in fig. 6, the outline of beijing is the polygonal area, and an outsourcing rectangular area of the polygonal area is marked in the drawing.
In level 7 of the tile map, both tiles (105, 47) and (105, 48) are tiles in the bounding rectangle, and it can be seen from the figure that both tiles intersect the polygonal area, and therefore both tiles are cut; in level 12 of the tile map, tile (3376, 1534) and tile (3376, 1535) are in the bounding rectangle, but do not intersect the polygonal area, and therefore are not cut.
In the embodiment of the invention, all the tiles in the outer rectangular area are not cut, but only the tiles in the cutting area are cut, so that the waste of time and space caused by cutting the tiles which are not in the cutting area is avoided. In addition, the cutting area provided in the embodiment of the present invention is not limited to a rectangle or one area, and may be a multi-tile area or a polygonal area, so that the cutting process is more flexible.
Example two:
referring to fig. 7, a block diagram of a system for cutting a tile map according to a second embodiment of the present invention is shown, where the system may include: a setup module 700, a calculation module 702, a determination module 704, and a cutting module 706.
Wherein,
a setting module 700 for presetting a cutting area;
wherein the cutting area may be a multi-tile area or a polygonal area, and the multi-tile area may include one or more tiles to be compared.
Of course, the cutting area may be other types of areas, and the embodiment of the present invention is not limited thereto.
A calculating module 702, configured to calculate an outsourced rectangular area of the cutting area, where the outsourced rectangular area includes one or more tiles to be cut;
a judging module 704, configured to judge, for each tile to be cut in the outsourced rectangular area, whether the tile to be cut is in the cutting area;
the determining module 704 may include:
the obtaining submodule is used for obtaining the grade L, the transverse coordinate X and the longitudinal coordinate Y of the tile to be cut when the cutting area is a multi-tile area, and obtaining the grade L, the transverse coordinate X and the longitudinal coordinate Y of each tile to be compared in the multi-tile area in sequence;
the first judgment submodule is used for judging whether the tile to be currently compared contains the tile to be cut or not according to the level L, the transverse coordinate X and the longitudinal coordinate Y of the tile to be currently compared, and the level L, the transverse coordinate X and the longitudinal coordinate Y of the tile to be currently compared;
the first judgment sub-module may include:
the level comparison subunit is used for comparing the level L of the tile to be cut with the level L of the current tile to be compared;
the first coordinate comparison subunit is used for respectively comparing the transverse coordinate X of the tile to be cut with the transverse coordinate X of the current tile to be compared, and comparing the longitudinal coordinate Y of the tile to be cut with the longitudinal coordinate Y of the current tile to be compared when L is equal to L; when X is X and Y is Y, determining that the current tile to be compared contains the tile to be cut;
the second coordinate comparison subunit is used for shifting the horizontal coordinate X of the current tile to be compared to the right by L-L bit to be marked as X ', shifting the vertical coordinate Y of the current tile to be compared to the right by L-L bit to be marked as Y' when L is larger than L, and respectively comparing X 'with X, and Y' with Y; when X 'is X and Y' is Y, determining that the current tile to be compared contains the tile to be cut;
the third coordinate comparison subunit is used for shifting the horizontal coordinate X of the tile to be cut to the right by L-L bit as X 'when L is less than L, shifting the longitudinal coordinate Y of the tile to be cut to the right by L-L bit as Y', and comparing X and X 'and Y and Y' respectively; when X 'is X and Y' is Y, determining that the current tile to be compared contains the tile to be cut.
The first determining submodule is used for stopping judging the next tile to be compared when the current tile to be compared contains the tile to be cut, and determining that the tile to be cut is in the cutting area;
the transformation submodule is used for transforming the coordinates of the tile to be cut into world coordinates matched with the polygonal area from pixel coordinates when the cutting area is the polygonal area;
the second judgment submodule is used for acquiring the coordinates of the polygonal area and judging whether the tiles to be cut are intersected with the polygonal area or not according to the coordinates of the polygonal area and the transformed coordinates of the tiles to be cut;
and the second determining submodule is used for determining that the tile to be cut is in the cutting area when the tile to be cut is intersected with the polygonal area.
A cutting module 706 for cutting the tile to be cut when the tile is within the cutting area.
According to the embodiment of the invention, a cutting area can be preset, an outsourcing rectangular area of the cutting area is calculated, the outsourcing rectangular area comprises one or more tiles to be cut, whether the tiles to be cut are in the cutting area or not is judged according to each tile to be cut in the outsourcing rectangular area, and when the tiles to be cut are in the cutting area, the tiles are cut. In the embodiment of the invention, all the tiles in the outer rectangular area are not cut, but only the tiles in the cutting area are cut, so that the waste of time and space caused by cutting the tiles which are not in the cutting area is avoided.
Secondly, the cutting area provided in the embodiment of the present invention is not limited to a rectangle or one area, and may be a multi-tile area or a polygonal area, so that the cutting process is more flexible.
For the system embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
While, for purposes of simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present invention is not limited by the illustrated ordering of acts, as some steps may occur in other orders or concurrently with other steps in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. The use of the phrase "including a" does not exclude the presence of other, identical elements in the process, method, article, or apparatus that comprises the same element, whether or not the same element is present in all of the same element.
The method and system for cutting a tile map provided by the invention are described in detail, and the principle and the implementation mode of the invention are explained by applying specific examples, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method of cutting a tile map, comprising:
presetting a cutting area;
calculating an outsourcing rectangular area of the cutting area, wherein the outsourcing rectangular area comprises one or more tiles to be cut;
judging whether the tiles to be cut are in the cutting area or not aiming at each tile to be cut in the outsourcing rectangular area;
cutting the tile to be cut when the tile is within the cutting area.
2. The method of claim 1, wherein the cutting area is a multi-tile area or a polygonal area.
3. The method of claim 2, wherein the multi-tile region includes one or more tiles to be compared,
when the cutting area is a multi-tile area, the judging whether the tile to be cut is in the cutting area includes:
acquiring the grade l, the horizontal coordinate x and the vertical coordinate y of the tile to be cut;
sequentially acquiring the grade L, the transverse coordinate X and the longitudinal coordinate Y of each tile to be compared in the multi-tile area;
aiming at the current tile to be compared, judging whether the current tile to be compared contains the tile to be cut or not according to the level L, the transverse coordinate X and the longitudinal coordinate Y of the tile to be cut, and the level L, the transverse coordinate X and the longitudinal coordinate Y of the current tile to be compared;
and when the current tile to be compared contains the tile to be cut, stopping judging the next tile to be compared, and determining that the tile to be cut is in the cutting area.
4. The method according to claim 3, wherein said determining whether the tile currently to be compared contains the tile to be cut comprises:
comparing the level L of the tile to be cut with the level L of the current tile to be compared;
when L is equal to L, respectively comparing the transverse coordinate X of the tile to be cut with the transverse coordinate X of the current tile to be compared, and comparing the longitudinal coordinate Y of the tile to be cut with the longitudinal coordinate Y of the current tile to be compared;
when X is X and Y is Y, determining that the current tile to be compared contains the tile to be cut;
when L is larger than L, shifting the horizontal coordinate X of the current tile to be compared to the right by L-L bit and recording as X ', shifting the vertical coordinate Y of the current tile to be compared to the right by L-L bit and recording as Y', and respectively comparing X 'with X, and Y' with Y;
when X 'is X and Y' is Y, determining that the current tile to be compared contains the tile to be cut;
when L is less than L, shifting the horizontal coordinate X of the tile to be cut to the right by L-L bit, recording as X ', shifting the longitudinal coordinate Y of the tile to be cut to the right by L-L bit, recording as Y', and comparing X with X ', and Y with Y';
when X 'is X and Y' is Y, determining that the current tile to be compared contains the tile to be cut.
5. The method of claim 2, wherein when the cutting area is a polygonal area, said determining whether the tile to be cut is within the cutting area comprises:
transforming the coordinates of the tile to be cut into world coordinates matched with the polygonal area through pixel coordinates;
acquiring the coordinates of the polygonal area, and judging whether the tile to be cut is intersected with the polygonal area or not according to the coordinates of the polygonal area and the transformed coordinates of the tile to be cut;
when intersecting, determining that the tile to be cut is within the cutting area.
6. A system for cutting a tile map, comprising:
the setting module is used for presetting a cutting area;
the calculation module is used for calculating an outsourcing rectangular area of the cutting area, and the outsourcing rectangular area comprises one or more tiles to be cut;
the judging module is used for judging whether the tiles to be cut are in the cutting area or not aiming at each tile to be cut in the outsourcing rectangular area;
and the cutting module is used for cutting the tiles to be cut when the tiles to be cut are in the cutting area.
7. The system of claim 6, wherein the cutting region is a multi-tile region or a polygonal region.
8. The system of claim 7, wherein the multi-tile region includes one or more tiles to be compared, and wherein the determining module comprises:
the obtaining submodule is used for obtaining the grade L, the transverse coordinate X and the longitudinal coordinate Y of the tile to be cut when the cutting area is a multi-tile area, and obtaining the grade L, the transverse coordinate X and the longitudinal coordinate Y of each tile to be compared in the multi-tile area in sequence;
the first judgment submodule is used for judging whether the tile to be currently compared contains the tile to be cut or not according to the level L, the transverse coordinate X and the longitudinal coordinate Y of the tile to be currently compared, and the level L, the transverse coordinate X and the longitudinal coordinate Y of the tile to be currently compared;
and the first determining submodule is used for stopping judging the next tile to be compared when the current tile to be compared contains the tile to be cut, and determining that the tile to be cut is in the cutting area.
9. The system of claim 8, wherein the first determining submodule comprises:
the level comparison subunit is used for comparing the level L of the tile to be cut with the level L of the current tile to be compared;
the first coordinate comparison subunit is used for respectively comparing the transverse coordinate X of the tile to be cut with the transverse coordinate X of the current tile to be compared, and comparing the longitudinal coordinate Y of the tile to be cut with the longitudinal coordinate Y of the current tile to be compared when L is equal to L; when X is X and Y is Y, determining that the current tile to be compared contains the tile to be cut;
the second coordinate comparison subunit is used for shifting the horizontal coordinate X of the current tile to be compared to the right by L-L bit to be marked as X ', shifting the vertical coordinate Y of the current tile to be compared to the right by L-L bit to be marked as Y' when L is larger than L, and respectively comparing X 'with X, and Y' with Y; when X 'is X and Y' is Y, determining that the current tile to be compared contains the tile to be cut;
the third coordinate comparison subunit is used for shifting the horizontal coordinate X of the tile to be cut to the right by L-L bit as X 'when L is less than L, shifting the longitudinal coordinate Y of the tile to be cut to the right by L-L bit as Y', and comparing X and X 'and Y and Y' respectively; when X 'is X and Y' is Y, determining that the current tile to be compared contains the tile to be cut.
10. The system of claim 7, wherein the determining module comprises:
the transformation submodule is used for transforming the coordinates of the tile to be cut into world coordinates matched with the polygonal area from pixel coordinates when the cutting area is the polygonal area;
the second judgment submodule is used for acquiring the coordinates of the polygonal area and judging whether the tiles to be cut are intersected with the polygonal area or not according to the coordinates of the polygonal area and the transformed coordinates of the tiles to be cut;
and the second determining submodule is used for determining that the tile to be cut is in the cutting area when the tile to be cut is intersected with the polygonal area.
CN201210589555.5A 2012-12-28 2012-12-28 Tile map segmenting method and system Pending CN103903508A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210589555.5A CN103903508A (en) 2012-12-28 2012-12-28 Tile map segmenting method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210589555.5A CN103903508A (en) 2012-12-28 2012-12-28 Tile map segmenting method and system

Publications (1)

Publication Number Publication Date
CN103903508A true CN103903508A (en) 2014-07-02

Family

ID=50994809

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210589555.5A Pending CN103903508A (en) 2012-12-28 2012-12-28 Tile map segmenting method and system

Country Status (1)

Country Link
CN (1) CN103903508A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105550301A (en) * 2015-12-14 2016-05-04 河海大学 High-definition picture cutting and displaying method
CN112102427A (en) * 2020-11-06 2020-12-18 北京完美知识科技有限公司 Editing method and device of history map, storage medium and computer equipment
CN113026457A (en) * 2021-03-23 2021-06-25 广联达科技股份有限公司 Road construction segment determining method and determining device
CN113282647A (en) * 2021-07-22 2021-08-20 武大吉奥信息技术有限公司 Area control processing method based on tile map data

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08328462A (en) * 1995-06-01 1996-12-13 Matsushita Electric Ind Co Ltd Map displaying device
JPH09212085A (en) * 1996-01-31 1997-08-15 Mitsubishi Electric Corp Map book joining and displaying method
US5984362A (en) * 1998-03-13 1999-11-16 Christman; Edwin Roy Two-book map volume
CN101388043A (en) * 2008-09-26 2009-03-18 北京航空航天大学 OGC high performance remote sensing image map service method based on small picture
JP2009276707A (en) * 2008-05-19 2009-11-26 Kddi Corp Method of distributing unequal division map image, map server, terminal, and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08328462A (en) * 1995-06-01 1996-12-13 Matsushita Electric Ind Co Ltd Map displaying device
JPH09212085A (en) * 1996-01-31 1997-08-15 Mitsubishi Electric Corp Map book joining and displaying method
US5984362A (en) * 1998-03-13 1999-11-16 Christman; Edwin Roy Two-book map volume
JP2009276707A (en) * 2008-05-19 2009-11-26 Kddi Corp Method of distributing unequal division map image, map server, terminal, and program
CN101388043A (en) * 2008-09-26 2009-03-18 北京航空航天大学 OGC high performance remote sensing image map service method based on small picture

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105550301A (en) * 2015-12-14 2016-05-04 河海大学 High-definition picture cutting and displaying method
CN105550301B (en) * 2015-12-14 2019-10-01 河海大学 A kind of cutting of high definition picture and methods of exhibiting
CN112102427A (en) * 2020-11-06 2020-12-18 北京完美知识科技有限公司 Editing method and device of history map, storage medium and computer equipment
CN113026457A (en) * 2021-03-23 2021-06-25 广联达科技股份有限公司 Road construction segment determining method and determining device
CN113282647A (en) * 2021-07-22 2021-08-20 武大吉奥信息技术有限公司 Area control processing method based on tile map data

Similar Documents

Publication Publication Date Title
US9298990B2 (en) Object tracking method and device
CN107480274B (en) Method and device for processing regional boundary information
CN104428792A (en) Parameter selection and coarse localization of regions of interest for MSER processing
CN103903508A (en) Tile map segmenting method and system
CN102542901A (en) Line segment vacuating device for electronic map and method thereof
TW200926060A (en) Geospatial modeling system providing user-selectable building shape options and related methods
JP2016502717A5 (en)
CN107478201B (en) Road digital acquisition method and device based on digital orthographic images
CN111260675B (en) High-precision extraction method and system for image real boundary
CN110335354B (en) Modularized 3D modeling method and device
CN103886561A (en) Criminisi image inpainting method based on mathematical morphology
CN102213767A (en) Positioning control method for closed region of vehicle-mounted GPS (Global Positioning System)
US20170193682A1 (en) Method and apparatus for generating a composite image based on an ambient occlusion
CN105589869A (en) Note generation method and device of geographic information system
CN105824843B (en) Map rendering method and device for geographic information system
CN107154070A (en) Vector element and digital terrain model stacking method and device
CN110619018A (en) Map overlay rarefying method, device, equipment and computer storage medium
CN103236042A (en) Self-adaptive picture processing method and device
WO2007043246A1 (en) Ground image display system
JP5815456B2 (en) Drawing speed-up method and apparatus
CN101634557A (en) Method for preventing picture display characters from being mutually overlapped in navigation system
CN103678470B (en) A kind of method and system for showing selection area economic data
CN103366635B (en) Method for dynamically marking mobile object in electronic map
CN101794534B (en) Automatic typesetting and positioning method of statistical graphs in zonal statistical map
CN111552750B (en) Dynamic tracking display method, terminal and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140702