Automatic processing method, system and terminal for map data conversion

By initializing the CAD graph and converting the format, the problem that CAD graph cannot be directly converted to GeoJson format is solved, automatic conversion of map data is realized, and the efficiency of map production is improved.

CN119829652APending Publication Date: 2025-04-15XIAN ZHENYOU XINTONG TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411601613.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

In WebGIS development, CAD maps cannot be directly converted to GeoJson format, resulting in reduced map production efficiency.

Method used

By obtaining the initial CAD file, initializing the file and saving it as the first format, loading it into the line conversion tool for format conversion, obtaining the source layer, traversing and converting geometric data, exporting it as a vector layer of the target file, and exporting it to the target path according to the export properties set by the user.

Benefits of technology

It realizes automatic conversion of CAD maps to GeoJson format, improves the convenience of automatic conversion of map data and improves the efficiency of map production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829652A_ABST
    Figure CN119829652A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic processing method and system for map data conversion and a terminal. The method comprises the steps that an initial file is stored after being initialized; according to the saving path, loading the file in the first format into a turning tool, outputting a target file, and obtaining a source layer of the initial file; traversing all the geometric data, performing conversion processing by using a preset function pair to obtain target geometric data, exporting the target geometric data in a second format, and assigning the target geometric data to a vector layer; and exporting the target geometric data in the vector layer to the target path according to the export attribute. According to the method, after the map data is initialized, the projection coordinate system is used as a medium, and the related data is assigned to the newly constructed vector layer and exported in the target format, so that automatic conversion of the map data is realized, and the convenience of automatic conversion of the map data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of map data conversion, and in particular to an automatic processing method, system, terminal and computer-readable storage medium for map data conversion. Background Art

[0002] In the development of WebGIS (Web Geographic Information System), some common geometric calculations and GIS (Geographic Information System) spatial analysis functions are often used, such as the distance from a point to a line, the relationship between a point and a polygon, area calculation, buffer analysis and shortest path analysis, etc., which will provide better flexibility.

[0003] However, during the project development process, CAD (Computer Aided Design, a professional mapping software) drawings cannot be directly converted into GeoJson (JavaScript Object Notation, a JSON-based geographic spatial information data exchange format) file types that conform to WebGIS development. This reduces the efficiency of map production during the development process using WebGIS.

[0004] Therefore, the prior art still needs to be improved and developed. Summary of the invention

[0005] The main purpose of the present invention is to provide an automatic processing method, system, terminal and computer-readable storage medium for map data conversion, aiming to solve the problem in the prior art that when using WebGIS for development, CAD drawings cannot be directly converted into GeoJson format, thereby reducing the efficiency of the mapping process.

[0006] To achieve the above object, the present invention provides an automatic processing method for map data conversion, the automatic processing method for map data conversion comprising the following steps:

[0007] Acquire an initial file, perform initialization processing on the initial file and save it, and obtain a file in a first format and a saving path;

[0008] According to the saving path, the file in the first format is loaded into the conversion tool, the target file after the format conversion is output, and the source layer of the initial file is obtained;

[0009] Traversing all the geometric data in the source layer, converting all the geometric data using a preset function to obtain target geometric data, exporting the target geometric data in a second format, and assigning the target geometric data to the vector layer of the target file;

[0010] The export attribute and the target path set by the user are obtained, and the target geometric data in the vector layer is exported to the target path according to the export attribute using a driving tool.

[0011] Optionally, the automatic processing method for map data conversion, wherein the obtaining of the initial file, initializing the initial file and then saving it to obtain the file in the first format and the saving path, specifically includes:

[0012] Acquire an initial file, and use the connected data conversion library to initialize the initial file to obtain a file in a first format;

[0013] The file in the first format is stored to obtain a saving path of the file in the first format.

[0014] Optionally, the automatic processing method for map data conversion, wherein the step of loading the file in the first format into a conversion tool according to the saving path, outputting a target file after format conversion, and obtaining a source layer of the initial file, specifically includes:

