Exploration point information extraction, elevation calculation and navigation conversion method based on CAD
Through the CAD-based method, the exploration point information is extracted and calculated from the DXF file, the problem of low automation in the existing technology is solved, and the rapid and accurate exploration point coordinates and elevation calculations are achieved, which improves the efficiency of exploration operations.
Patent Information
- Application Number
- CN202510006862.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-05-09
AI Technical Summary
The existing technology has low automation in the extraction of exploration point information and elevation calculation, and it is difficult to quickly and accurately obtain exploration point coordinates and elevation information, which affects the efficiency of exploration operations.
Using a CAD-based method, graph data is extracted from DXF files, exploration point coordinates and elevation are calculated, weighted average elevation value is calculated by the method of inverse distance weight, and a navigation file is generated.
It realizes automatic extraction of exploration point coordinates and elevation information, improves data accuracy and calculation efficiency, reduces manual operation errors and time, and can better guide production practice.
Smart Images

Figure CN119961219A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of geotechnical exploration, and in particular to a method for extracting exploration point information and calculating elevation and converting navigation based on CAD. Background Art
[0002] Under the general environment, pumped storage projects and photovoltaic projects continue to increase, and the number of exploration and stakeout points is also increasing. How to quickly obtain the coordinates of the exploration points and guide the operators to quickly arrive at the site for exploration operations is a more difficult problem.
[0003] In the current operation process, the point number and plane coordinates of the exploration point can be directly viewed and copied and extracted one by one through the CAD software, and the elevation needs to be manually estimated based on the contour lines and elevation points on the drawing (extracting coordinates one by one, elevation, screening, calculation and other steps). This method has a low degree of automation and is very slow; finally, a navigation file is generated in other map software based on the extracted plane coordinates of the exploration point.
[0004] Due to the development of surveying and mapping technology, the topographic maps provided by surveying and mapping professionals are of higher accuracy. In most cases, the elevation calculated by interpolation of the exploration point position can meet the requirements of exploration work and regulations and specifications. How to quickly calculate the elevation value of the exploration point through the location of the exploration point has yet to be solved. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a CAD-based exploration point information extraction and elevation calculation and navigation conversion method, which can quickly and accurately obtain the exploration point coordinate elevation information, and also provide commonly used navigation files to better guide production practice.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0007] A method for extracting exploration point information, calculating elevation and converting navigation data based on CAD includes the following steps:
[0008] S1. Extract all graphic data from DXF files;
[0009] S11 divides the contents of ENTITIES into sections and reads them;
[0010] S12 searches for graphic entities in each section content;
[0011] S13 extracts the following eight attributes for each type of graphic entity: sequence number, layer, line type, entity type, three-dimensional coordinates (x, y, z), and attribute 8;
[0012] S2, calculate the coordinates and elevation of the exploration points;
[0013] S21 obtains exploration point information from DXF file data;
[0014] S22 calculates the coordinates of the exploration points;
[0015] S23 searches for elevation points near the exploration point;
[0016] S3. Generate a navigation file according to the coordinates.
[0017] A further improvement of the technical solution of the present invention is that in S11, each section of content starts from group code 8 and ends when group code 100 is "AcDbEntity"; group code 100 represents the entity type, and group code 8 represents the layer type.
[0018] A further improvement of the technical solution of the present invention is that in S12, the graphic entity is the value corresponding to the group code 100.
[0019] A further improvement of the technical solution of the present invention is that in S13, for different graphic entity types, attribute 8 is divided into the following cases:
[0020] The "AcDbPolyline / 2dPolylline / AcDbPoint" command extracts the CASS code, group code 1000;
[0021] The "AcDbBlockReference" command extracts the CASS code or block name. When there is no group code 1000 in the subsection content, group code 2, i.e., the block name, is extracted. Using this method, attribute 8 of the elevation point is the CASS code, and attribute 8 of the exploration point is the block name.
[0022] "AcDbText / AcDbMText" command extracts text content, group code 1;
[0023] For other graphic entity types, attribute 8 is not extracted or assigned arbitrarily;
[0024] When the entity type has only one point, the serial number is 1; when the type is a polyline, line segment, or vertex, the serial numbers start from 1 to indicate the connection order.
[0025] A further improvement of the technical solution of the present invention is that in S21, the exploration point information is obtained from the DXF file data, and when the following conditions are met at the same time, it is determined to be an exploration point:
[0026] a. In row n, the entity type is the block reference type "AcDbBlockReference";
[0027] b. In the nth row, attribute 8 is the name of the commonly used borehole types: "geological description", "standard penetration hole", "sampling hole", "identification hole", "sampling standard penetration hole", "A$C3BB757BF"; among them, "A$C3BB757BF" is a static penetration hole;
[0028] c. The n+1th row is where the dot is located, the line type is "DH1", and the entity type is "AcDbText".
[0029] A further improvement of the technical solution of the present invention is that in the DXF file, the corresponding attribute contents of the exploration points are all referenced to the file generated by the geotechnical correction software.
[0030] A further improvement of the technical solution of the present invention is that S22 specifically includes the following steps:
[0031] a. When the exploration point type is "geological description", "standard through hole", "sampling hole" or "identification hole", directly read the coordinates (x, y) of the exploration point, that is, the coordinates of the row where "AcDbBlockReference" is located;
[0032] b. When the exploration point type is "Sampling Standard Penetration" or static penetration hole "A$C3BB757BF", the coordinates of the point cannot be obtained directly, and need to be calculated through the coordinate offset. The calculation method is as follows:
[0033] Different exploration points have the same scale, and the distance and direction of the point number and borehole depth relative to the exploration point are fixed; the offset of the exploration point coordinates relative to the point number is calculated by the coordinates of the known through-holes or other known boreholes and point numbers in the graphics:
[0034]
[0035] Among them, (dx, dy) is the offset of the exploration point coordinates relative to the point number, (x0, y0) is the known exploration point coordinates, (x s ,y s ) are the coordinates of the corresponding point number.
[0036] A further improvement of the technical solution of the present invention is that S22 specifically includes the following steps:
[0037] a. Extract all elevation points: extract all elevation points from the DXF graphic data file, that is, existing elevation points and elevation points on contour lines; elevation points are determined by attribute 8, usually CASS code "202101"; contour lines are determined by attribute 8, usually CASS code "201101" or "201102", or determined by layer, attribute "DGX";
[0038] b. Find nearby elevation points: Sort the elevation points by coordinates and find the elevation point closest to the exploration point; if the number of elevation points is greater than 8000, store the elevation point data in the database, sort and search through the database; here, the nearest point in the four quadrants with the exploration point as the origin is extracted;
[0039] c. Calculate the elevation of the exploration point:
[0040] Calculate the height h of the exploration point by weighting according to the distance:
[0041]
[0042] Among them, l1, l2, l3, and l4 are the plane distances between the adjacent points and the exploration point, and h1, h2, h3, and h4 are the elevations of the adjacent points.
[0043] A further improvement of the technical solution of the present invention is that S3 specifically includes the following steps:
[0044] S31 converts the plane coordinates of the exploration points into geodetic coordinates;
[0045] S32 obtains the storage format of geodetic coordinate data in the .kml file;
[0046] S33 stores the point numbers and coordinates of the tower positions and corners at designated locations in the file according to the storage method of the coordinates in the .kml file.
[0047] Due to the adoption of the above technical solution, the technical progress achieved by the present invention is:
[0048] 1. The present invention can automatically extract information such as the coordinates of each exploration point from DXF, reducing errors caused by manual operations and saving a lot of time.
[0049] 2. The present invention calculates the weighted average elevation value of each point through the inverse of the distance weight, thereby ensuring data accuracy.
[0050] 3. The present invention gives a prompt when the out-of-range data cannot be calculated, that is, when there are no adjacent coordinate points or there are few points around the exploration point, the point elevation cannot be accurately calculated, and the calculation result is prompted to be inaccurate.
[0051] 4. The present invention can automatically select a method for calculating elevation, and select a calculation method of contour lines, elevation points, or contour lines plus elevation points, thereby improving calculation efficiency.
[0052] 5. The present invention automatically calculates the geodetic coordinates of each exploration point and converts them into navigation files that can be used directly in the field. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 is a flow chart of the method of the present invention;
[0054] Figure 2 is a schematic diagram of a DXF file in an embodiment of the present invention;
[0055] Figure 3 It is the DXF original file storage format in the embodiment of the present invention;
[0056] Figure 4 is a result (part) of the graphic data extraction in the embodiment of the present invention;
[0057] Figure 5 This is an example of a through hole drilling symbol of the present invention;
[0058] Figure 6 It is an example of the survey point graphic data of the present invention;
[0059] Figure 7 It is the extraction and calculation result (part) of the plane coordinates of the exploration points in the embodiment of the present invention;
[0060] Figure 8 are the contour lines and elevation points (part) extracted in the embodiment of the present invention;
[0061] Fig. 9 is the calculation result of the exploration point coordinates and elevation in the embodiment of the present invention;
[0062] Fig.10 It is the software program interface for exploration point information extraction, elevation calculation and navigation conversion in the embodiment of the present invention. DETAILED DESCRIPTION
[0063] The present invention is further described in detail below with reference to the accompanying drawings and embodiments:
[0064] like Figure 1 As shown, a method for extracting exploration point information and calculating elevation and converting navigation based on CAD includes the following steps:
[0065] S1. Extract all graphic data from DXF files;
[0066] S11 divides the content in ENTITIES into sections and reads them; each section starts with group code 8 (indicating layer type) and ends when group code 100 (indicating entity type) is "AcDbEntity".
[0067] DXF files contain multiple paragraph structures, among which the "ENTITIES" section contains all graphic entities. Each entity consists of a series of combination codes (referred to as group codes) and corresponding values, which define the relevant attributes of the entity.
[0068] S12 searches for the graphic entity in each section, that is, the value corresponding to the group code 100;
[0069] In engineering applications, drawn graphics types usually include points, line segments, polylines, and texts. The graphic entity types in DXF files can be represented as "AcDbPolyline / 2dPolylline" (polyline), "AcDbline" (line segment), "AcDbPoint" (point), "AcDbBlockReference" (block reference), "AcDbVertex" (vertex), "AcDbText / AcDbMText" (text), and "AcDbCircle" (circle).
[0070] S13 extracts the following eight attributes for each type of graphic entity: sequence number, layer, line type, entity type, three-dimensional coordinates (x, y, z), and attribute 8;
[0071] For different graphic entity types, attribute 8 is divided into the following cases:
[0072] The "AcDbPolyline / 2dPolylline / AcDbPoint" command extracts the CASS code (group code 1000);
[0073] The "AcDbBlockReference" command extracts the CASS code or block name (when there is no group code 1000 in the subsection content, extract group code 2, i.e., the block name). Using this method, attribute 8 of the elevation point is usually the CASS code, and attribute 8 of the exploration point is usually the block name;
[0074] "AcDbText / AcDbMText" command extracts text content (group code 1);
[0075] For other graphic entity types, attribute 8 may not be extracted or may be assigned a value at will.
[0076] When the entity type has only one point, the serial number is 1; when the type is a polyline, line segment, or vertex, the serial numbers start from 1 to indicate the connection order.
[0077] S2. Calculate the coordinates and elevation of the exploration points
[0078] S21 obtains exploration point information from the DXF file data and determines it as an exploration point when the following conditions are met at the same time:
[0079] a. In row n, the entity type is the block reference type "AcDbBlockReference";
[0080] b. In row n, attribute 8 is the name of the commonly used borehole types: "geological description", "standard penetration hole", "sampling hole", "identification hole", "sampling standard penetration hole", "A$C3BB757BF" (static penetration hole);
[0081] c. The n+1th row is where the dot is located, the line type is "DH1", and the entity type is "AcDbText".
[0082] It should be noted that the DXF files processed in the present invention and the corresponding properties of the exploration points are all referenced to the files generated by the geotechnical correction software. If other methods are used to arrange or other software is used to generate the exploration point files, the properties and storage format need to be adjusted accordingly.
[0083] S22 calculates the coordinates of the exploration points;
[0084] a. When the exploration point type is "geological description", "standard through hole", "sampling hole" or "identification hole", directly read the coordinates (x, y) of the exploration point, that is, the coordinates of the row where "AcDbBlockReference" is located;
[0085] b. When the exploration point type is "Sampling Standard Penetration" or static penetration hole "A$C3BB757BF", the coordinates of the point cannot be obtained directly, and need to be calculated through the coordinate offset. The calculation method is as follows:
[0086] Different exploration points have the same scale, and the distance and direction of the point number and borehole depth relative to the exploration point are fixed; the offset of the exploration point coordinates relative to the point number is calculated by the coordinates of the known through-hole (or other boreholes with known coordinates) and the point number in the figure:
[0087]
[0088] Among them, (dx, dy) is the offset of the exploration point coordinates relative to the point number, (x0, y0) is the known exploration point coordinates, (x s ,y s ) are the coordinates of the corresponding point number;
[0089] It should be noted that, in addition to the above commonly used exploration point types, there may be other types in actual projects, and it is necessary to determine whether to directly extract the exploration point coordinates, otherwise they should be calculated according to the above method.
[0090] S23 searches for elevation points near the exploration point;
[0091] a. Extract all elevation points: extract all elevation points from the DXF graphic data file, that is, existing elevation points and elevation points on contour lines; elevation points are determined by attribute 8, usually CASS code "202101"; contour lines are determined by attribute 8, usually CASS code "201101" or "201102", or determined by layer, the attribute is "DGX".
[0092] b. Find nearby elevation points: Sort the elevation points by coordinates and find the elevation point closest to the exploration point. If the number of elevation points is large, the elevation point data can be stored in a database, sorted and searched through the database. Here, the nearest point in the four quadrants with the exploration point as the origin is extracted (if there are only nearby points in less than two quadrants, it cannot be calculated).
[0093] c. Calculate the elevation of the exploration point
[0094] Calculate the height h of the exploration point by weighting according to the distance:
[0095]
[0096] Among them, l1, l2, l3, and l4 are the plane distances between the adjacent points and the exploration point, and h1, h2, h3, and h4 are the elevations of the adjacent points.
[0097] S3, generating a navigation file according to the coordinates;
[0098] S31 converts the plane coordinates of the exploration points into geodetic coordinates;
[0099] S32 obtains the storage format of geodetic coordinate data in the .kml file;
[0100] S33 stores the point numbers and coordinates of the tower positions and corners at designated locations in the file according to the storage method of the coordinates in the .kml file.
[0101] Example
[0102] Existing DXF files such as Figure 2 As shown, a method for extracting exploration point information and calculating elevation and converting navigation based on CAD includes the following steps:
[0103] S1 extracts file graphic data;
[0104] like Figure 3 As shown in the figure, taking one section of the original data of the DXF file as an example, the 8 attributes of the group data are extracted; it starts with group code 8 and ends with the entity type "AcDbEntity". The next line of group code 8 indicates that the layer type is "GCD"; the next line of group code 100 indicates that the graphic entity type is a block "AcDbBlockReference" with a sequence number of 1; the next line of group code 6 indicates that the layer type is "Continuous"; the next lines of group codes 10, 20, and 30 extract the x, y, and z coordinates respectively; attribute 8 is the next line of group code 1000 "202101".
[0105] Extract all graphic data in the above way, and the result is as follows Figure 4 shown.
[0106] S2 calculates the elevation of the exploration point;
[0107] S2. Calculate the coordinates and elevation of the exploration points
[0108] S21 obtains exploration point information from DXF file data, where the exploration point and data storage format is as follows: Figure 5 , Figure 6 As shown, Figure 5 For example, the symbol for marking a through hole drill hole is “S44”, which indicates the drill hole number and “15.00” which indicates the drill hole depth;
[0109] In the data files extracted above, when the following conditions are met at the same time, it is determined to be an exploration point:
[0110] a. In row n, the entity type is the block reference type "AcDbBlockReference";
[0111] b. In row n, attribute 8 is the name of the commonly used borehole types: "geological description", "standard penetration hole", "sampling hole", "identification hole", "sampling standard penetration hole", "A$C3BB757BF" (static penetration hole);
[0112] c. The n+1th row is where the dot is located, the line type is "DH1", and the entity type is "AcDbText".
[0113] It should be noted that the DXF files processed in the present invention and the corresponding properties of the exploration points are all referenced to the files generated by the geotechnical correction software. If other methods are used to arrange or other software is used to generate the exploration point files, the properties and storage format need to be adjusted accordingly.
[0114] Directly extract the plane coordinates of "geological description", "standard through hole", "sampling hole" and "identification hole", and calculate the offset of the exploration point coordinates relative to the point number: dx = -7.038, dy = -5.546;
[0115] For the "A$C3BB757BF" and "Sampling and Marking" points, the coordinates can be calculated by adding the point number position to the offset.
[0116] The calculation results of exploration point coordinate data are as follows: Figure 7 shown.
[0117] S23 extracts all elevation points and contour lines;
[0118] According to the CASS code "202101" of the elevation point, the CASS codes "201102" and "201101" of the contour line, and the layer "DGX" where the contour line is located, the coordinates and elevations of all elevation points on the drawing and the elevation points on the contour line are extracted, such as Figure 8 shown.
[0119] S24 calculates the elevation of the exploration point;
[0120] Sort the above contour lines and elevation points according to coordinates, and find the adjacent points in the four quadrants with the exploration point as the origin. Taking the standard through hole S16 as an example, the elevations of the four nearest points are h1=138.84m, h2=138.85m, h3=138.99m, and h4=138.80m, and the plane distances from S16 are L1=10.54m, L2=11.04m, L3=22.68m, and L4=5.67, respectively. According to (Formula 2), the elevation of S16 can be calculated to be 138.91.
[0121] According to this calculation method, the elevation of all exploration points can be obtained, such as Fig. 9 shown.
[0122] S3 generates navigation files;
[0123] After converting the plane coordinates of the exploration points into geodetic coordinates, a navigation file result is generated.
[0124] According to the above CAD-based exploration point information extraction and elevation calculation and navigation conversion method, based on the above ideas, combined with the data format of our institute's topographic map (made by CASS software) and exploration points (laid out by Lizheng software), the exploration point information extraction elevation calculation and navigation conversion software was compiled to complete the automatic realization of CAD-based exploration point information extraction and elevation calculation and navigation conversion. The software is as follows Fig.10 shown.
[0125] In summary, the present invention can achieve rapid and accurate acquisition of exploration point coordinate elevation information, and also provides commonly used navigation files to better guide actual production.
Claims
1. A method for extracting exploration point information and calculating elevation and converting navigation based on CAD, characterized in that: The following steps are involved: S1. Extract all graphic data from DXF files; S11 divides the contents of ENTITIES into sections and reads them; S12 searches for graphic entities in each section content; S13 extracts the following eight attributes for each type of graphic entity: sequence number, layer, line type, entity type, three-dimensional coordinates (x, y, z), and attribute 8; S2, calculate the coordinates and elevation of the exploration points; S21 obtains exploration point information from DXF file data; S22 calculates the coordinates of the exploration points; S23 searches for elevation points near the exploration point; S3. Generate a navigation file according to the coordinates.
2. The method for extracting exploration point information and calculating elevation and converting navigation based on CAD according to claim 1 is characterized in that: In S11, each section starts with group code 8 and ends when group code 100 is "AcDbEntity"; group code 100 indicates the entity type, and group code 8 indicates the layer type.
3. The method for extracting exploration point information and calculating elevation and converting navigation based on CAD according to claim 2 is characterized in that: In S12, the graphic entity is the value corresponding to the group code 100.
4. The method for extracting exploration point information and calculating elevation and converting navigation based on CAD according to claim 1 is characterized in that: In S13, for different graphic entity types, attribute 8 is divided into the following cases: The "AcDbPolyline / 2dPolylline / AcDbPoint" command extracts the CASS code, group code 1000; The "AcDbBlockReference" command extracts the CASS code or block name. When there is no group code 1000 in the subsection content, group code 2, i.e., the block name, is extracted. In this way, attribute 8 of the elevation point is the CASS code, and attribute 8 of the exploration point is the block name. "AcDbText / AcDbMText" command extracts text content, group code 1; For other graphic entity types, attribute 8 is not extracted or assigned arbitrarily; When the entity type has only one point, the serial number is 1; when the type is a polyline, line segment, or vertex, the serial numbers start from 1 to indicate the connection order.
5. The method for extracting exploration point information and calculating elevation and converting navigation based on CAD according to claim 1 is characterized in that: In S21, exploration point information is obtained from the DXF file data, and when the following conditions are met at the same time, it is determined to be an exploration point: a. In row n, the entity type is the block reference type "AcDbBlockReference"; b. In the nth row, attribute 8 is the name of the commonly used borehole types: "geological description", "standard penetration hole", "sampling hole", "identification hole", "sampling standard penetration hole", "A$C3BB757BF"; among them, "A$C3BB757BF" is a static penetration hole; c. The n+1th row is where the dot is located, the line type is "DH1", and the entity type is "AcDbText".
6. The method for extracting exploration point information and calculating elevation and converting navigation based on CAD according to claim 5 is characterized in that: In the DXF file, the corresponding attribute contents of the exploration points are all referenced to the files generated by the geotechnical correction software.
7. The method for extracting exploration point information and calculating elevation and converting navigation based on CAD according to claim 1 is characterized in that: S22 specifically includes the following steps: a. When the exploration point type is "geological description", "standard through hole", "sampling hole" or "identification hole", directly read the coordinates (x, y) of the exploration point, that is, the coordinates of the row where "AcDbBlockReference" is located; b. When the exploration point type is "Sampling Standard Penetration" or static penetration hole "A$C3BB757BF", the coordinates of the point cannot be obtained directly, and need to be calculated through the coordinate offset. The calculation method is as follows: Different exploration points have the same scale, and the distance and direction of the point number and borehole depth relative to the exploration point are fixed; the offset of the exploration point coordinates relative to the point number is calculated by the coordinates of the known through-holes or other known boreholes and point numbers in the graphics: Among them, (dx, dy) is the offset of the exploration point coordinates relative to the point number, (x0, y0) is the known exploration point coordinates, (x s ,y s ) are the coordinates of the corresponding point number.
8. The method for extracting exploration point information and calculating elevation and converting navigation based on CAD according to claim 1 is characterized in that: S22 specifically includes the following steps: a. Extract all elevation points: extract all elevation points from the DXF graphic data file, that is, existing elevation points and elevation points on contour lines; elevation points are determined by attribute 8, usually CASS code "202101"; contour lines are determined by attribute 8, usually CASS code "201101" or "201102", or determined by layer, attribute "DGX"; b. Find nearby elevation points: Sort the elevation points by coordinates and find the elevation point closest to the exploration point; if the number of elevation points is greater than 8000, store the elevation point data in the database, sort and search through the database; here, the nearest point in the four quadrants with the exploration point as the origin is extracted; c. Calculate the elevation of the exploration point: Calculate the height h of the exploration point by weighting according to the distance: Among them, l1, l2, l3, and l4 are the plane distances between the adjacent points and the exploration point, and h1, h2, h3, and h4 are the elevations of the adjacent points.
9. The method for extracting exploration point information and calculating elevation and converting navigation based on CAD according to claim 1, characterized in that: S3 specifically includes the following steps: S31 converts the plane coordinates of the exploration points into geodetic coordinates; S32 obtains the storage format of geodetic coordinate data in the .kml file; S33 stores the point numbers and coordinates of the tower positions and corners at designated locations in the file according to the storage method of the coordinates in the .kml file.