CN111651532A - Method and device for generating drainage basin map data - Google Patents

Method and device for generating drainage basin map data Download PDF

Info

Publication number
CN111651532A
CN111651532A CN201910160014.2A CN201910160014A CN111651532A CN 111651532 A CN111651532 A CN 111651532A CN 201910160014 A CN201910160014 A CN 201910160014A CN 111651532 A CN111651532 A CN 111651532A
Authority
CN
China
Prior art keywords
watershed
data
distribution
basin
map data
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
CN201910160014.2A
Other languages
Chinese (zh)
Other versions
CN111651532B (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.)
Xi'an Navinfo Information Technology Co ltd
Original Assignee
Xi'an Navinfo 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 Xi'an Navinfo Information Technology Co ltd filed Critical Xi'an Navinfo Information Technology Co ltd
Priority to CN201910160014.2A priority Critical patent/CN111651532B/en
Publication of CN111651532A publication Critical patent/CN111651532A/en
Application granted granted Critical
Publication of CN111651532B publication Critical patent/CN111651532B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B29/00Maps; Plans; Charts; Diagrams, e.g. route diagram
    • G09B29/003Maps
    • G09B29/006Representation of non-cartographic information on maps, e.g. population distribution, wind direction, radiation levels, air and sea routes
    • G09B29/007Representation of non-cartographic information on maps, e.g. population distribution, wind direction, radiation levels, air and sea routes using computer methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Ecology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Business, Economics & Management (AREA)
  • Educational Administration (AREA)
  • Educational Technology (AREA)
  • General Physics & Mathematics (AREA)
  • Image Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a method and equipment for generating drainage basin map data. The method comprises the following steps: acquiring a watershed distribution picture; vectorizing the watershed distribution picture to obtain a vectorized result; carrying out topology processing on the vectorization result to obtain a topology processing result; adjusting the topological processing result according to the water system contained in each basin in the basin distribution picture to obtain basin distribution geometric data; performing attribute field assignment on the topology processing result to obtain watershed distribution attribute data; and generating the watershed map data according to the watershed distribution geometric data and the watershed distribution attribute data. The obtained watershed map data has object attributes, and the distribution condition of each watershed is convenient to carry out statistical analysis.

Description