[0015] Loading the file in the first format into the conversion tool through the saving path, and obtaining the target file output by the conversion tool;

[0016] The conversion tool determines the file format of the target file according to the saving path, and constructs the target file according to the file format;

[0017] A plurality of source data features of the initial file are obtained, and a source layer of the initial file is obtained according to all the source data features.

[0018] Optionally, the automatic processing method for map data conversion, wherein the step of loading the file in the first format into a conversion tool according to the saving path, outputting a target file after format conversion, and obtaining a source layer of the initial file, further comprises:

[0019] Construct a projection coordinate system, and randomly set a coordinate point in the source layer as the origin;

[0020] The source layer is projected into the projected coordinate system according to the origin.

[0021] Optionally, the automatic processing method for map data conversion, wherein the traversing all the geometric data in the source layer, converting all the geometric data using a preset function to obtain target geometric data, exporting the target geometric data in a second format, and assigning the target geometric data to the vector layer of the target file, specifically includes:

[0022] Traversing all the geometric data in the source layer, and acquiring multiple spatial attribute features of the initial file according to all the geometric data;

[0023] Performing conversion processing on each of the spatial attribute features to obtain corresponding target spatial attribute features;

[0024] According to the quantity of the geometric data, construct a corresponding quantity of target geometric data, and assign the corresponding target spatial attribute features to the corresponding target geometric data;

[0025] exporting all the target geometric data in a second format using a data conversion library;

[0026] A vector layer of the target file is created, and all the target geometric data are assigned to the new vector layer according to the source layer in the projection coordinate system.

[0027] Optionally, in the automatic processing method for map data conversion, the horizontal coordinate of the target geometric data is the longitude information of the corresponding target spatial attribute feature, and the vertical coordinate of the target geometric data is the dimensional information of the corresponding target spatial attribute feature.

[0028] Optionally, in the automatic processing method for map data conversion, the derived attributes include: point feature attributes, line feature attributes and surface feature attributes, and the target geometric data includes: point feature data, line feature data and surface feature data;

[0029] The obtaining of the export attribute and the target path set by the user, and using the driving tool to export the target geometric data in the vector layer to the target path according to the export attribute, specifically includes:

[0030] Acquire the point feature attribute, the line feature attribute or the surface feature attribute input by the user, and acquire the target path set by the user;

[0031] According to the point feature attributes, the line feature attributes or the surface feature attributes input by the user, the point feature data, the line feature data or the surface feature data in the vector layer are integrated to obtain a target file, and the target file is exported to the target path.

[0032] In addition, to achieve the above-mentioned purpose, the present invention further provides an automatic processing system for map data conversion, wherein the automatic processing system for map data conversion comprises:

[0033] A file preprocessing module, used for obtaining an initial file, performing initialization processing on the initial file and then saving it, to obtain a file in a first format and a saving path;

[0034] A layer acquisition module, used for loading the file in the first format into the conversion tool according to the saving path, outputting the target file after the format conversion, and acquiring the source layer of the initial file;

[0035] A layer conversion module, used for traversing all geometric data in the source layer, converting all the geometric data using a preset function to obtain target geometric data, exporting the target geometric data in a second format, and assigning the target geometric data to the vector layer of the target file;

[0036] The layer export module is used to obtain the export properties and target path set by the user, and use the driving tool to export the target geometric data in the vector layer to the target path according to the export properties.

[0037] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and an automatic processing program for map data conversion stored in the memory and executable on the processor, and when the automatic processing program for map data conversion is executed by the processor, the steps of the automatic processing method for map data conversion as described above are implemented.

[0038] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores an automatic processing program for map data conversion, and when the automatic processing program for map data conversion is executed by a processor, the steps of the automatic processing method for map data conversion as described above are implemented.

