CN113838165A - Automatic pattern spot numbering method and device, electronic equipment and storage medium - Google Patents

Automatic pattern spot numbering method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113838165A
CN113838165A CN202111068748.1A CN202111068748A CN113838165A CN 113838165 A CN113838165 A CN 113838165A CN 202111068748 A CN202111068748 A CN 202111068748A CN 113838165 A CN113838165 A CN 113838165A
Authority
CN
China
Prior art keywords
spots
pattern
numbering
sub
spot
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111068748.1A
Other languages
Chinese (zh)
Other versions
CN113838165B (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.)
Zhejiang Institute of Hydraulics and Estuary
Original Assignee
Zhejiang Institute of Hydraulics and Estuary
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 Zhejiang Institute of Hydraulics and Estuary filed Critical Zhejiang Institute of Hydraulics and Estuary
Priority to CN202111068748.1A priority Critical patent/CN113838165B/en
Publication of CN113838165A publication Critical patent/CN113838165A/en
Application granted granted Critical
Publication of CN113838165B publication Critical patent/CN113838165B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a device for automatically numbering a pattern spot, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a plurality of pattern spots to be numbered; according to the attributes of the pattern spots, grouping the pattern spots to be numbered for the first time to obtain a plurality of areas; calculating the maximum number of the image spots in the region; according to the preset graph, carrying out secondary grouping on the pattern spots in the region to obtain a plurality of sub-regions; setting numbering directions for the pattern spots in the sub-regions according to a preset pattern; and sequentially numbering the pattern spots in the sub-regions according to the maximum number and the number direction.

Description