Method and device for generating drainage basin map data
Technical Field
The present invention relates to data processing technologies, and in particular, to a method and an apparatus for generating drainage basin map data.
Background
With the continuous development of intelligent terminal technology, more and more functions can be realized by the intelligent terminal. The electronic map is an important application of the intelligent terminal, and is popular among users due to the characteristics of high convenience, accurate positioning and the like. The distribution of the drainage basins is displayed on the electronic map, so that a user can intuitively know which drainage basins are contained in China, the general distribution of the drainage basins and the like.
In the prior art, the distribution of the drainage basins displayed on the electronic map adopts a picture format, and in this format, a user can view the distribution of each drainage basin by means of zooming in and zooming out and the like. However, the watershed map data in the picture format does not have object attributes, and is limited in application, for example: statistical analysis cannot be performed on the watershed area included in a certain province or the floor area of a certain watershed in a certain province.
Disclosure of Invention
The invention provides a method and equipment for generating watershed map data, which are used for generating the watershed map data with object attributes.
In a first aspect, the present invention provides a method for generating drainage basin map data, including:
acquiring a watershed distribution picture;
vectorizing the watershed distribution picture to obtain a vectorized result;
carrying out topology processing on the vectorization result to obtain a topology processing result;
adjusting the topological processing result according to the water system contained in each basin in the basin distribution picture to obtain basin distribution geometric data;
performing attribute field assignment on the topology processing result to obtain watershed distribution attribute data;
and generating the watershed map data according to the watershed distribution geometric data and the watershed distribution attribute data.
Optionally, the vectorization result includes a successfully hooked watershed vectorized line segment and a successfully not-hooked watershed vectorized line segment;
the performing topology processing on the vectorization result to obtain a topology processing result includes:
hooking the unsuccessfully hooked watershed vectorized line segment in the vectorization result to obtain a hooking result;
generating face-shaped data according to the hooking result;
and performing surface missing correction and surface capping correction on the surface-shaped data to obtain the topology processing result.
Optionally, the hooking the unsuccessfully hooked watershed vectorized line segment in the vectorization result includes:
if the unsuccessfully hooked river basin vectorized line segments are mutually independent, splicing the unsuccessfully hooked river basin vectorized line segments;
if the unsuccessfully hooked river basin vectorized line segments are mutually overlapped, deleting the unsuccessfully hooked river basin vectorized line segments, or deleting, interrupting and splicing the unsuccessfully hooked river basin vectorized line segments;
and if the unsuccessfully hooked river basin vectorization line segments are intersected, interrupting and splicing the unsuccessfully hooked river basin vectorization line segments.
Optionally, the performing the surface missing correction on the planar data includes:
searching for a watershed vectorization line segment which does not form any planar data in the vectorization result;
and (4) re-hooking the watershed vectorized line segment which does not form any planar data.
Optionally, the performing surface capping correction on the planar data includes:
judging whether the area data which is not generated exists or not according to the drainage basin distribution picture;
and if the linear vector segment exists, re-hooking the watershed vector segment related to the non-generated planar data.
Optionally, the method further includes:
acquiring map data of each administrative division;
and according to the drainage basin map data and the map data of the administrative regions, performing statistical analysis on the distribution information of the drainage basins in the administrative regions, which is contained in the drainage basin distribution picture, so as to obtain the areas of the drainage basins occupying the administrative regions in the drainage basin distribution picture.
Optionally, the method further includes:
acquiring water system map data and green map data;
and analyzing the water system and the green land distributed in each watershed included in the watershed distribution picture according to the watershed map data, the water system map data and the green land map data to obtain the water system area and the green land area included in each watershed.
In a second aspect, the present invention provides a generation apparatus of watershed map data, comprising:
the acquisition module is used for acquiring a watershed distribution picture;
the vectorization module is used for carrying out vectorization processing on the watershed distribution picture to obtain a vectorization result;
the topology processing module is used for carrying out topology processing on the vectorization result to obtain a topology processing result;
the adjusting module is used for adjusting the topological processing result according to the water system contained in each basin in the basin distribution picture to obtain basin distribution geometric data;
the assignment module is used for carrying out attribute field assignment on the topology processing result to obtain the distribution attribute data of the watershed;
and the generation module is used for generating the watershed map data according to the watershed distribution geometric data and the watershed distribution attribute data.
Optionally, the vectorization result includes a successfully hooked watershed vectorized line segment and a successfully not hooked watershed vectorized line segment, and the topology processing module is specifically configured to:
hooking the unsuccessfully hooked watershed vectorized line segment in the vectorization result to obtain a hooking result;
generating face-shaped data according to the hooking result;
and performing surface missing correction and surface capping correction on the surface-shaped data to obtain the topology processing result.
Optionally, the topology processing module is specifically configured to:
if the unsuccessfully hooked river basin vectorized line segments are mutually independent, splicing the unsuccessfully hooked river basin vectorized line segments;
if the unsuccessfully hooked river basin vectorized line segments are mutually overlapped, deleting the unsuccessfully hooked river basin vectorized line segments, or deleting, interrupting and splicing the unsuccessfully hooked river basin vectorized line segments;
and if the unsuccessfully hooked river basin vectorization line segments are intersected, interrupting and splicing the unsuccessfully hooked river basin vectorization line segments.
Optionally, the topology processing module is specifically configured to:
searching for a watershed vectorization line segment which does not form any planar data in the vectorization result;
and (4) re-hooking the watershed vectorized line segment which does not form any planar data.
Optionally, the topology processing module is specifically configured to:
judging whether the area data which is not generated exists or not according to the drainage basin distribution picture;
and if the linear vector segment exists, re-hooking the watershed vector segment related to the non-generated planar data.
Optionally, the above apparatus further includes:
a statistics module to:
acquiring map data of each administrative division;
and according to the drainage basin map data and the map data of the administrative regions, performing statistical analysis on the distribution information of the drainage basins in the administrative regions, which is contained in the drainage basin distribution picture, so as to obtain the areas of the drainage basins occupying the administrative regions in the drainage basin distribution picture.
Optionally, the statistical module is further configured to:
acquiring water system map data and green map data;
and analyzing the water system and the green land distributed in each watershed included in the watershed distribution picture according to the watershed map data, the water system map data and the green land map data to obtain the water system area and the green land area included in each watershed.
In a third aspect, the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described method for generating watershed map data.
In a fourth aspect, the present invention provides an electronic device, including:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to implement the generation method of the watershed map data via executing the executable instructions.
According to the method and the device for generating the watershed map data, the vectorization result is obtained by vectorizing the watershed distribution picture on the basis of obtaining the watershed distribution picture; and then, according to the vectorization result, producing watershed map data. The obtained watershed map data has object attributes, and the distribution condition of each watershed is convenient to carry out statistical analysis.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a first embodiment of a method for generating watershed map data according to the present invention;
fig. 2 is a schematic view of a watershed distribution picture provided by the present invention;
fig. 3 is a schematic diagram of vectorization results provided by the present invention;
fig. 4 is a flowchart illustrating a second embodiment of a method for generating watershed map data according to the present invention;
fig. 5 is a schematic diagram of mutually independent watershed vectorized line segments provided by the present invention;
fig. 6 is a schematic diagram of the watershed vectorized line segment shown in fig. 5 after hooking is performed according to the present invention;
fig. 7 is a first schematic diagram of mutually overlapped watershed vectorized line segments provided by the present invention;
fig. 8 is a second schematic diagram of mutually overlapped watershed vectorization line segments provided by the present invention;
fig. 9 is a schematic diagram of the watershed vectorized line segment shown in fig. 7 after hooking according to the present invention;
fig. 10 is a schematic diagram of a watershed vectorized line segment shown in fig. 8 after hooking according to the present invention;
fig. 11 is a schematic diagram three of mutually overlapped watershed vectorized line segments provided by the present invention;
fig. 12 is a schematic diagram of the watershed vectorized line segment shown in fig. 11 after hooking according to the present invention;
fig. 13 is a first schematic diagram of interdigitated watershed vectorized line segments provided by the present invention;
fig. 14 is a first schematic diagram of interdigitated watershed vectorized line segments provided by the present invention;
fig. 15 is a schematic diagram of the watershed vectorized line segment shown in fig. 13 after hooking according to the present invention;
fig. 16 is a schematic diagram of the watershed vectorized line segment shown in fig. 14 after hooking according to the present invention;
fig. 17 is a schematic diagram of planar data before the surface defect correction provided by the present invention;
fig. 18 is a schematic diagram of the planar data after the face deletion correction provided by the present invention;
FIG. 19 is a schematic diagram of the planar data before the correction of the surface cover according to the present invention;
fig. 20 is a schematic diagram of the planar data after the surface cover is corrected according to the present invention;
fig. 21 is a schematic flowchart of a third embodiment of a method for generating watershed map data according to the present invention;
fig. 22 is a schematic structural diagram of a watershed map data generation device provided by the present invention;
fig. 23 is a schematic diagram of a hardware structure of the electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the prior art, the distribution of the drainage basins displayed on the electronic map is in a picture format, and in the picture format, a user can view the distribution of each drainage basin by means of zooming in and zooming out and the like. However, the watershed distribution map in the picture format does not have object attributes, and there is no logical relationship between watersheds, between watersheds and water systems, between watersheds and roads, and between watersheds and administrative regions, and thus it cannot be applied to statistical analysis, for example: statistical analysis cannot be performed on the watershed area included in a certain province or the floor area of a certain watershed in a certain province.
In order to solve the technical problem, the invention provides a method and a device for generating drainage basin map data. By carrying out vectorization processing on the watershed distribution picture and then manufacturing watershed map data according to a vectorization result, the obtained watershed map data has object attributes, and statistical analysis on distribution information of the watershed is facilitated.
Fig. 1 is a schematic flow chart of a first embodiment of a method for generating watershed map data according to the present invention. As shown in fig. 1, the method for generating watershed map data provided by this embodiment includes:
s101, acquiring a watershed distribution picture.
The term "drainage basin distribution picture" refers to a distribution picture of each drainage basin included in a certain area in the area. Referring to fig. 2, fig. 2 is a distribution example of 7 drainage basins included in a certain area in the area, and the 7 drainage basins are respectively represented by numbers 1-7.
Optionally, the watershed distribution picture may be obtained through an official website or a related unit, and the format of the watershed distribution picture may be PNG or JPG, or the like.
And S102, carrying out vectorization processing on the watershed distribution picture to obtain a vectorization result.
The vectorization processing may be as follows:
firstly, carrying out registration correction on the watershed distribution picture to obtain data after registration correction. The purpose of the registration correction is to assign corresponding coordinate values to points on the boundaries of the respective watersheds on the watershed map sheet.
And then, carrying out vectorization processing on the data after registration correction to obtain the vectorization result. The vectorization processing may be as follows: and connecting adjacent points on the boundary of each watershed on the watershed distribution map to form a plurality of watershed vectorized line segments to be articulated. For example, a watershed vectorization line segment obtained after vectorization processing is performed on the watershed distribution picture shown in fig. 2 may be as shown in fig. 3.
And S103, carrying out topology processing on the vectorization result to obtain a topology processing result.
The process of performing topology processing on the vectorization result includes a process of hooking the watershed vectorization line segment shown in fig. 3.
And S104, adjusting the topological processing result according to the water system contained in each basin in the basin distribution picture to obtain basin distribution geometric data.
The water system contained in each basin is known, and the purpose of adjusting the topological processing result is as follows: ensuring that the range covered by each basin covers the range occupied by all the water systems contained in that basin.
And S105, carrying out attribute field assignment on the topology processing result to obtain the distribution attribute data of the watershed.
Wherein the attribute field includes: the method comprises the following steps of attribute fields of a watershed point, attribute fields of a watershed vectorized line segment and attribute fields of surface data, wherein the watershed point is an end point forming the watershed vectorized line segment, and the surface data is data of a surface formed after the watershed vectorized line segment is successfully hooked.
Optionally, the attribute field of the drainage basin point includes: the point number of the watershed point, the rendering color of the watershed point, the line number of the watershed vectorization line segment corresponding to the watershed point, and/or the update time of the watershed point.
Specifically, the attribute fields of each domain point may be assigned in the manner shown in table 1:
TABLE 1
Name (R) Code Type (B) Value range Default value Assignment method
Number of points Sign 11 Data type 11 Value range 11 Default value 11 Assignment method 11
Rendering color Sign 12 Data type 12 Value range 12 Default value 12 Assignment scheme 12
Line number Sign 13 Data type 13 Value range 13 Default value 13 Assignment scheme 13
Update time Sign 14 Data type 14 Value range 14 Default value 14 Assignment scheme 14
Wherein, the identifiers 11-14 are used for uniquely identifying the corresponding attributes in the name column; data type 11-data type 14 is used to indicate the data type of the corresponding attribute, and the data type may be NUMBER or VARCHAR 2; value range 11-value range 14 are used to indicate the value range of the corresponding attribute; default value 11 — Default value 14 is used to indicate the default value for the corresponding attribute; assignment pattern 11-assignment pattern 14 are used to indicate the assignment pattern of the corresponding attribute. Specific numerical values of the code column, the type column, the value field column, the default value column, and the assignment mode column in table 1 may be set according to actual situations, and the present invention is not limited herein.
Optionally, the attribute field of the watershed vectorized line segment includes: the line number of the watershed vectorized line segment, the starting point of the watershed vectorized line segment, the end point of the watershed vectorized line segment, the rendering color of the watershed vectorized line segment, the surface number corresponding to the watershed vectorized line segment, and/or the updating time of the watershed vectorized line segment.
Specifically, attribute fields of vectorized line segments of each watershed may be assigned in a manner shown in table 2:
TABLE 2
Name (R) Code Type (B) Value range Default value Assignment method
Line number Identification 21 Data type 21 Value range 21 Default value 21 Assignment scheme 21
Starting point Sign 22 Data type 22 Value range 22 Default value 22 Assignment means 22
Terminal point Identification 23 Data type 23 Value range 23 Default value 23 Assignment means 23
Rendering color Sign 24 Data type 24 Value range 24 Default value 24 Assignment method 24
Number of noodle Identification 25 Data type 25 Value range 25 Default value 25 Assignment means 25
Update time Sign 26 Data type 26 Value range 26 Default value 26 Assignment method 26
Wherein, the identifiers 21-26 are used for uniquely identifying the corresponding attributes in the name column; data type 21-data type 26 is used to indicate the data type of the corresponding attribute, and the data type may be NUMBER or VARCHAR 2; value ranges 21-26 are used to indicate the value ranges of the corresponding attributes; default 21 — Default 26 is used to indicate the default value for the corresponding attribute; assignment pattern 21-assignment pattern 26 are used to indicate the assignment pattern of the corresponding attribute. Specific numerical values of the code column, the type column, the value field column, the default value column, and the assignment mode column in table 2 may be set according to actual situations, and the present invention is not limited herein.
Optionally, the attribute field of the facet data includes: a face number of the planar data, a chinese name of the planar data, an english name of the planar data, a classification of the planar data, a display grade of the planar data, a scale of the planar data, a rendering color of the planar data, an area of the planar data, a flow rate of the planar data, and/or an update time of the planar data.
Specifically, attribute fields of each planar data may be assigned in the manner shown in table 3:
TABLE 3
Name (R) Code Type (B) Value range Default value Assignment method
Number of noodle Identification 31 Data type 31 Value range 31 Default value 31 Assignment means 31
Name of Chinese Identification 32 Data type 32 Value range 32 Default value 32 Assignment method 32
English name Logo 33 Data type 33 Value range 33 Default value 33 Assignment scheme 33
Classification Sign 34 Data type 34 Value range 34 Default value 34 Assignment method 34
Displaying grade Sign 35 Data type 35 Value range 35 Default value 35 Assignment means 35
Scale bar Sign 36 Data type 36 Value range 36 Default value 36 Assignment means 36
Rendering color Mark 37 Data type 37 Value range 37 Default value 37 Assignment means 37
Area of Mark 38 Data type 38 Value range 38 Default value 38 Assignment means 38
Flow rate Sign 39 Data type 39 Value range 39 Default value 39 Assignment means 39
Update time Logo 40 Data type 40 Value range 40 Default value 40 Assignment scheme 40
Wherein, the identifier 31-40 is used for uniquely identifying the corresponding attribute in the name column; data type 31-data type 40 is used to indicate the data type of the corresponding attribute, and the data type may be NUMBER or VARCHAR 2; value range 31-value range 40 are used to indicate the value range of the corresponding attribute; default value 31 — Default value 40 is used to indicate the default value for the corresponding attribute; assignment means 31-assignment means 40 are used to indicate the assignment means of the corresponding attribute. Specific numerical values of the code column, the type column, the value field column, the default value column, and the assignment mode column in table 3 may be set according to actual situations, and the present invention is not limited herein.
And S106, determining the watershed map data according to the watershed distribution geometric data and the watershed distribution attribute data.
When storing the flow domain map data, the flow domain data can be stored in a manner shown in table 4:
TABLE 4
Sign 11 Sign 12 Sign 13 Sign 14
Point number 11 Color 11 Line number 11 Time 11
Point number 12 Color 12 Line number 12 Time 12
Point number 13 Color 13 Line number 13 Time 13
Point number 14 Color 14 Line number 14 Time 14
Correspondingly, the watershed vectorized line segment can be stored in the manner shown in table 5:
TABLE 5
Identification 21 Sign 22 Identification 23 Sign 24 Identification 25 Sign 26
Line number 21 Starting point 21 End point 21 Color 21 Number of noodle 21 Time 21
Line number 22 Starting point 22 End point 22 Color 22 Number of noodle 22 Time 22
Accordingly, the face data may be stored in the manner shown in Table 6:
TABLE 6
Identification 31 Identification 32 Logo 33 Sign 34 Sign 35
Number of noodle 31 Chinese name 31 English name 31 Classification 31 Display grade 31
Number of surface 32 Chinese name 32 English name 32 Classification 32 Display grade 32
Sign 36 Mark 37 Mark 38 Sign 39 Logo 40
Scale 31 Rendering color 31 Area 31 Flow rate 31 Update time 31
Scale 32 Rendering color 32 Area 32 Flow 32 Update time 32
In the method for generating watershed map data provided by this embodiment, on the basis of obtaining a watershed distribution picture, a vectorization result is obtained by performing vectorization processing on the watershed distribution picture; and then, according to the vectorization result, producing watershed map data. The obtained watershed map data has object attributes, and the distribution condition of each watershed is convenient to carry out statistical analysis.
The following embodiments are described in conjunction with specific embodiments: and performing topology processing on the vectorization result to describe the process of obtaining the topology processing result in detail.
Fig. 4 is a flowchart illustrating a second embodiment of a method for generating watershed map data according to the present invention. As shown in fig. 4, the method for generating watershed map data provided by this embodiment includes:
s401, acquiring a watershed distribution picture.
S402, carrying out vectorization processing on the watershed distribution picture to obtain a vectorization result.
The specific implementation manners of S401 to S402 can refer to the above embodiments, and the present invention is not described herein again.
The process of performing topology processing on the vectorization result comprises the following steps:
and S403, hooking the unsuccessfully hooked watershed vectorized line segment in the vectorization result to obtain a hooking result.
After vectorization processing is performed on the watershed distribution picture, some obtained watershed vectorized line segments are successfully hooked, and some are not successfully hooked. At this time, hitching needs to be made on the watershed vectorized line segment which is not successfully hitched. Specifically, the position relationship between the unsuccessfully hitched watershed vectorized line segments is divided into the following cases:
a) and the unsuccessfully hooked river basin vectorized line segments are mutually independent, and the corresponding method for making the hooks under the condition is to splice the unsuccessfully hooked river basin vectorized line segments.
For example, referring to fig. 5, the watershed vectorization line segment a and the watershed vectorization line segment b are two independent watershed vectorization line segments. And splicing the two end points of the watershed vectorized line segment a and the watershed vectorized line segment b which are relatively close to each other to form a hook which is centered at the end point N1 and is shown in FIG. 6.
b) And the unsuccessfully hooked river basin vectorized line segments are mutually overlapped, and the corresponding method for making the hook under the condition is to delete the unsuccessfully hooked river basin vectorized line segments, or delete, interrupt and splice the unsuccessfully hooked river basin vectorized line segments.
For example, for the case of simple coincidence, that is, all shape points of one watershed vectorized line segment fall on another watershed vectorized line segment, as shown in fig. 7 and 8, the watershed vectorized line segment corresponding to the coincident part is directly deleted, so as to form the line segment shown in fig. 9 and 10. For the case that hooking is involved except for the overlapped part, that is, only the shape point of a part of the length on one watershed vectorized line segment falls on the other watershed vectorized line segment, as shown in fig. 11, the part of the one watershed vectorized line segment that is overlapped with the other watershed vectorized line segment is deleted, the other watershed vectorized line segment is broken from the intersection point, and the non-overlapped part and the other watershed vectorized line segment are spliced at the intersection point to form the line segment shown in fig. 12.
c) And mutually crossing the unsuccessfully hooked river basin vectorized line segments, wherein the corresponding hooking method is to perform interruption processing and splicing processing on the unsuccessfully hooked river basin vectorized line segments.
For example, referring to fig. 13 and 14, a watershed vectorization line segment a and a watershed vectorization line segment b are two mutually intersecting watershed vectorization line segments. The watershed vectorized line segment a and the watershed vectorized line segment b are interrupted at the intersection point of the watershed vectorized line segment a and the watershed vectorized line segment b, for the situation shown in fig. 13, the distances between two end points of the watershed vectorized line segment a and the watershed vectorized line segment b and the intersection point are equal, and then the intersection point is taken as a new end point to make a hitch connection, so that a watershed vectorized line segment c, a watershed vectorized line segment d, a watershed vectorized line segment e and a watershed vectorized line segment f in fig. 15 are formed. For the case shown in fig. 14, if one end point of the watershed vectorized line segment a is closer to the intersection point, a hook is made with the intersection point as a new end point, and a watershed vectorized line segment g, a watershed vectorized line segment h, and a watershed vectorized line segment i in fig. 16 are formed.
And S404, generating the plane data according to the hooking result.
It should be noted that: after the hooking process is performed in the step 1, it is required to ensure that the watershed vectorized line segments are connected in series into a plurality of closed line segments, and the surface-shaped data of the watershed distribution can be generated according to the surface surrounded by each closed line segment.
S405, performing surface missing correction and surface capping correction on the planar data to obtain the topology processing result.
Specifically, the implementation manner of performing the face missing correction on the face shape data is as follows: finding the watershed vectorized line segment which does not form any planar data in the vectorization result, such as the watershed vectorized line segment m in fig. 17, and re-making an attachment for the watershed vectorized line segment which does not form any planar data to form planar data in fig. 18, where the manner of re-making an attachment can be referred to in step 1.
Specifically, the implementation manner of performing the surface capping correction on the surface data is as follows: and judging whether the non-generated planar data exists or not according to the watershed distribution picture, and if so, re-hooking the watershed vectorized line segment related to the non-generated planar data. Since the theoretical number of the planar data generated by the methods described in step 1 and step 2 should be the same as the number of the domains included in the domain distribution picture, if the two numbers are not the same, a face capping situation may occur, and then the missing planar data may be generated by the face capping correction, for example, the planar data in fig. 19 may be subjected to the face capping correction, and the planar data P that is originally capped may be obtained, as shown in fig. 20, and the integrity of the planar data is ensured.
And S406, adjusting the topological processing result according to the water system contained in each basin in the basin distribution picture to obtain basin distribution geometric data.
And S407, carrying out attribute field assignment on the topology processing result to obtain the distribution attribute data of the watershed.
And S408, generating the watershed map data according to the watershed distribution geometric data and the watershed distribution attribute data.
The implementation manners of S406-S408 can refer to the above embodiments, and the present invention is not described herein again.
The drainage basin map data generation method provided by this embodiment describes in detail a topology processing process, a face missing correction process, and a face capping correction process, and provides a basis for the subsequent generation of drainage basin map data.
The application of the above-described watershed map data will be described in detail with reference to specific embodiments. Fig. 21 is a flowchart illustrating a third embodiment of a method for generating watershed map data according to the present invention. As shown in fig. 21, the watershed map data generation method provided by the present embodiment includes:
s2101, acquiring a watershed distribution picture.
And S2102, carrying out vectorization processing on the watershed distribution picture to obtain a vectorization result.
S2103, carrying out topology processing on the vectorization result to obtain a topology processing result.
And S2104, adjusting the topological processing result according to water systems contained in the watershed distribution pictures to obtain the geometrical data of the watershed distribution.
S2105, attribute field assignment is carried out on the topology processing result to obtain the distribution attribute data of the watershed.
S2106, generating the watershed map data according to the watershed distribution geometric data and the watershed distribution attribute data.
The implementation manners of S2101-S2106 may refer to the above embodiments, and the present invention is not described herein again.
S2107, according to the drainage basin map data, performing statistical analysis on distribution information of each drainage basin contained in the drainage basin distribution picture to obtain a statistical analysis result.
The content of the statistical analysis can be determined according to the actual requirement.
Such as: when it is necessary to count the area occupied by each administrative division by each drainage basin, the process of the statistical analysis may be: acquiring map data of each administrative division, overlapping the map data of the drainage basin and the map data of each administrative division, and further performing statistical analysis on distribution information of each drainage basin in each administrative division, which is contained in a drainage basin distribution picture, to obtain the area of each administrative division occupied by each drainage basin in the drainage basin distribution picture.
For example, when it is necessary to count the water system area and the green space area included in each drainage basin, the statistical analysis may be performed by acquiring water system map data and green space map data, superimposing the drainage basin map data and the acquired water system map data and the number of green space maps, and analyzing the water system and the green space distributed in each drainage basin included in the drainage basin distribution picture to obtain the water system area and the green space area included in each drainage basin.
Optionally, the number of roads and points of interest included in each drainage basin may be counted by using the drainage basin map data generated by the above method.
In addition, since the drainage basin map data generated by the method has the object attribute, the drainage basin map data generated by the method can also be used for thematic display, such as: different colors are adopted to display the distribution of different watersheds, different symbols are adopted to mark different watersheds, and the like. In order to enhance the visual perception brought by the watershed distribution diagram, the watershed distribution diagram can be dynamically displayed by combining the actual water system color and the flow speed of each watershed just like moving the actual water flow to a screen, so that the real and attractive visual perception can be brought to people.
The method for generating the drainage basin map data introduces the application of the domain map data, and compared with a drainage basin distribution picture in a picture format in the prior art, the domain map data generated by the embodiment is more convenient to display and perform related statistical analysis.
Fig. 22 is a schematic structural diagram of a watershed map data generation device according to the present invention. As shown in fig. 22, the generation device of the watershed map data according to the present invention includes:
an obtaining module 2201, configured to obtain a watershed distribution picture;
a vectorization module 2202, configured to perform vectorization processing on the watershed distribution picture to obtain a vectorization result;
a topology processing module 2203, configured to perform topology processing on the vectorization result to obtain a topology processing result;
an adjusting module 2204, configured to adjust the topology processing result according to the water systems included in each watershed in the watershed distribution picture to obtain the watershed distribution geometric data;
an assignment module 2205, configured to perform attribute field assignment on the topology processing result to obtain watershed distribution attribute data;
a generating module 2206, configured to generate the watershed map data according to the watershed distribution geometry data and the watershed distribution attribute data.
Optionally, the vectorization result includes a successfully hooked watershed vectorized line segment and a successfully not hooked watershed vectorized line segment, and the topology processing module 2203 is specifically configured to:
hooking the unsuccessfully hooked watershed vectorized line segment in the vectorization result to obtain a hooking result;
generating face-shaped data according to the hooking result;
and performing surface missing correction and surface capping correction on the surface-shaped data to obtain the topology processing result.
Optionally, the topology processing module 2203 is specifically configured to:
if the unsuccessfully hooked river basin vectorized line segments are mutually independent, splicing the unsuccessfully hooked river basin vectorized line segments;
if the unsuccessfully hooked river basin vectorized line segments are mutually overlapped, deleting the unsuccessfully hooked river basin vectorized line segments, or deleting, interrupting and splicing the unsuccessfully hooked river basin vectorized line segments;
and if the unsuccessfully hooked river basin vectorization line segments are intersected, interrupting and splicing the unsuccessfully hooked river basin vectorization line segments.
Optionally, the topology processing module 2203 is specifically configured to:
searching for a watershed vectorization line segment which does not form any planar data in the vectorization result;
and (4) re-hooking the watershed vectorized line segment which does not form any planar data.
Optionally, the topology processing module 2203 is specifically configured to:
judging whether the area data which is not generated exists or not according to the drainage basin distribution picture;
and if the linear vector segment exists, re-hooking the watershed vector segment related to the non-generated planar data.
Optionally, the above apparatus further includes:
a statistics module 2207 configured to:
acquiring map data of each administrative division;
and according to the drainage basin map data and the map data of the administrative regions, performing statistical analysis on the distribution information of the drainage basins in the administrative regions, which is contained in the drainage basin distribution picture, so as to obtain the areas of the drainage basins occupying the administrative regions in the drainage basin distribution picture.
Optionally, the statistic module 2207 is further configured to:
acquiring water system map data and green map data;
and analyzing the water system and the green land distributed in each watershed included in the watershed distribution picture according to the watershed map data, the water system map data and the green land map data to obtain the water system area and the green land area included in each watershed.
The generation device of the drainage basin map data provided in this embodiment may be used to execute the generation method of the drainage basin map data described in any of the above embodiments, and the implementation principle and the technical effect are similar, and are not described herein again.
Fig. 23 is a schematic diagram of a hardware structure of the electronic device provided in the present invention. As shown in fig. 23, the electronic device of the present embodiment may include:
a memory 2301 for storing program instructions.
The processor 2302 is configured to implement the method for generating the watershed map data described in any of the embodiments above when the program instructions are executed, and specific implementation principles may refer to the embodiments above, which are not described herein again.
The present invention provides a computer-readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing the method for generating watershed map data described in any of the above embodiments.
The present invention also provides a program product including a computer program stored in a readable storage medium, from which the computer program can be read by at least one processor, and the computer program is executed by the at least one processor to cause an electronic device to implement the generation method of the watershed map data described in any of the above embodiments.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In the foregoing embodiments of the network device or the terminal device, it should be understood that the Processor may be a Central Processing Unit (CPU), or may be another general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present application may be embodied directly in a hardware processor, or in a combination of the hardware and software modules in the processor.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for generating watershed map data, the method comprising:
acquiring a watershed distribution picture;
vectorizing the watershed distribution picture to obtain a vectorized result;
carrying out topology processing on the vectorization result to obtain a topology processing result;
adjusting the topological processing result according to the water system contained in each basin in the basin distribution picture to obtain basin distribution geometric data;
performing attribute field assignment on the topology processing result to obtain watershed distribution attribute data;
and generating the watershed map data according to the watershed distribution geometric data and the watershed distribution attribute data.
2. The method according to claim 1, wherein the vectorization result comprises a successfully hooked watershed vectorized line segment and a successfully not hooked watershed vectorized line segment;
the performing topology processing on the vectorization result to obtain a topology processing result includes:
hooking the unsuccessfully hooked watershed vectorized line segment in the vectorization result to obtain a hooking result;
generating face-shaped data according to the hooking result;
and performing surface missing correction and surface capping correction on the surface-shaped data to obtain the topology processing result.
3. The method according to claim 2, wherein hitching the watershed vectorized line segment which is not hitched successfully in the vectorization result comprises:
if the unsuccessfully hooked river basin vectorized line segments are mutually independent, splicing the unsuccessfully hooked river basin vectorized line segments;
if the unsuccessfully hooked river basin vectorized line segments are mutually overlapped, deleting the unsuccessfully hooked river basin vectorized line segments, or deleting, interrupting and splicing the unsuccessfully hooked river basin vectorized line segments;
and if the unsuccessfully hooked river basin vectorization line segments are intersected, interrupting and splicing the unsuccessfully hooked river basin vectorization line segments.
4. The method according to claim 2, wherein the performing the face missing correction on the face data includes:
searching for a watershed vectorization line segment which does not form any planar data in the vectorization result;
and (4) re-hooking the watershed vectorized line segment which does not form any planar data.
5. The method of claim 2, wherein said performing a face capping correction on said face data comprises:
judging whether the area data which is not generated exists or not according to the drainage basin distribution picture;
and if the linear vector segment exists, re-hooking the watershed vector segment related to the non-generated planar data.
6. The method of any one of claims 1-5, further comprising:
acquiring map data of each administrative division;
and according to the drainage basin map data and the map data of the administrative regions, performing statistical analysis on the distribution information of the drainage basins in the administrative regions, which is contained in the drainage basin distribution picture, so as to obtain the areas of the drainage basins occupying the administrative regions in the drainage basin distribution picture.
7. The method of any one of claims 1-5, further comprising:
acquiring water system map data and green map data;
and analyzing the water system and the green land distributed in each watershed included in the watershed distribution picture according to the watershed map data, the water system map data and the green land map data to obtain the water system area and the green land area included in each watershed.
8. A generation apparatus of watershed map data, characterized by comprising:
the acquisition module is used for acquiring a watershed distribution picture;
the vectorization module is used for carrying out vectorization processing on the watershed distribution picture to obtain a vectorization result;
the topology processing module is used for carrying out topology processing on the vectorization result to obtain a topology processing result;
the adjusting module is used for adjusting the topological processing result according to the water system contained in each basin in the basin distribution picture to obtain basin distribution geometric data;
the assignment module is used for carrying out attribute field assignment on the topology processing result to obtain the distribution attribute data of the watershed;
and the generation module is used for generating the watershed map data according to the watershed distribution geometric data and the watershed distribution attribute data.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 7.
10. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to implement the method of any of claims 1-7 via execution of the executable instructions.
CN201910160014.2A 2019-03-04 2019-03-04 Method and device for generating drainage basin map data Active CN111651532B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910160014.2A CN111651532B (en) 2019-03-04 2019-03-04 Method and device for generating drainage basin map data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910160014.2A CN111651532B (en) 2019-03-04 2019-03-04 Method and device for generating drainage basin map data