[0039] In the present invention, an initial file is obtained, the initial file is initialized and then saved to obtain a file in a first format and a saving path; according to the saving path, the file in the first format is loaded into a conversion tool, a target file after format conversion is output, and a source layer of the initial file is obtained; all geometric data in the source layer are traversed, all the geometric data are converted using a preset function to obtain target geometric data, the target geometric data is exported in a second format, and assigned to the vector layer of the target file; the export properties and target path set by the user are obtained, and a driving tool is used to export the target geometric data in the vector layer to the target path according to the export properties. The present invention initializes the map data, assigns the relevant data to the newly constructed vector layer using the projection coordinate system as the medium, and exports it in the target format, thereby realizing the automatic conversion of map data and improving the convenience of automatic conversion of map data. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is a flow chart of a preferred embodiment of the automatic processing method for map data conversion of the present invention;

[0041] Figure 2 The flowchart of the preferred embodiment of the automatic processing method for map data conversion of the present invention is as follows

[0042] Figure 3 It is a structural diagram of a preferred embodiment of the automatic processing system for map data conversion of the present invention;

[0043] Figure 4 Schematic diagram of the operating environment of a preferred embodiment of the terminal of the present invention. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0045] Through CAD software, users can easily modify and edit drawings, such as adding, deleting, moving, rotating, scaling objects, etc., and can also adjust properties such as layers, colors, and line types. However, since the files generated by CAD drawings are too large, if the CAD files are sent directly, the sending time will be too long, and there are also security issues with the files. The other party also needs to spend a lot of time to open the files, so it is necessary to convert the CAD files into GeoJson format; but CAD files cannot be directly converted into Geojson files, so a method for automatically processing map data conversion is needed.

[0046] The automatic processing method for map data conversion described in the preferred embodiment of the present invention is as follows: Figure 1 As shown, the automatic processing method for map data conversion includes the following steps:

[0047] Step S10: obtaining an initial file, initializing the initial file and saving it, to obtain a file in a first format and a saving path.

[0048] First, use the data conversion tool to perform initial conversion on the acquired initial file (CAD file). Here we need to use GDAL (Geospatial Data Abstraction Library, an open source raster spatial data conversion library under the X / MIT license agreement), and use the abstract data model to output various file formats. This function is implemented through a series of command line tools.

[0049] Specifically, an initial file is obtained, and the initial file is initialized using a connected data conversion library to obtain a file in a first format; the file in the first format is stored to obtain a saving path of the file in the first format.

[0050] Among them, the acquired initial file is initially converted through the data conversion library to obtain a CAD file in the dwg format (i.e., the file in the first format), thereby improving the flexibility of subsequent conversion of the initial CAD file, reducing the time of subsequent file conversion, and thus improving the efficiency of file conversion.

[0051] Step S20: according to the saving path, load the file in the first format into the conversion tool, output the target file after the format conversion, and obtain the source layer of the initial file.

[0052] Among them, after the initial CAD file is initially converted, the corresponding conversion file is found through the save path and converted again, and finally a dxf file (target file) that can be used for layer operations is obtained, and the source layer of the initial first format file is obtained at the same time.

[0053] Specifically, the file in the first format is loaded into the conversion tool through the save path, and the target file output by the conversion tool is obtained; wherein the conversion tool determines the file format of the target file according to the save path, and constructs the target file according to the file format; obtains multiple source data features of the initial file, and obtains the source layer of the initial file based on all the source data features.

[0054] Among them, through the initial save path of the CAD file, the CAD file in the dwg format (i.e., the file in the first format) is found, and a function (such as LoadOptions, a function used to define asynchronous loading option data) is used to load the CAD file in the dwg format into the abstract data model, and a CAD graphics processing control (i.e., CADImage) is used to create a corresponding object of the Image subclass and save it as a dxf file (target file), and then output through the abstract data model and saved to obtain the corresponding save path; at the same time, the basic data source of the geographic data in the initial file is obtained, and the source layer is constructed based on these basic data sources.

[0055] Furthermore, a projection coordinate system is constructed, and a coordinate point is randomly set in the source layer as an origin; based on the origin, the source layer is projected into the projection coordinate system.