Automatic pattern spot numbering method and device, electronic equipment and storage medium
Technical Field
The application relates to the field of geographic information science and technology, in particular to a method and a device for automatically numbering a pattern spot, electronic equipment and a storage medium.
Background
The real and accurate land utilization survey data is an important basis for national economic construction and social development, is a main basis for developing and implementing the homeland resource management work, and the third national land utilization survey is developed in 2017 in China. The real estate property survey refers to the condition of real estate units composed of land parcel and sea parcel and stationary objects such as houses and woods of the land parcel and the sea parcel, and comprises land parcel information, sea parcel information, house (building and structure) information, forest and tree information and the like. The spot numbering is a basic work of the research result in the process of establishing the database, is used for ensuring the uniqueness of the spot unit, and is generally numbered from left to right and from top to bottom.
The current common method for numbering the image spots comprises the steps of firstly extracting geometric shape centroid points of the image spots, then carrying out descending order arrangement according to Y coordinates of the centroid points, then carrying out ascending order arrangement according to X coordinates of the centroid points, and finally carrying out sequential numbering on the image spots with the sequence numbers.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art: for irregularly distributed patches, especially for discrete patches of islands and enclaves, there are a large number of skip-number cases (e.g., number 5, 9 at one place, number 6, 7 somewhere else, and number 8 at another place).
Disclosure of Invention
The embodiment of the application aims to provide an automatic pattern spot numbering method and device, electronic equipment and a storage medium, so as to solve the technical problem that irregular and discrete pattern spots are easy to skip numbers in the related technology.
According to a first aspect of the embodiments of the present application, there is provided a method for automatically numbering patches, including:
acquiring a plurality of pattern spots to be numbered;
according to the attributes of the pattern spots, grouping the pattern spots to be numbered for the first time to obtain a plurality of areas;
calculating the maximum number of the image spots in the region;
according to the preset graph, carrying out secondary grouping on the pattern spots in the region to obtain a plurality of sub-regions;
setting numbering directions for the pattern spots in the sub-regions according to a preset pattern;
and sequentially numbering the pattern spots in the sub-regions according to the maximum number and the number direction.
Further, the method further comprises:
checking whether unnumbered pattern spots exist;
and if the unnumbered pattern spots exist, numbering the unnumbered pattern spots.
Further, calculating a maximum number of patches within the region includes:
checking whether numbered pattern spots exist;
if all the pattern spots are unnumbered, the maximum number is 1;
if there is a spot already numbered, the maximum value among the already numbered spots is set as the maximum number.
Further, according to a predetermined pattern, grouping the patches in the region for the second time to obtain a plurality of sub-regions, including:
if the preset graph is a multi-segment line, setting a set of the geometric graph of the graph spots and the graph spots intersected with the multi-segment line as a sub-region;
and if the predetermined pattern is a rectangle, setting the set of the pattern spots of which the geometric patterns of the pattern spots intersect with the rectangle as a sub-region.
Further, according to a predetermined pattern, setting a numbering direction for the pattern spots in the sub-region, including:
if the preset graph is a multi-segment line, the numbering direction is the advancing direction along the multi-segment line;
if the predetermined pattern is a rectangle, calculating the ratio of the length to the width of the rectangle, and if the ratio is less than
Figure BDA0003259634890000021
When the number direction is from top to bottom, when the ratio is more than or equal to
Figure BDA0003259634890000022
In time, the numbering direction is from left to right.
Further, sequentially numbering the patches in the sub-regions according to the maximum number and the number direction, including:
if the preset graph is a multi-segment line, the numbering direction is the advancing direction along the multi-segment line, the intersection point of the multi-segment line and the boundary of the pattern spots in the sub-area is calculated, the pattern spots in the sub-area are sequenced according to the distance between the intersection point and the starting point of the multi-segment line, and the sequence number of each pattern spot is recorded;
if the preset graph is a rectangle, the numbering direction is from top to bottom or from left to right, and when the numbering direction is from top to bottom, the spots in the sub-area are sequenced according to the coordinates of the centroid points Y of the geometric graphs of the spots, and the sequence number of each spot is recorded; when the numbering direction is from left to right, sequencing the image spots in the sub-area according to the X coordinates of the geometric figure centroid points of the image spots and recording the sequence number of each image spot;
and numbering the sequenced patches, wherein the number of each patch is the sequence number of the patch plus the maximum number.
According to a second aspect of the embodiments of the present application, there is provided a spot automatic numbering device, including:
the acquisition module acquires a plurality of pattern spots to be numbered;
the first grouping module is used for carrying out first grouping on the plurality of the pattern spots to be numbered according to the attributes of the pattern spots to obtain a plurality of areas;
the calculation module is used for calculating the maximum number of the pattern spots in the area;
the second grouping module is used for carrying out second grouping on the pattern spots in the region according to the preset pattern to obtain a plurality of sub-regions;
the setting module is used for setting the numbering direction of the pattern spots in the sub-regions according to a preset pattern;
and the numbering module is used for numbering the pattern spots in the sub-regions in sequence according to the maximum number and the numbering direction.
According to a third aspect of embodiments of the present application, there is provided an electronic apparatus, including:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a method as described in the first aspect.
According to a third aspect of embodiments herein, there is provided a computer-readable storage medium having stored thereon computer instructions, characterized in that the instructions, when executed by a processor, implement the steps of the method according to the first aspect.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
according to the embodiment, the plurality of the patches to be numbered are grouped for the first time according to the attributes of the patches to obtain the plurality of the areas, the predetermined graphs are used for grouping the patches in the areas for the second time to obtain the plurality of the sub-areas, the numbering directions of the patches in the sub-areas are set according to the predetermined graphs, and then the patches in the sub-areas are numbered sequentially according to the maximum number, so that the problems that the patch numbers jump randomly and are irregular due to the fact that only the geometric centroid coordinates X, Y of the patches are used for coordinate sorting are solved, the patch numbers are numbered according to the principle of left-to-right, top-to-bottom and continuity, and the readability and the attractiveness of the display of the patch vector data screen and the achievement drawing are further improved. The method has great application value in automatic numbering of the patterns of land utilization survey and real property cadastral survey.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
FIG. 1 is a flow diagram illustrating a method for automatic numbering of patches, according to an exemplary embodiment.
Fig. 2 is a flowchart illustrating step S103 according to an exemplary embodiment.
Fig. 3 is a flowchart illustrating step S104 according to an exemplary embodiment.
Fig. 4 is a flowchart illustrating step S105 according to an exemplary embodiment.
Fig. 5 is a flowchart illustrating step S106 according to an exemplary embodiment.
FIG. 6 is a flow diagram illustrating a method for automatic numbering of patches, according to an exemplary embodiment.
Fig. 7 is a schematic diagram illustrating an embodiment of a method for automatically numbering patches, according to an exemplary embodiment.
FIG. 8 is a block diagram illustrating a blob auto-numbering device, according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Fig. 1 is a flowchart illustrating a method for automatically numbering patches according to an exemplary embodiment, which may include the following steps, as shown in fig. 1:
step S101: acquiring a plurality of pattern spots to be numbered;
step S102: according to the attributes of the pattern spots, grouping the pattern spots to be numbered for the first time to obtain a plurality of areas;
step S103: calculating the maximum number of the image spots in the region;
step S104: according to the preset graph, carrying out secondary grouping on the pattern spots in the region to obtain a plurality of sub-regions;
step S105: setting numbering directions for the pattern spots in the sub-regions according to a preset pattern;
step S106: and sequentially numbering the pattern spots in the sub-regions according to the maximum number and the number direction.
According to the embodiment, the plurality of the patches to be numbered are grouped for the first time according to the attributes of the patches to obtain the plurality of the areas, the predetermined graphs are used for grouping the patches in the areas for the second time to obtain the plurality of the sub-areas, the numbering directions of the patches in the sub-areas are set according to the predetermined graphs, and then the patches in the sub-areas are numbered sequentially according to the maximum number, so that the problems that the patch numbers jump randomly and are irregular due to the fact that only the geometric centroid coordinates X, Y of the patches are used for coordinate sorting are solved, the patch numbers are numbered according to the principle of left-to-right, top-to-bottom and continuity, and the readability and the attractiveness of the display of the patch vector data screen and the achievement drawing are further improved. The method has great application value in automatic numbering of the patterns of land utilization survey and real property cadastral survey.
In the specific implementation of step S101, a plurality of patches to be numbered are obtained;
specifically, the data processing efficiency is improved by reading the spot data from the local database into the memory, wherein the spot data comprises the spot number, the administrative area where the spot is located, the area of the spot, the type of the spot, the remark and other attribute fields, and the position and the geometric figure of the spot.
In the specific implementation of step S102, the multiple patches to be numbered are grouped for the first time according to the attributes of the patches to obtain a plurality of regions;
specifically, the attribute of the map patches may be an attribute field indicating the geographic spatial position of the map patches, that is, a field value of an administrative area where the map patches in a province, a city, a county, a town, a village and the like are located, the map patches are grouped for the first time by selecting a field value according with a certain specific attribute value to obtain a plurality of areas, and data is filtered through the step, so that the data processing range is reduced, and the processing efficiency is improved.
In a specific implementation of step S103, calculating a maximum number of the patches within the region; specifically, as shown in fig. 2, this step includes the following sub-steps:
step S201: checking whether numbered pattern spots exist;
specifically, whether the image spot number is numbered or not is judged according to the fact that the value of the attribute field of the image spot number is a NULL value, a NULL value and a NULL character string.
Step S202: if all the pattern spots are unnumbered, the maximum number is 1;
step S203: if the image spots are numbered, setting the maximum value in the numbered images as the maximum number;
specifically, if the region pattern spots have part numbered and part unnumbered, the maximum value of the numbered region is set as the maximum number, and the continuity of the number can be ensured during the subsequent numbering.
In the specific implementation of step S104, performing a second grouping on the patches in the region according to a predetermined pattern to obtain a plurality of sub-regions; specifically, as shown in fig. 3, this step includes the following sub-steps:
step S301: if the preset graph is a multi-segment line, setting a set of the geometric graph of the graph spots and the graph spots intersected with the multi-segment line as a sub-region;
specifically, traversing the image spots in the region, extracting the boundary multi-segment lines of the image spots, judging whether intersection points exist between the image spots and the preset image multi-segment lines, storing the image spots with the intersection points into a set, filtering the image spots without the intersection points, and finally setting the set as a sub-region. Through the step, the data processing range of the subsequent image spot number can be further reduced, and the data processing efficiency is improved.
Step S302: if the preset graph is a rectangle, setting a set of the geometric graph of the pattern spots and the pattern spots intersected with the rectangle as a sub-region;
specifically, traversing the image spots in the region, extracting the boundary multi-segment lines of the image spots, judging whether intersection points exist between the image spots and the predetermined graphic rectangular boundary multi-segment lines, storing the image spots with the intersection points into a set, filtering the image spots without the intersection points, and finally setting the set as a sub-region. Through the step, the data processing range of the subsequent image spot number can be further reduced, and the data processing efficiency is improved.
Specifically, according to a predetermined pattern, performing a second grouping on the pattern spots in the region to obtain a sub-region; and in the area, grouping all the icons outside the sub-area again according to a preset graph until all the pattern spots in the area are divided into the sub-areas to obtain a plurality of sub-areas.
In the specific implementation of step S105, according to a predetermined pattern, a numbering direction is set for the pattern spots in the sub-area; specifically, as shown in fig. 4, this step includes the following sub-steps:
step S401: if the preset graph is a multi-segment line, the numbering direction is the advancing direction along the multi-segment line;
specifically, the numbering direction is the advancing direction along the multi-segment line, so that the pattern spot numbering can be ensured to accord with the numbering principle from left to right and from top to bottom.
Step S402: if the predetermined pattern is a rectangle,calculating the ratio of the length to the width of the rectangle, and when the ratio is less than
Figure BDA0003259634890000081
When the number direction is from top to bottom, when the ratio is more than or equal to
Figure BDA0003259634890000082
When the number is in the left-to-right direction;
specifically, if the predetermined pattern is a rectangle, when the length/width of the rectangle is less than 1/2, it indicates that the difference between the maximum value and the minimum value of the rectangle on the Y axis is greater than the difference between the maximum value and the minimum value of the X axis, and the numbering direction is from top to bottom, which conforms to the principle that the number of the patches is from top to bottom; when the length/width of the rectangle is greater than or equal to 1/2, the numbering direction is from left to right, which conforms to the principle of the spot numbering from left to right.
In a specific implementation of step S106, sequentially numbering the patches in the sub-region according to the maximum number and the number direction; specifically, as shown in fig. 5, this step includes the following sub-steps:
step S501: if the preset graph is a multi-segment line, the numbering direction is the advancing direction along the multi-segment line, the intersection point of the multi-segment line and the boundary of the pattern spots in the sub-area is calculated, the pattern spots in the sub-area are sequenced according to the distance between the intersection point and the starting point of the multi-segment line, and the sequence number of each pattern spot is recorded;
specifically, if the predetermined pattern is a multi-segment line, the numbering direction is along the advancing direction of the multi-segment line, the intersection points of the boundaries of the multi-segment line and the pattern spots in the sub-area are calculated, the pattern spots are sorted from small to large according to the distance (using euclidean distance) between the intersection points and the starting points of the multi-segment line, only the intersection point with the minimum distance is reserved as a sorting basis when a plurality of intersection points exist between one pattern spot and the multi-segment line, and the sequence number of each pattern spot is recorded. This ordering of steps ensures that the spot numbers conform to the left-to-right, top-to-bottom numbering convention.
Step S502: if the preset graph is a rectangle, the numbering direction is from top to bottom or from left to right, and when the numbering direction is from top to bottom, the spots in the sub-area are sequenced according to the coordinates of the centroid points Y of the geometric graphs of the spots, and the sequence number of each spot is recorded; when the numbering direction is from left to right, sequencing the image spots in the sub-area according to the X coordinates of the geometric figure centroid points of the image spots and recording the sequence number of each image spot;
specifically, if the predetermined figure is a rectangle, when the numbering direction is from top to bottom, sorting the figure spots from large to small according to the Y coordinates of the centroid points of the geometric figures of the figure spots, and recording the sequence number of each figure spot; and when the numbering direction is from left to right, sequencing the geometric figure centroid points from small to large according to the X coordinates of the figure centroids of the figure spots, and recording the sequence number of each figure spot. This ordering of steps ensures that the spot numbers conform to the left-to-right, top-to-bottom numbering convention.
Step S503: numbering the sequenced patches, wherein the number of each patch is the sum of the sequence number of the patch and the maximum number;
specifically, each figure spot number is the sequence number plus the maximum number, so that the continuity of the figure spot numbers in the area is ensured, and the problem of number skipping of the figure spots is solved.
Further, after step S106, the method may further include:
counting the number of numbered and un-updated spots, and updating the spot numbers to the specified attribute fields by adopting different mechanisms; specifically, when the number of the image spots is smaller than a specific value, a one-time refreshing mechanism is adopted to update the image spot number to a specified attribute field; and when the number of the image spots is larger than or equal to the specific value, updating the image spot number to the specified attribute field by using a cache refreshing mechanism with the specific value and the like. In a specific implementation, the specific value may be floated according to the computer performance, and in this embodiment, the specific value is 1000 by default.
Specifically, the number of the patch is calculated dynamically in the memory and has temporality, so that the number needs to be updated to the field of the specified attribute of the patch so as to be stored for a long time. When the data volume of the image spots is small, a one-time refreshing mechanism is adopted for updating all the image spots; when the data volume is very large, a cache refreshing mechanism with specific value and the like is used for updating in batches, so that the problems that the starting process runs slowly and the number is accidentally stopped due to a large updated data volume at one time to cause the loss of a calculation result are prevented. According to the number of numbered and un-updated spots, the spot numbers are dynamically updated to the designated attribute field in different modes, and flexibility and operation efficiency are considered.
Further, as shown in fig. 6, the automatic pattern spot numbering method may further include:
step S107: checking whether unnumbered pattern spots exist;
specifically, the attribute field value of the spot storage number is checked, whether the field value is a NULL value, a NULL value and a NULL character string is judged, whether the spot is unnumbered is checked, all the spots are ensured to have numbers through the step, and omission is prevented.
Step S108: if unnumbered pattern spots exist, numbering the unnumbered pattern spots;
in a specific implementation of step S108, the process of numbering the unnumbered patches is as described above in steps S102-S106.
In the embodiment shown in fig. 7, the patches are first grouped according to the attribute of the administrative district, and the first grouping can be divided into two groups, namely a township and B township; secondly, grouping the image spots in the town B for the second time according to the multi-segment lines and rectangles specified by the user and setting the numbering direction, wherein the numbering direction of the preset image 1 is along the advancing direction (indicated by an arrow) of the multi-segment lines, and the numbering direction of the preset image 2 is automatically calculated from top to bottom according to the length and the width; the maximum number is 1 because all the figure spots in the B villages and towns are not numbered; because the preset graph 1 is a multi-segment line, calculating the intersection points of the multi-segment line and the boundaries of the patches in the sub-regions, sequencing the patches in the sub-regions according to the distance between the intersection points and the starting points of the multi-segment line, recording the sequence number of each patch, wherein the distances between the patch 1, the patch 2, the patch 3, the patch 4 and the patch 5 and the starting points of the multi-segment line are respectively 15.5, 21.3, 26.0, 32.6 and 52.7, and numbering 1-5 is given according to the sequence from small to large of the distances; after the number of the preset graph 1 is finished, continuously grouping and numbering other patches in the town B according to the preset graph 2 until the number of all the patches in the town B is finished; and then numbering the image spots in the town A until all the image spots have numbers.
Corresponding to the embodiment of the automatic figure spot numbering method, the application also provides an embodiment of the automatic figure spot numbering device.
FIG. 8 is a block diagram illustrating a blob auto-numbering device, according to an example embodiment. Referring to fig. 8, the apparatus includes:
the acquiring module 21 acquires a plurality of pattern spots to be numbered;
the first grouping module 22 is used for carrying out first grouping on the plurality of the pattern spots to be numbered according to the attributes of the pattern spots to obtain a plurality of areas;
a calculation module 23, which calculates the maximum number of the pattern spots in the region;
the second grouping module 24 is used for carrying out second grouping on the pattern spots in the region according to a preset pattern to obtain a plurality of sub-regions;
the setting module 25 sets numbering directions for the pattern spots in the sub-regions according to a preset pattern;
and the numbering module 26 is used for numbering the pattern spots in the sub-regions sequentially according to the maximum number and the numbering direction.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
Correspondingly, the present application also provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; when executed by the one or more processors, cause the one or more processors to implement a method for automatic numbering of patches as described above.
Accordingly, the present application also provides a computer readable storage medium, on which computer instructions are stored, wherein the instructions, when executed by a processor, implement the automatic spot numbering method as described above.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. An automatic pattern spot numbering method is characterized by comprising the following steps:
acquiring a plurality of pattern spots to be numbered;
according to the attributes of the pattern spots, grouping the pattern spots to be numbered for the first time to obtain a plurality of areas;
calculating the maximum number of the image spots in the region;
according to the preset graph, carrying out secondary grouping on the pattern spots in the region to obtain a plurality of sub-regions;
setting numbering directions for the pattern spots in the sub-regions according to a preset pattern;
and sequentially numbering the pattern spots in the sub-regions according to the maximum number and the number direction.
2. The method of claim 1, further comprising:
checking whether unnumbered pattern spots exist;
and if the unnumbered pattern spots exist, numbering the unnumbered pattern spots.
3. The method of claim 1, wherein calculating the maximum number of patches within the region comprises:
checking whether numbered pattern spots exist;
if all the pattern spots are unnumbered, the maximum number is 1;
if there is a spot already numbered, the maximum value among the already numbered spots is set as the maximum number.
4. The method of claim 1, wherein grouping the patches within the region a second time according to a predetermined pattern to obtain a plurality of sub-regions comprises:
if the preset graph is a multi-segment line, setting a set of the geometric graph of the graph spots and the graph spots intersected with the multi-segment line as a sub-region;
and if the predetermined pattern is a rectangle, setting the set of the pattern spots of which the geometric patterns of the pattern spots intersect with the rectangle as a sub-region.
5. The method of claim 1, wherein setting the numbering direction for the patches in the sub-region according to a predetermined pattern comprises:
if the preset graph is a multi-segment line, the numbering direction is the advancing direction along the multi-segment line;
if the predetermined pattern is a rectangle, calculating the ratio of the length to the width of the rectangle, and if the ratio is less than
Figure FDA0003259634880000021
When the number direction is from top to bottom, when the ratio is more than or equal to
Figure FDA0003259634880000022
In time, the numbering direction is from left to right.
6. The method of claim 1, wherein sequentially numbering the patches within the sub-region according to the maximum number and the number direction comprises:
if the preset graph is a multi-segment line, the numbering direction is the advancing direction along the multi-segment line, the intersection point of the multi-segment line and the boundary of the pattern spots in the sub-area is calculated, the pattern spots in the sub-area are sequenced according to the distance between the intersection point and the starting point of the multi-segment line, and the sequence number of each pattern spot is recorded;
if the preset graph is a rectangle, the numbering direction is from top to bottom or from left to right, and when the numbering direction is from top to bottom, the spots in the sub-area are sequenced according to the coordinates of the centroid points Y of the geometric graphs of the spots, and the sequence number of each spot is recorded; when the numbering direction is from left to right, sequencing the image spots in the sub-area according to the X coordinates of the geometric figure centroid points of the image spots and recording the sequence number of each image spot;
and numbering the sequenced patches, wherein the number of each patch is the sequence number of the patch plus the maximum number.
7. An automatic figure spot numbering device, comprising:
the acquisition module acquires a plurality of pattern spots to be numbered;
the first grouping module is used for carrying out first grouping on the plurality of the pattern spots to be numbered according to the attributes of the pattern spots to obtain a plurality of areas;
the calculation module is used for calculating the maximum number of the pattern spots in the area;
the second grouping module is used for carrying out second grouping on the pattern spots in the region according to the preset pattern to obtain a plurality of sub-regions;
the setting module is used for setting the numbering direction of the pattern spots in the sub-regions according to a preset pattern;
and the numbering module is used for numbering the pattern spots in the sub-regions in sequence according to the maximum number and the numbering direction.
8. The apparatus of claim 7, wherein sequentially numbering the patches in the sub-regions according to the maximum number and the number direction comprises:
if the numbering direction is along the advancing direction of the multi-segment line, calculating the intersection point of the multi-segment line and the boundary of the pattern spots in the sub-area, sequencing the pattern spots in the sub-area according to the distance between the intersection point and the starting point of the multi-segment line, and recording the sequence number of each pattern spot;
if the numbering direction is from top to bottom, according to the Y coordinate of the geometric figure centroid of the pattern spots, sequencing the pattern spots in the sub-area and recording the sequence number of each pattern spot;
if the numbering direction is from left to right, sequencing the image spots in the sub-area according to the X coordinates of the geometric figure centroid points of the image spots and recording the sequence number of each image spot;
and numbering the sequenced patches, wherein the number of each patch is the sequence number of the patch plus the maximum number.
9. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
10. A computer-readable storage medium having stored thereon computer instructions, which, when executed by a processor, carry out the steps of the method according to any one of claims 1-6.
CN202111068748.1A 2021-09-13 2021-09-13 Automatic numbering method and device for pattern spots, electronic equipment and storage medium Active CN113838165B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111068748.1A CN113838165B (en) 2021-09-13 2021-09-13 Automatic numbering method and device for pattern spots, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111068748.1A CN113838165B (en) 2021-09-13 2021-09-13 Automatic numbering method and device for pattern spots, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113838165A true CN113838165A (en) 2021-12-24
CN113838165B CN113838165B (en) 2024-02-06