Publications (2)

Publication Number Publication Date
CN111651532A true CN111651532A (en) 2020-09-11
CN111651532B CN111651532B (en) 2024-03-19

Family

ID=72346193

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910160014.2A Active CN111651532B (en) 2019-03-04 2019-03-04 Method and device for generating drainage basin map data

Country Status (1)

Country Link
CN (1) CN111651532B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5574839A (en) * 1994-02-14 1996-11-12 Digital Equipment Corporation Method and apparatus for automatic gap closing in computer aided drawing
CN105320811A (en) * 2015-10-21 2016-02-10 国网山东省电力公司烟台供电公司 Method for establishing topological connected model of urban underground electricity pipe network
CN106708944A (en) * 2016-11-23 2017-05-24 南京师范大学 SWMM modeling-oriented and multi-element-considered method for automatically dividing sub-basins of city regions

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5574839A (en) * 1994-02-14 1996-11-12 Digital Equipment Corporation Method and apparatus for automatic gap closing in computer aided drawing
CN105320811A (en) * 2015-10-21 2016-02-10 国网山东省电力公司烟台供电公司 Method for establishing topological connected model of urban underground electricity pipe network
CN106708944A (en) * 2016-11-23 2017-05-24 南京师范大学 SWMM modeling-oriented and multi-element-considered method for automatically dividing sub-basins of city regions

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
张景扬;卢远;刘斌涛;: "基于Arc Hydro Tools的广西小流域划分研究" *
钟利华;钟仕全;李勇;刘世学;史彩霞;曾鹏;袁丽军;: "广西电网流域面雨量监测、预报、报警系统" *