[0056] Among them, since the CAD file has no coordinate system, it is necessary to randomly set a coordinate origin in the source layer, so as to use it as a control point for map alignment and improve the accuracy of map data conversion.

[0057] Step S30, traverse all the geometric data in the source layer, use a preset function to convert all the geometric data to obtain target geometric data, export the target geometric data in a second format, and assign it to the vector layer of the target file.

[0058] The data in the source layer is converted to the newly created vector layer through coordinate system registration, thereby realizing the conversion of the CAD file.

[0059] Specifically, all the geometric data in the source layer are traversed, and multiple spatial attribute features of the initial file are obtained according to all the geometric data; each of the spatial attribute features is converted to obtain a corresponding target spatial attribute feature; according to the number of the geometric data, a corresponding number of target geometric data are constructed, and the corresponding target spatial attribute features are assigned to the corresponding target geometric data; all the target geometric data are exported in a second format using a data conversion library; a vector layer of the target file is created, and according to the source layer in the projection coordinate system, all the target geometric data are assigned to the new vector layer.

[0060] Among them, Figure 2 As shown, firstly, the geometric data in the source layer is traversed to obtain the spatial attributes of the geometric data (for example, point, line and surface), and these spatial attributes are converted into coordinates with data characteristics. The converted coordinates should be in the format of [longitude, latitude] ([longitude information, latitude information]), which complies with the GeoJSON specification; then, the target geometric data of the corresponding data is constructed, and the geometric function (for example, Geometry.CreateFromJson function) is used to assign the converted coordinates to the target geometric data, and it is exported in json format and assigned to the vector layer created according to the target file. This process is achieved by transferring the attributes of the projection coordinate system, which improves the accuracy of the assignment, thereby improving the accuracy of the final map data conversion.

[0061] Furthermore, the horizontal coordinate of the target geometric data is the longitude information of the corresponding target spatial attribute feature, and the vertical coordinate of the target geometric data is the dimension information of the corresponding target spatial attribute feature.

[0062] The creation of the vector layer is achieved through the following code:

[0063] using ESRI.ArcGIS.Carto;

[0064] using ESRI.ArcGIS.Geometry;

[0065] using ESRI.ArcGIS.Geodatabase;

[0066] Assume that axMapControl is the map control and sdeWorkspaceFactory is the SDE workspace factory:

[0067] IMap pMap=axMapControl.Map;

[0068] IWorkspace pWorkspace;

[0069] IFeatureLayer pFeatureLayer;

[0070] IFeatureClass pFeatureClass;

[0071] Set the SDE connection properties:

[0072] sdeWorkspaceFactory.ConnectionProperties=["server=myServer;

[0073] instance=myInstance; user=myUsername; password=myPassword;

[0074] version = mySdeVersion"];

[0075] Open the SDE workspace:

[0076] pWorkspace=sdeWorkspaceFactory.Open(featureDatasetName,0);

[0077] Open the feature class;

[0078] pFeatureClass=

[0079] pWorkspace.OpenFeatureClass(featureClassName);

[0080] Create a new feature layer:

[0081] pFeatureLayer=new FeatureLayerClass();

[0082] pFeatureLayer.FeatureClass=pFeatureClass;

[0083] pFeatureLayer.Name=pFeatureClass.AliasName;

[0084] Add to map:

[0085] pMap.AddLayer(pFeatureLayer);

[0086] axMapControl.ActiveView.Refresh().

[0087] Step S40: Obtain the export attributes and target path set by the user, and use a driving tool to export the target geometric data in the vector layer to the target path according to the export attributes.

[0088] The derived attributes include: point feature attributes, line feature attributes and surface feature attributes, and the target geometric data includes: point feature data, line feature data and surface feature data.

[0089] Specifically, the point feature attributes, the line feature attributes or the surface feature attributes input by the user are obtained, and the target path set by the user is obtained; according to the point feature attributes, the line feature attributes or the surface feature attributes input by the user, the point feature data, the line feature data or the surface feature data in the vector layer are integrated to obtain a target file, and the target file is exported to the target path.

[0090] Among them, after the final conversion of the CAD file is completed (that is, converted to Geojson format), the export properties of the file are set according to the user (that is, the type of features that the user needs to export):

[0091] exported_properties=['id','name','type','timestamp','area'];

[0092] Then the corresponding feature type is exported as a Geojson file (target file), and the storage path of the exported file (i.e., the target path) is output, finally realizing the process of converting the initial CAD file into a Geojson file, realizing the automatic conversion of map data, reducing the time required to wait for data conversion during the development process, and improving the user's work efficiency and usage experience.

[0093] The present invention initializes the map data, assigns the relevant data to the newly constructed vector layer with the projection coordinate system as the medium, and exports it in the target format, thereby realizing the automatic conversion of the map data and improving the convenience of the automatic conversion of the map data.

[0094] Furthermore, if Figure 3 As shown, based on the above-mentioned automatic processing method for map data conversion, the present invention also provides an automatic processing system for map data conversion, wherein the automatic processing system for map data conversion includes:

[0095] The file preprocessing module 51 is used to obtain an initial file, perform initialization processing on the initial file and save it to obtain a file in a first format and a saving path;

[0096] The layer acquisition module 52 is used to load the file in the first format into the conversion tool according to the saving path, output the target file after the format conversion, and obtain the source layer of the initial file;

[0097] A layer conversion module 53 is used to traverse all geometric data in the source layer, convert all the geometric data using a preset function to obtain target geometric data, export the target geometric data in a second format, and assign it to the vector layer of the target file;

[0098] The layer export module 54 is used to obtain the export properties and target path set by the user, and use the driving tool to export the target geometric data in the vector layer to the target path according to the export properties.

[0099] Furthermore, if Figure 4 As shown, based on the above-mentioned automatic processing method and system for map data conversion, the present invention also provides a terminal accordingly, and the terminal includes a processor 10, a memory 20 and a display 30. Figure 4 Only some components of the terminal are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0100] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Further, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed in the terminal, such as the program code of the installation terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, the memory 20 stores an automatic processing program 40 for map data conversion, which can be executed by the processor 10, thereby realizing the automatic processing method for map data conversion in the present application.

[0101] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code or process data stored in the memory 20, such as executing the automatic processing method for converting the map data.

[0102] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 30 is used to display information on the terminal and to display a visual user interface. The components 10-30 of the terminal communicate with each other via a system bus.

[0103] In one embodiment, when the processor 10 executes the automatic processing program 40 for map data conversion in the memory 20, the following steps are implemented:

[0104] Acquire an initial file, perform initialization processing on the initial file and save it, and obtain a file in a first format and a saving path;

[0105] According to the saving path, the file in the first format is loaded into the conversion tool, the target file after the format conversion is output, and the source layer of the initial file is obtained;

[0106] Traversing all the geometric data in the source layer, converting all the geometric data using a preset function to obtain target geometric data, exporting the target geometric data in a second format, and assigning the target geometric data to the vector layer of the target file;

[0107] The export attribute and the target path set by the user are obtained, and the target geometric data in the vector layer is exported to the target path according to the export attribute using a driving tool.

[0108] The step of obtaining an initial file, initializing the initial file and then saving it to obtain a file in a first format and a saving path specifically includes:

[0109] Acquire an initial file, and use the connected data conversion library to initialize the initial file to obtain a file in a first format;

[0110] The file in the first format is stored to obtain a saving path of the file in the first format.

[0111] The step of loading the file in the first format into the conversion tool according to the saving path, outputting the target file after the format conversion, and obtaining the source layer of the initial file specifically includes:

[0112] Loading the file in the first format into the conversion tool through the saving path, and obtaining the target file output by the conversion tool;

[0113] The conversion tool determines the file format of the target file according to the saving path, and constructs the target file according to the file format;

[0114] A plurality of source data features of the initial file are obtained, and a source layer of the initial file is obtained according to all the source data features.

[0115] The method further comprises: loading the file in the first format into a conversion tool according to the saving path, outputting a target file after format conversion, and obtaining a source layer of the initial file, and then:

