Lanbert projection transformation method of AUTOCAD platform
By developing the Lambert projection transformation method on the AUTOCAD platform, the topographic coordinate transformation is automatically processed, and the problems of inefficiency and error-prone traditional methods are solved, and efficient and accurate projection transformation is achieved.
Patent Information
- Application Number
- CN202411692007.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-14
AI Technical Summary
The traditional Lambert projection transformation method requires manual calculation and drawing, which is inefficient and error-prone.
A Lambert projection transformation method for the AUTOCAD platform is developed. By inputting a file with the initial Lambert projection coordinates, determining the projection parameters, traversing the entity and performing band transformation, generating the final Lambert projection coordinates and drawing them into a new file.
The automated coordinate transformation of Lambert projection is realized, which improves work efficiency and accuracy and simplifies the operation process.
Smart Images

Figure SMS_1 
Figure SMS_3 
Figure SMS_4
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of surveying and mapping, in particular to a Lambert projection transformation method of an AUTOCAD platform. Background Art
[0002] With the development of surveying and mapping technology, digital topographic maps and other geographic information data are increasingly used in the engineering field. Lambert projection is widely used in engineering drawings and the representation of geospatial data due to its conformal characteristics. However, the traditional Lambert projection transformation method usually requires manual calculation and drawing, which is inefficient and prone to errors. AUTOCAD is one of the most widely used computer-aided design (CAD) software in the world, providing powerful two-dimensional and three-dimensional graphics processing functions. AUTOCAD can handle complex geographic information data, has a large user base and mature technical support. In the fields of surveying and mapping, architecture, engineering, etc., data products based on the AUTOCAD platform are everywhere. Therefore, it is of great practical significance to develop a Lambert projection transformation method based on the AUTOCAD platform, which can automatically process topographic map coordinate conversion and improve work efficiency and accuracy. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a Lambert projection transformation method for an AUTOCAD platform, which is used to quickly realize the coordinate transformation of the Lambert projection.
[0004] The technical solution adopted by the present invention to solve the technical problem is a Lambert projection transformation method of the AUTOCAD platform, which includes the following steps:
[0005] S1: input a first file with initial Lambert projection coordinates, the first file is a DWG file, and determine first projection parameters and reference ellipsoid parameters of a topographic map in the first file; the first projection parameters include a first central latitude, a first central meridian, and a first scale factor;
[0006] S2: Determine second projection parameters, where the second projection parameters include a second central latitude, a second central meridian, and a second scale factor;
[0007] S3: Traverse the entities in the first file, divide them into multiple initial conversion units according to entity type, perform band switching transformation on each initial conversion unit according to the conversion relationship between the second projection parameter and the first projection parameter, and draw the final conversion unit after the band switching transformation in the second file, where the second file is a DWG file; until all initial conversion units are converted.
[0008] Further, when the initial conversion unit is a point, a circle or a point-shaped symbol, the initial Lambert projection coordinates of the point, the circle or the point-shaped symbol are the first coordinates, the first coordinates are converted into the second coordinates through the belt change, the second coordinates are the final Lambert projection coordinates, and the second coordinates are input into the second file to draw and form the final conversion unit;
[0009] When the initial conversion unit is a straight line, a polyline, a polygon or a spline curve, a point set constituting the straight line, the polyline, the polygon or the spline curve is determined, the coordinates of the points in the point set are the initial Lambert projection coordinates, the initial Lambert projection coordinates are used as the first coordinates, the first coordinates are converted into second coordinates through a band change, the second coordinates are the final Lambert projection coordinates of the entity, the second coordinates are input into a second file, and the points in the point set are connected to form a final conversion unit;
[0010] When the initial conversion unit is a pattern fill, a point set constituting a fill boundary is determined, the coordinates of the points in the point set are initial Lambert projection coordinates, the initial Lambert projection coordinates are used as first coordinates, the first coordinates are converted into second coordinates through a band change, the second coordinates are final Lambert projection coordinates of the entity, the second coordinates are input into a second file, and the points in the point set are connected to form a fill boundary, and the final conversion unit is filled again according to the original fill method;
[0011] If the entity in the first file is a block, the block is first broken up, the initial conversion unit constituting the block is determined, and the block is processed according to the initial conversion unit type.
[0012] Further, according to the initial band number of the initial Lambert projection coordinates and the first projection parameter under the initial band number, and according to the final band number of the final Lambert projection coordinates after the band change transformation and the second projection parameter under the final band number, the initial Lambert projection coordinates are subjected to band change transformation, that is, the initial Lambert projection coordinates X are known. N , Y E , find the geographic coordinates B and L;
[0013]
[0014] Wherein, B0 is the latitude of the origin under the initial band number, L0 is the longitude of the origin under the initial band number, k0 is the scale factor at the origin under the initial band number, r0 represents the radius of curvature of the meridian; a represents the major semi-axis of the ellipsoid; e represents the first eccentricity of the ellipsoid;
[0015] Then calculate the final Lambert projection coordinates based on the obtained geographic coordinates, that is, if B and L are known, calculate X and Y;
[0016] X=F N +r0-rcosθ;Y=F E +rsinθ
[0017] θ=n(L-L1); n=sinB0; r=aFt n k1;
[0018]
[0019] Where B1 is the latitude of the origin under the final band number, L1 is the longitude of the origin under the final band number, and F E 、F N are the easting and northing offset values of the Lambert origin respectively, k1 is the scale factor at the origin under the final belt number, r0 represents the radius of curvature of the meridian; a represents the major semi-axis of the ellipsoid; e represents the first eccentricity of the ellipsoid; and r represents the radius of curvature of the meridian.
[0020] The beneficial effect of the present invention is that by decomposing the entity in the first file into multiple conversion units, then performing band change transformation on each conversion unit, and finally drawing the converted conversion unit in the second file, the method is easy to operate and improves the efficiency of projection transformation. DETAILED DESCRIPTION
[0021] The embodiments of the present invention are described in detail below, and the same or similar reference numerals throughout the embodiments represent the same or similar elements or elements with the same or similar functions. The embodiments described below are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0022] The Lambert projection transformation method of the AUTOCAD platform of the present invention comprises the following steps:
[0023] S1: input a first file with initial Lambert projection coordinates, the first file is a DWG file, and determine first projection parameters and reference ellipsoid parameters of a topographic map in the first file; the first projection parameters include a first central latitude, a first central meridian, and a first scale factor;
[0024] S2: Determine second projection parameters, where the second projection parameters include a second central latitude, a second central meridian, and a second scale factor;
[0025] S3: Traverse the entities in the first file, divide them into multiple initial conversion units according to entity type, perform band switching transformation on each initial conversion unit according to the conversion relationship between the second projection parameter and the first projection parameter, and draw the final conversion unit after the band switching transformation in the second file, where the second file is a DWG file; until all initial conversion units are converted.
[0026] Among them, you can choose different reference ellipsoid parameters such as Beijing 54, Xi'an 80, WGS84, CGS2000, etc. Here, take WGS84 as an example. Under the WGS84 reference ellipsoid parameters, the topographic map with initial Lambert coordinates drawn in AUTOCAD forms the first file. Since there are many entities in the topographic map, there are many types of entities, including points, circles or point symbols, straight line segments, polylines, polygons, spline curves, and pattern fills. It may also be a block composed of multiple entities. It is divided into multiple initial conversion units according to the entity type. The reference ellipsoid parameters corresponding to the first file and the second file are the same. The first file uses the WGS84 reference ellipsoid parameters, and the second file also uses the WGS84 reference ellipsoid parameters.
[0027] Further, when the initial conversion unit is a point, a circle or a dot-shaped symbol, the initial Lambert projection coordinates of the point, the circle or the dot-shaped symbol are the first coordinates, the first coordinates are converted into the second coordinates through the belt change, the second coordinates are the final Lambert projection coordinates, and the second coordinates are input into the second file to draw and form the final conversion unit; wherein, the circle can be a circular black dot during annotation, and the dot-shaped symbol can be the point where the text is located in the topographic map.
[0028] When the initial conversion unit is a straight line, a polyline, a polygon or a spline curve, a point set constituting the straight line, the polyline, the polygon or the spline curve is determined, the straight line, the polyline, the polygon or the spline curve is a set formed by points, the coordinates of the points in the point set are initial Lambert projection coordinates, the initial Lambert projection coordinates are used as first coordinates, the first coordinates are converted into second coordinates through a band change, the second coordinates are final Lambert projection coordinates of the entity, the second coordinates are input into a second file, and the points in the point set are connected to form a final conversion unit;
[0029] When the initial conversion unit is a pattern fill, a point set constituting a fill boundary is determined, the boundary of the surface is composed of a straight line, a polyline, a polygon or a spline curve, and the straight line, the polyline, the polygon or the spline curve is composed of a set formed by points, and the coordinates of the points in the point set are the initial Lambert projection coordinates, and the initial Lambert projection coordinates are used as the first coordinates, and the first coordinates are converted into the second coordinates through the band change, and the second coordinates are the final Lambert projection coordinates of the entity, and the second coordinates are input into the second file, and the points in the point set are connected to form a fill boundary, and the final conversion unit is formed by re-filling according to the original filling method;
[0030] If the entity in the first file is a block, break up the block first. In AUTOCAD, you can use the "Explode" function to break up the block into points, circles or point symbols, straight line segments, polylines, polygons, spline curves or faces. Determine the initial conversion units that make up the block and process it according to the initial conversion unit type.
[0031] The method of band-changing transformation is as follows: according to the initial band number of the initial Lambert projection coordinates and the first projection parameter under the initial band number (i.e., the initial band number in the topographic map in the first file), and according to the final band number of the final Lambert projection coordinates after band-changing transformation and the second projection parameter under the final band number (i.e., the final band number in the second file), the initial Lambert projection coordinates are band-changed, that is, the initial Lambert projection coordinates X are known. N , Y E , find the geographic coordinates B and L;
[0032]
[0033] Wherein, B0 is the latitude of the origin under the initial band number, L0 is the longitude of the origin under the initial band number, k0 is the scale factor at the origin under the initial band number, r0 represents the radius of curvature of the meridian; a represents the major semi-axis of the ellipsoid; e represents the first eccentricity of the ellipsoid;
[0034] Then calculate the final Lambert projection coordinates based on the obtained geographic coordinates, that is, if B and L are known, calculate X and Y;
[0035] X=F N +r0-rcosθ;Y=F E +rsinθ
[0036] θ=n(L-L1); n=sinB0; r=aFt n k1;
[0037]
[0038] Where B1 is the latitude of the origin under the final band number, L1 is the longitude of the origin under the final band number, and F E 、F N are the easting and northing offset values of the Lambert origin respectively, k1 is the scale factor at the origin under the final belt number, r0 represents the radius of curvature of the meridian; a represents the major semi-axis of the ellipsoid; e represents the first eccentricity of the ellipsoid; and r represents the radius of curvature of the meridian.
[0039] The embodiments of this specific implementation method are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. The Lambert projection transformation method of the AUTOCAD platform is characterized by: The following steps are included: S1: input a first file with initial Lambert projection coordinates, the first file is a DWG file, and determine first projection parameters and reference ellipsoid parameters of a topographic map in the first file; the first projection parameters include a first central latitude, a first central meridian, and a first scale factor; S2: Determine second projection parameters, where the second projection parameters include a second central latitude, a second central meridian, and a second scale factor; S3: Traverse the entities in the first file, divide them into multiple initial conversion units according to entity type, perform band switching transformation on each initial conversion unit according to the conversion relationship between the second projection parameter and the first projection parameter, and draw the final conversion unit after the band switching transformation in the second file, where the second file is a DWG file; until all initial conversion units are converted.
2. The Lambert projection transformation method of the AUTOCAD platform as claimed in claim 1, characterized in that: When the initial conversion unit is a point, a circle or a dot-shaped symbol, the initial Lambert projection coordinates of the point, the circle or the dot-shaped symbol are the first coordinates, the first coordinates are converted into the second coordinates through the belt change, the second coordinates are the final Lambert projection coordinates, and the second coordinates are input into the second file to draw and form the final conversion unit; When the initial conversion unit is a straight line, a polyline, a polygon or a spline curve, a point set constituting the straight line, the polyline, the polygon or the spline curve is determined, the coordinates of the points in the point set are the initial Lambert projection coordinates, the initial Lambert projection coordinates are used as the first coordinates, the first coordinates are converted into second coordinates through a band change, the second coordinates are the final Lambert projection coordinates of the entity, the second coordinates are input into a second file, and the points in the point set are connected to form a final conversion unit; When the initial conversion unit is a pattern fill, a point set constituting a fill boundary is determined, the coordinates of the points in the point set are initial Lambert projection coordinates, the initial Lambert projection coordinates are used as first coordinates, the first coordinates are converted into second coordinates through a band change, the second coordinates are final Lambert projection coordinates of the entity, the second coordinates are input into a second file, and the points in the point set are connected to form a fill boundary, and the final conversion unit is filled again according to the original fill method; If the entity in the first file is a block, the block is first broken up, the initial conversion unit constituting the block is determined, and the block is processed according to the initial conversion unit type.
3. The Lambert projection transformation method of the AUTOCAD platform as claimed in claim 2, characterized in that: According to the initial band number of the initial Lambert projection coordinates and the first projection parameter under the initial band number, and according to the final band number of the final Lambert projection coordinates after the band change transformation and the second projection parameter under the final band number, the initial Lambert projection coordinates are subjected to band change transformation, that is, the initial Lambert projection coordinates X are known. N , Y E , find the geographic coordinates B and L; Where B0 is the latitude of the origin under the initial belt number, L0 is the longitude of the origin under the initial belt number, k0 is the scale factor at the origin under the initial belt number, and r0 represents the radius of curvature of the meridian; a represents the major semi-axis of the ellipsoid; e represents the first eccentricity of the ellipsoid; Then calculate the final Lambert projection coordinates based on the obtained geographic coordinates, that is, if B and L are known, calculate X and Y; X=F N +r0-rcosθ;Y=F E +rsinθ Where B1 is the latitude of the origin under the final band number, L1 is the longitude of the origin under the final band number, and F E 、F N are the easting and northing offset values of the Lambert origin, respectively, k1 is the scale factor at the origin under the final belt number, and r0 represents the radius of curvature of the meridian; a represents the major semi-axis of the ellipsoid; e represents the first eccentricity of the ellipsoid; r represents the radius of curvature of the meridian.
Citation Information
Cited By
Self-adaptive projection transformation method of low-altitude aviation navigation system and related device
CN120976009A