Also Published As

Publication number Publication date
CN111651532B (en) 2024-03-19

Similar Documents

Publication Publication Date Title
CN108629292B (en) Curved lane line detection method and device and terminal
EP2191233B1 (en) Apparatus and method for updating map data
CN112163251A (en) Building model unitization method and device, storage medium and electronic equipment
CN112348765A (en) Data enhancement method and device, computer readable storage medium and terminal equipment
CN109583345A (en) Roads recognition method, device, computer installation and computer readable storage medium
CN106980851B (en) Method and device for positioning data matrix DM code
CN110909640A (en) Method and device for determining water level line, storage medium and electronic device
CN112541049B (en) High-precision map processing method, apparatus, device, storage medium, and program product
CN110517334A (en) A kind of method and device that map vector data obtains
CN111382223B (en) Electronic map display method, terminal and electronic equipment
CN112597983B (en) Method for identifying target object in remote sensing image and storage medium and system thereof
CN111651532A (en) Method and device for generating drainage basin map data
CN105809189A (en) Time series image processing method
CN109190740A (en) Generation method, device, equipment and the storage medium of subregion gradual change color 2 D code
CN111179428B (en) Ground object manufacturing method and device based on locking plane
CN110458857B (en) Central symmetry primitive detection method and device, electronic equipment and readable storage medium
CN114723792A (en) Method and device for updating land parcel information, electronic equipment and storage medium
CN114022434A (en) Automatic extraction method and system for upper and lower lines of guardrail
CN114048539A (en) CAD file analysis and rule judgment method and related device
CN116774900B (en) Interaction method of electronic map of engineering project management system
CN112902919B (en) Method, device, equipment and storage medium for measuring pipe trench section data
CN107295330B (en) A kind of method and apparatus of marking video frame
CN109671014A (en) From the plait stacking method and Related product to shoot the video
Zhang A congruent hybrid model for conflation of satellite image and road database
CN112927388B (en) Logistics enterprise vehicle management method and system

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