[0116] Construct a projection coordinate system, and randomly set a coordinate point in the source layer as the origin;

[0117] The source layer is projected into the projected coordinate system according to the origin.

[0118] The traversing of all the geometric data in the source layer, converting all the geometric data using a preset function to obtain target geometric data, exporting the target geometric data in a second format, and assigning the target geometric data to the vector layer of the target file specifically includes:

[0119] Traversing all the geometric data in the source layer, and acquiring multiple spatial attribute features of the initial file according to all the geometric data;

[0120] Performing conversion processing on each of the spatial attribute features to obtain corresponding target spatial attribute features;

[0121] According to the quantity of the geometric data, construct a corresponding quantity of target geometric data, and assign the corresponding target spatial attribute features to the corresponding target geometric data;

[0122] exporting all the target geometric data in a second format using a data conversion library;

[0123] A vector layer of the target file is created, and all the target geometric data are assigned to the new vector layer according to the source layer in the projection coordinate system.

[0124] The horizontal coordinate of the target geometric data is the longitude information of the corresponding target spatial attribute feature, and the vertical coordinate of the target geometric data is the dimension information of the corresponding target spatial attribute feature.

[0125] Wherein, the derived attributes include: point feature attributes, line feature attributes and surface feature attributes, and the target geometric data includes: point feature data, line feature data and surface feature data;

[0126] The obtaining of the export attribute and the target path set by the user, and using the driving tool to export the target geometric data in the vector layer to the target path according to the export attribute, specifically includes:

[0127] Acquire the point feature attribute, the line feature attribute or the surface feature attribute input by the user, and acquire the target path set by the user;

[0128] According to the point feature attributes, the line feature attributes or the surface feature attributes input by the user, the point feature data, the line feature data or the surface feature data in the vector layer are integrated to obtain a target file, and the target file is exported to the target path.

[0129] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores an automatic processing program for map data conversion, and when the automatic processing program for map data conversion is executed by a processor, the steps of the automatic processing method for map data conversion as described above are implemented.

[0130] In summary, the present invention provides an automatic processing method and related equipment for map data conversion, the method comprising: obtaining an initial file, initializing and processing the initial file and saving it, obtaining a file in a first format and a saving path; according to the saving path, loading the file in the first format into a conversion tool, outputting a target file after format conversion, and obtaining a source layer of the initial file; traversing all geometric data in the source layer, converting and processing all the geometric data using a preset function, obtaining target geometric data, exporting the target geometric data in a second format, and assigning it to the vector layer of the target file; obtaining the export properties and target path set by the user, and using a driving tool to export the target geometric data in the vector layer to the target path according to the export properties. The present invention realizes the automatic conversion of map data by initializing the map data, assigning the relevant data to the newly constructed vector layer with the projection coordinate system as the medium, and exporting it in the target format, thereby improving the convenience of automatic conversion of map data.

[0131] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or terminal including the element.

[0132] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer-readable storage medium that can be read by a computer, and the program can include the processes of the above-mentioned method embodiments when executed. The computer-readable storage medium can be a memory, a disk, an optical disk, etc.

[0133] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. An automatic processing method for map data conversion, characterized in that: The automatic processing method for map data conversion includes: Acquire an initial file, perform initialization processing on the initial file and save it, and obtain a file in a first format and a saving path; According to the saving path, the file in the first format is loaded into the conversion tool, the target file after the format conversion is output, and the source layer of the initial file is obtained; Traversing all the geometric data in the source layer, converting all the geometric data using a preset function to obtain target geometric data, exporting the target geometric data in a second format, and assigning the target geometric data to the vector layer of the target file; The export attribute and the target path set by the user are obtained, and the target geometric data in the vector layer is exported to the target path according to the export attribute using a driving tool.

2. The automatic processing method for map data conversion according to claim 1, characterized in that: The obtaining of the initial file, initializing the initial file and then saving it, and obtaining a file in a first format and a saving path specifically include: Acquire an initial file, and use the connected data conversion library to initialize the initial file to obtain a file in a first format; The file in the first format is stored to obtain a saving path of the file in the first format.

