Disclosure of Invention
The embodiment of the invention aims to provide a data storage method and device based on a CASS topographic map, which can automatically generate an attribute table required by standard requirements by reading coding information on the CASS topographic map, effectively save labor force and improve the efficiency and accuracy of data storage of the CASS topographic map.
In order to achieve the above object, an embodiment of the present invention provides a data storage method based on a CASS topographic map, including:
acquiring the CASS topographic map; wherein the CASS topographic map comprises terrain types and corresponding expression attributes of each terrain type; the expression attributes comprise point, line, face and character attributes;
reading CASS codes corresponding to each expression attribute of each terrain type in the CASS terrain map;
acquiring a land type code corresponding to each CASS code according to a preset code comparison table;
and generating a corresponding standard attribute table according to the land type code corresponding to each CASS code so as to obtain a standard attribute table of each expression attribute of each terrain type.
As an improvement of the above scheme, the data entry method further includes:
acquiring an attribute information instruction input by a user, and generating a corresponding attribute information field in the standard attribute table;
and reading corresponding attribute information in the CASS topographic map according to the attribute information field, and adding the attribute information to the standard attribute table.
As an improvement of the above scheme, the attribute information instruction includes a standard format requirement corresponding to each of the attribute information; wherein the standard format requirements comprise type and length requirements, attribute value range requirements and constraint conditions;
then, the reading, according to the attribute information field, corresponding attribute information in the CASS topographic map and adding the attribute information to the standard attribute table specifically includes:
reading corresponding attribute information in the CASS topographic map according to the attribute information field;
and converting the attribute information into attribute data meeting the standard format requirement, and adding the attribute data into the standard attribute table.
As an improvement of the above, the attribute information includes: and the land codes correspond to data names, elevations, data sources and update dates.
As an improvement of the above scheme, after the acquiring the CASS topographic map, the method further includes:
judging whether topology intersection exists between the terrain types in the CASS terrain map;
and when judging that topology intersection exists between any two terrain types, sending an error prompt page, receiving a first calibration instruction input by a user, and calibrating the CASS terrain map.
As an improvement of the above solution, after the generating a corresponding standard attribute table according to the land type code corresponding to each CASS code to obtain a standard attribute table of each expression attribute of each terrain type, the method further includes:
judging whether a second calibration instruction input by a user is received; wherein the second calibration instruction includes correction information for the locale encoding or the attribute data in the standard attribute table;
and when the second calibration instruction is judged to be received, correcting the land type codes or the attribute data in the standard attribute table according to the correction information.
As an improvement of the above solution, after the correcting the land type code or the attribute data in the standard attribute table according to the correction information, the method further includes:
and updating the code comparison table according to the correction information of the land code.
The embodiment of the invention also provides a data storage device based on the CASS topographic map, which comprises a map acquisition module, a code reading module, a code comparison module and a form generation module; wherein,
the map acquisition module is used for acquiring the CASS topographic map; wherein the CASS topographic map comprises terrain types and corresponding expression attributes of each terrain type; the expression attributes comprise point, line, face and character attributes;
the code reading module is used for reading CASS codes corresponding to each expression attribute of each terrain type in the CASS terrain map;
the code comparison module is used for acquiring a land type code corresponding to each CASS code according to a preset code comparison table;
and the table generating module is used for generating a corresponding standard attribute table according to the land type code corresponding to each CASS code so as to obtain a standard attribute table of each expression attribute of each terrain type.
As an improvement of the above scheme, the system further comprises an instruction acquisition module and a table updating module:
the instruction acquisition module is used for acquiring an attribute information instruction input by a user and generating a corresponding attribute information field in the standard attribute table;
and the table updating module is used for reading corresponding attribute information in the CASS topographic map according to the attribute information field and adding the attribute information to the standard attribute table.
The embodiment of the present invention further provides a data storage device based on a CASS topographic map, which is characterized by comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the data storage device implements the CASS topographic map based data storage method as described in any one of the above items.
Compared with the prior art, the data storage method and device based on the CASS topographic map, disclosed by the invention, can be used for acquiring the CASS code corresponding to each expression attribute of each topographic type in the CASS topographic map by pre-establishing the code comparison table, and acquiring the corresponding land code according to the code comparison table, so as to generate the standard attribute table corresponding to each expression attribute of each topographic type. By reading the coding information on the CASS topographic map, the attribute table required by the standard requirement is automatically generated, manual searching and inputting are not needed, the labor force is effectively saved, and meanwhile, the efficiency and the accuracy of data storage of the CASS topographic map are improved.
Detailed Description
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 only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flow chart illustrating steps of a data storage method based on a CASS topographic map according to an embodiment of the present invention. The data storage method based on the CASS topographic map provided by the first embodiment of the present invention is executed through steps S11 to S14:
s11, acquiring the CASS topographic map; wherein the CASS topographic map comprises terrain types and corresponding expression attributes of each terrain type; wherein the expression attributes comprise point, line, face and character attributes.
The CASS topographic map mapped by the CASS software is divided into eight types of landforms including data base, water system, residential area, traffic, pipeline, country, landform and vegetation, and each type of landform includes 4 expression attributes including points, characters, lines and faces. The CASS topographic map can be automatically acquired by establishing a data transmission interface for acquiring the CASS topographic map, and related data such as the terrain types stored in the CASS topographic map and the corresponding expression attributes of each terrain type are read; the beneficial effects of the invention are not affected by the fact that the CASS topographic map can be manually imported by a user and then the relevant data stored in the CASS topographic map is read.
S12, reading CASS codes corresponding to each expression attribute of each terrain type in the CASS terrain map.
Each expression attribute under each terrain type is provided with a plurality of CASS codes which are correspondingly generated, and 32 CASS code groups corresponding to four expression attributes of eight terrain types can be obtained by reading the CASS terrain map. The CASS code is automatically generated by the CASS software based on the CASS topographic map, and the coding habit of the CASS software is different from the standard land code of a national resource hall.
And S13, acquiring the land type code corresponding to each CASS code according to a preset code comparison table.
And storing a mapping relation between the CASS code generated by the CASS software and the land code of the homeland resource hall by presetting a code comparison table. And automatically acquiring and storing the corresponding land type codes in the code comparison table through each read CASS code.
For example, when the CASS topographic map is a guangdong topographic map, the code comparison table is constructed by the land codes of the corresponding guangdong national soil resource hall in the "classification code and attribute table of the basic geographic information elements of guangdong province".
And S14, generating a corresponding standard attribute table according to the land type code corresponding to each CASS code, so as to obtain a standard attribute table of each expression attribute of each terrain type.
And generating a corresponding standard attribute table for the land type codes under each expression attribute of each terrain type, wherein the standard attribute table is a dbf format file and comprises a code attribute field, and generating corresponding land type codes under the code attribute field in sequence.
In the actual application of the warehousing standard, the expression attribute of the terrain type 'face' of the 'data base' does not need to be warehoused, so that 31 standard attribute tables in the dbf format are finally generated.
In the data storage method based on the CASS topographic map, provided by the embodiment of the invention, a CASS code corresponding to each expression attribute of each topographic type in the CASS topographic map is obtained, and a corresponding land type code is obtained according to a pre-established code comparison table, so that a standard attribute table corresponding to each expression attribute of each topographic type is generated. By reading the coding information on the CASS topographic map, the attribute table required by the standard requirement is automatically generated, manual searching and inputting are not needed, the labor force is effectively saved, and meanwhile, the efficiency and the accuracy of data storage of the CASS topographic map are improved.
Fig. 2 is a schematic flow chart illustrating steps of a data storage method based on a CASS topographic map according to a second embodiment of the present invention. On the basis of the first embodiment, the data entry method based on the CASS topographic map according to the second embodiment of the present invention is performed through steps S21 to S26:
s21, acquiring the CASS topographic map; wherein the CASS topographic map comprises terrain types and corresponding expression attributes of each terrain type; wherein the expression attributes comprise point, line, face and character attributes.
S22, reading CASS codes corresponding to each expression attribute of each terrain type in the CASS terrain map.
And S23, acquiring the land type code corresponding to each CASS code according to a preset code comparison table.
And S24, generating a corresponding standard attribute table according to the land type code corresponding to each CASS code, so as to obtain a standard attribute table of each expression attribute of each terrain type.
In this embodiment, the execution process of steps S21 to S24 is similar to that of steps S11 to S14 in the first embodiment, and will not be described again.
And S25, acquiring an attribute information instruction input by a user, and generating a corresponding attribute information field in the standard attribute table.
And S26, reading corresponding attribute information in the CASS topographic map according to the attribute information field, and adding the attribute information to the standard attribute table.
And acquiring an attribute information instruction input by a user according to the requirement of the user on the warehousing data, wherein the attribute information instruction is used for controlling the standard attribute table to generate a corresponding attribute information field. And reading corresponding attribute information in the CASS topographic map, and adding the attribute information to corresponding positions under each attribute information field in the standard attribute table.
Preferably, the attribute information includes, but is not limited to: the data name, the elevation, the data source and the updating date corresponding to the land code, and the attribute information and the land code have a corresponding relation.
By acquiring the attribute information instruction input by the user and controlling the generated attribute information required by the standard attribute table according to the requirement of the user on the warehousing data, the requirement of the user can be better met, and the flexibility of the content of the standard attribute table is improved.
It can be understood that, when the requirements of the user on the attribute information of each standard attribute table are uniform, the attribute information field required to be generated by each standard attribute table can be preset, the corresponding attribute information in the CASS topographic map can be automatically read through the preset attribute information field and added into the standard attribute table, and then the land type code and other attribute information can be synchronously generated in the standard attribute table without acquiring the attribute information instruction input by the user, so that the efficiency of generating the standard attribute table is improved, and the beneficial effects obtained by the invention are not affected.
Preferably, the attribute information instruction further includes a standard format requirement corresponding to each of the attribute information; wherein the standard format requirements comprise type and length requirements, attribute value range requirements and constraint conditions;
step S26, namely, according to the attribute information field, reading corresponding attribute information in the CASS topographic map, and adding the attribute information to the standard attribute table, specifically including:
s261, reading corresponding attribute information in the CASS topographic map according to the attribute information field;
and S262, converting the attribute information into attribute data meeting the standard format requirement, and adding the attribute data into the standard attribute table.
The attribute information instruction may further include a definition of a standard format, such as a type and a length of each attribute information, an attribute value range, and a constraint. For example, the type and length requirement of the attribute information of elevation corresponding to the land code is set to be a floating point type (4,2), the attribute value range requirement is set to be-200 to 8884.13, the constraint condition is a type C, the type and length requirement of the attribute information of the data name is set to be a character type (60), the type and length requirement of the attribute information of the data source is set to be a character type (10), the type and length requirement of the attribute information of the update date is set to be a date type and the like, after the attribute information corresponding to the CASS topographic map is read, the attribute information is converted according to the standard format requirement to obtain the attribute data meeting the standard format requirement, and the attribute data is added to the corresponding position of the attribute information field in the standard attribute table.
For example, when a standard attribute table, i.e. a line of a feature, is generated, a plurality of CASS codes corresponding to the line of the feature on the CASS topographic map are read, converted into corresponding land type codes through the code comparison table, and stored under a code attribute field in the standard attribute table. And generating corresponding data name attribute fields, elevation attribute fields, data source attribute fields and update date attribute fields in the standard attribute table through attribute information instructions for generating data names, elevations, data sources and update dates input by a user, acquiring corresponding attribute information through a CASS topographic map, converting the attribute information into attribute data meeting the corresponding standard format requirements, and adding the attribute data into the attribute table. The standard attribute table of the lines of the features, i.e. the features lines, can be obtained.
Encoding
|
Data name
|
Elevation (L)
|
Data source
|
Date of renewal
|
71010120
|
Contour line (head curve)
|
14.00
|
Survey data
|
20190317
|
71010120
|
Contour line (head curve)
|
16.00
|
Survey data
|
20190317
|
71010120
|
Contour line (head curve)
|
8.50
|
Survey data
|
20190317
|
71010120
|
Contour line (head curve)
|
8.00
|
Survey data
|
20190317
|
71010120
|
Contour line (head curve)
|
10.50
|
Survey data
|
20190317
|
71010220
|
Contour line (measuring curve)
|
10.00
|
Survey data
|
20190317 |
Correspondingly, the standard format requirement corresponding to each attribute information may also be preset for each attribute information, and attribute instruction information input by a user does not need to be acquired, so as to improve the efficiency of generating the standard attribute table.
In the data storage method based on the CASS topographic map, provided by the embodiment of the invention, the CASS code corresponding to each expression attribute of each topographic type in the CASS topographic map is obtained, and the corresponding land type code is obtained according to the pre-established code comparison table, so that the standard attribute table corresponding to each expression attribute of each topographic type is generated. And generating corresponding attribute information fields in the standard attribute table by acquiring an attribute information instruction input by a user, and adding corresponding attribute data to perfect the data information of the standard attribute table. By reading the coding information and other attribute information on the CASS topographic map, the attribute table required by the standard requirement is automatically generated, manual searching, inputting and adding are not needed, labor force is effectively saved, and meanwhile the efficiency and the accuracy of data storage of the CASS topographic map are improved.
Fig. 3 is a schematic flow chart illustrating steps of a data storage method based on a CASS topographic map according to a third embodiment of the present invention. On the basis of the second embodiment, the data storage method based on the CASS topographic map provided by the third embodiment of the present invention is executed through steps S31 to S37:
s31, acquiring the CASS topographic map; wherein the CASS topographic map comprises terrain types and corresponding expression attributes of each terrain type; wherein the expression attributes comprise point, line, face and character attributes.
In this embodiment, the execution process of step S31 is similar to that of step S21 in the second embodiment, and is not repeated here.
S32, judging whether topology intersection exists among the terrain types in the CASS terrain map; and when judging that topology intersection exists between any two terrain types, sending an error prompt page, receiving a first calibration instruction input by a user, and calibrating the CASS terrain map.
And after the CASS topographic map is obtained, a data calibration link is also provided, and whether topology intersection exists between any two topographic types is judged by intelligently identifying each topographic type on the CASS topographic map. And if the topology intersection exists between any terrain types, judging that the CASS terrain map is wrong, and sending an error prompt page to remind a user of calibration. And calibrating and updating the CASS topographic map by accepting a first calibration instruction input by a user. By implementing the technical scheme, the accuracy of the data information on the CASS topographic map is improved, so that the accuracy of the content of the subsequently generated standard attribute table is further improved.
S33, reading CASS codes corresponding to each expression attribute of each terrain type in the CASS terrain map.
And S34, acquiring the land type code corresponding to each CASS code according to a preset code comparison table.
And S35, generating a corresponding standard attribute table according to the land type code corresponding to each CASS code, so as to obtain a standard attribute table of each expression attribute of each terrain type.
And S36, acquiring an attribute information instruction input by a user, and generating a corresponding attribute information field in the standard attribute table.
And S37, reading corresponding attribute information in the CASS topographic map according to the attribute information field, and adding the attribute information to the standard attribute table.
In this embodiment, the execution process of steps S33 to S37 is similar to that of steps S22 to S26 in the second embodiment, and will not be described again.
Further, referring to fig. 3, a data warehousing method based on CASS topographic maps according to a third embodiment of the present invention further includes, after step S37, steps S38 to S39:
s38, judging whether a second calibration instruction input by a user is received or not; wherein the second calibration instruction includes correction information for the locale encoding or the attribute data in the standard attribute table; and when the second calibration instruction is judged to be received, correcting the land type codes or the attribute data in the standard attribute table according to the correction information.
After the standard attribute table for each expression attribute for each terrain type is generated, further examination and calibration by the user is required. And after the user passes the check, sending a second calibration instruction aiming at the wrong place class code or wrong attribute data in the standard attribute table. And after the second calibration instruction of the user is judged to be received, correcting the geographical code or the attribute data in the standard attribute table according to the correction information in the second calibration instruction, thereby further improving the accuracy of the data in the standard attribute table.
And S39, updating the code comparison table according to the correction information of the land code.
And after judging that a second calibration instruction of a user is received, if the second calibration instruction comprises correction information of the land code, the preset coding comparison table is considered to be wrong, and the coding comparison table is updated according to the correction information of the land code, so that the coding comparison table is continuously fed back and corrected, and the accuracy of the coding comparison table is improved.
In the data storage method based on the CASS topographic map, provided by the third embodiment of the present invention, a CASS code corresponding to each expression attribute of each topographic type in the CASS topographic map is obtained, and a corresponding land type code is obtained according to a pre-established code comparison table, so as to generate a standard attribute table corresponding to each expression attribute of each topographic type. And generating corresponding attribute information fields in the standard attribute table by acquiring an attribute information instruction input by a user, and adding corresponding attribute data to perfect the data information of the standard attribute table. In addition, by acquiring a calibration instruction of a user, the CASS topographic map is calibrated before the standard attribute table is generated, and the content of the standard attribute table is checked after the standard attribute table is generated. By reading the coding information and other attribute information on the CASS topographic map, the attribute table required by the standard requirement is automatically generated, manual searching, inputting and adding are not needed, labor force is effectively saved, and meanwhile the efficiency and the accuracy of data storage of the CASS topographic map are improved. Through a plurality of times of checking and calibration, the accuracy of the standard attribute table is improved.
Fig. 4 is a schematic structural diagram of a data storage device based on a CASS topographic map according to a fourth embodiment of the present invention. The data storage device 40 based on the CASS topographic map, provided by the fourth embodiment of the present invention, includes a map obtaining module 41, a code reading module 42, a code comparing module 43, and a table generating module 44;
the map obtaining module 41 is configured to obtain the CASS topographic map; wherein the CASS topographic map comprises terrain types and corresponding expression attributes of each terrain type; wherein the expression attributes comprise point, line, face and character attributes.
The code reading module 42 is configured to read a CASS code corresponding to each expression attribute of each terrain type in the CASS terrain map.
The code comparison module 43 is configured to obtain a land code corresponding to each CASS code according to a preset code comparison table.
The table generating module 44 is configured to generate a corresponding standard attribute table according to the land type code corresponding to each CASS code, so as to obtain a standard attribute table of each expression attribute of each terrain type.
Preferably, the data warehousing device 40 based on the CASS topographic map according to the fourth embodiment of the present invention further includes an instruction obtaining module 45 and a table updating module 46:
the instruction obtaining module 45 is configured to obtain an attribute information instruction input by a user, and generate a corresponding attribute information field in the standard attribute table.
And the table updating module 46 is configured to read corresponding attribute information in the CASS topographic map according to the attribute information field, and add the attribute information to the standard attribute table.
It should be noted that, the data entry apparatus based on the CASS topographic map according to the embodiment of the present invention is used to execute all the process steps of the data entry method based on the CASS topographic map according to the second or third embodiment, and the working principles and beneficial effects of the two are in one-to-one correspondence, and thus are not described again.
In the data storage device based on the CASS topographic map, provided by the fourth embodiment of the present invention, a CASS code corresponding to each expression attribute of each topographic type in the CASS topographic map is obtained, and a corresponding land type code is obtained according to a pre-established code comparison table, so as to generate a standard attribute table corresponding to each expression attribute of each topographic type. And generating corresponding attribute information fields in the standard attribute table by acquiring an attribute information instruction input by a user, and adding corresponding attribute data to perfect the data information of the standard attribute table. By reading the coding information and other attribute information on the CASS topographic map, the attribute table required by the standard requirement is automatically generated, manual searching, inputting and adding are not needed, labor force is effectively saved, and meanwhile the efficiency and the accuracy of data storage of the CASS topographic map are improved.
Fig. 5 is a schematic structural diagram of a data warehousing device 50 based on CASS topographic maps according to a fifth embodiment of the present invention. The CASS topographic map based data warehousing device 50 includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor executes the computer program to implement the CASS topographic map based data warehousing method according to the embodiment.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-only memory (ROM), a Random Access Memory (RAM), or the like.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.