Family

ID=78958977

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111068748.1A Active CN113838165B (en) 2021-09-13 2021-09-13 Automatic numbering method and device for pattern spots, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113838165B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018107939A1 (en) * 2016-12-14 2018-06-21 国家海洋局第二海洋研究所 Edge completeness-based optimal identification method for image segmentation
CN109816749A (en) * 2019-02-14 2019-05-28 中国测绘科学研究院 Figure spot map symbol fill method, device, computer equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018107939A1 (en) * 2016-12-14 2018-06-21 国家海洋局第二海洋研究所 Edge completeness-based optimal identification method for image segmentation
CN109816749A (en) * 2019-02-14 2019-05-28 中国测绘科学研究院 Figure spot map symbol fill method, device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
武旭芳;魏?;高绵新;: "遥感监测图斑自动赋值技术研究", 地理空间信息, no. 03 *
郭小波;孙变富;霍涛;: "图斑自动编号程序的编写", 北京测绘, no. 03 *

Also Published As

Publication number Publication date
CN113838165B (en) 2024-02-06

Similar Documents

Publication Publication Date Title
KR101994317B1 (en) Navigation device, method of determining a height coordinate and method of generating a database
CN110990516B (en) Map data processing method, device and server
CN110909093B (en) Method and device for constructing intelligent landmark control network
CN110287831B (en) Method and device for acquiring control point based on landmark and electronic equipment
CN109992640B (en) Method, device, equipment and storage medium for determining position grid
CN105574102A (en) Electronic map data loading method and device
CN112131332B (en) Information point updating method and device, electronic equipment and computer storage medium
CN108595613A (en) GIS local maps edit methods and device
CN107481195A (en) Method and device based on more sight spot region intelligence sectional drawings generation electronic map
CN105698794A (en) A map acquiring method
CN107749074B (en) Method and device for drawing map and computing equipment
CN115525642A (en) Reverse geocoding method and device and electronic equipment
CN113838165A (en) Automatic pattern spot numbering method and device, electronic equipment and storage medium
CN110046210B (en) Map information updating method and device, electronic equipment and storage medium
US10062193B2 (en) Attribute based map marker clustering
de Berg et al. More geometric data structures: Windowing
CN115098752A (en) Target object positioning method, terminal equipment and storage medium
CN111773713B (en) Method, device and system for generating game object in game scene
CN112687003A (en) Building model unitization method and device
CN106339430B (en) Magnanimity covering method for drafting based on map API
CN113473483B (en) Positioning method and system for full-quantity users
CN112966041A (en) Data processing method, device, equipment and storage medium
CN116442226B (en) Pose correctness judging method, pose correctness judging device, robot and storage medium
RU2018124478A (en) METHOD AND ELECTRONIC DEVICE FOR CREATING AN INDEX OF POLYGON SEGMENTS
CN111639202B (en) Same-layer storage method, device, medium and equipment for geographic information data

Legal Events

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