3. The automatic processing method for map data conversion according to claim 1, characterized in that: The step of loading the file in the first format into the conversion tool according to the saving path, outputting the target file after the format conversion, and obtaining the source layer of the initial file specifically includes: Loading the file in the first format into the conversion tool through the saving path, and obtaining the target file output by the conversion tool; The conversion tool determines the file format of the target file according to the saving path, and constructs the target file according to the file format; A plurality of source data features of the initial file are obtained, and a source layer of the initial file is obtained according to all the source data features.

4. The automatic processing method for map data conversion according to claim 1, characterized in that: According to the saving path, the file in the first format is loaded into the conversion tool, the target file after the format conversion is output, and the source layer of the initial file is obtained, and then the following is further included: Construct a projection coordinate system, and randomly set a coordinate point in the source layer as the origin; The source layer is projected into the projected coordinate system according to the origin.

5. The automatic processing method for map data conversion according to claim 4 is characterized in that: The traversing all the geometric data in the source layer, converting all the geometric data using a preset function to obtain target geometric data, exporting the target geometric data in a second format, and assigning the target geometric data to the vector layer of the target file specifically includes: Traversing all the geometric data in the source layer, and acquiring multiple spatial attribute features of the initial file according to all the geometric data; Performing conversion processing on each of the spatial attribute features to obtain corresponding target spatial attribute features; According to the quantity of the geometric data, construct a corresponding quantity of target geometric data, and assign the corresponding target spatial attribute features to the corresponding target geometric data; exporting all the target geometric data in a second format using a data conversion library; A vector layer of the target file is created, and all the target geometric data are assigned to the vector layer of the target file according to the source layer in the projection coordinate system.

6. The automatic processing method for map data conversion according to claim 5, characterized in that: The horizontal coordinate of the target geometric data is the longitude information of the corresponding target spatial attribute feature, and the vertical coordinate of the target geometric data is the dimension information of the corresponding target spatial attribute feature.

7. The automatic processing method for map data conversion according to claim 6, characterized in that: The derived attributes include: point feature attributes, line feature attributes and surface feature attributes, and the target geometric data includes: point feature data, line feature data and surface feature data; The step of obtaining the export attribute and the target path set by the user, and using a driving tool to export the target geometric data in the vector layer to the target path according to the export attribute, specifically includes: Acquire the point feature attribute, the line feature attribute or the surface feature attribute input by the user, and acquire the target path set by the user; According to the point feature attributes, the line feature attributes or the surface feature attributes input by the user, the point feature data, the line feature data or the surface feature data in the vector layer are integrated to obtain a target file, and the target file is exported to the target path.

8. An automatic processing system for map data conversion, characterized in that: The automatic processing system for map data conversion includes: A file preprocessing module, used for obtaining an initial file, performing initialization processing on the initial file and then saving it, to obtain a file in a first format and a saving path; A layer acquisition module, used for loading the file in the first format into the conversion tool according to the saving path, outputting the target file after the format conversion, and acquiring the source layer of the initial file; A layer conversion module, used for traversing all geometric data in the source layer, converting all the geometric data using a preset function to obtain target geometric data, exporting the target geometric data in a second format, and assigning the target geometric data to the vector layer of the target file; The layer export module is used to obtain the export properties and target path set by the user, and use the driving tool to export the target geometric data in the vector layer to the target path according to the export properties.

9. A terminal, characterized in that: The terminal includes: a memory, a processor, and an automatic processing program for map data conversion stored in the memory and executable on the processor. When the automatic processing program for map data conversion is executed by the processor, the steps of the automatic processing method for map data conversion as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an automatic processing program for map data conversion, and when the automatic processing program for map data conversion is executed by a processor, the steps of the automatic processing method for map data conversion according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Method and system for converting CAD (Computer Aided Design) data into vector map data

    CN120950609A