CN117688122A - Coordinate conversion method, device, equipment and medium for slice map - Google Patents

Coordinate conversion method, device, equipment and medium for slice map Download PDF

Info

Publication number
CN117688122A
CN117688122A CN202410158234.2A CN202410158234A CN117688122A CN 117688122 A CN117688122 A CN 117688122A CN 202410158234 A CN202410158234 A CN 202410158234A CN 117688122 A CN117688122 A CN 117688122A
Authority
CN
China
Prior art keywords
slice
offset
abscissa
ordinate
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410158234.2A
Other languages
Chinese (zh)
Other versions
CN117688122B (en
Inventor
潘光绪
汪珂伦
王晋
赵永红
蓝箭
卓沛知
陈张浩然
向德贵
杨皓
苏恒
周远兵
田鹏宇
罗镇
康福勤
闫华顺
张玥琳
曾成刚
王禹阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Civil Aviation Electronic Technology Co ltd
Original Assignee
Civil Aviation Electronic Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Civil Aviation Electronic Technology Co ltd filed Critical Civil Aviation Electronic Technology Co ltd
Priority to CN202410158234.2A priority Critical patent/CN117688122B/en
Publication of CN117688122A publication Critical patent/CN117688122A/en
Application granted granted Critical
Publication of CN117688122B publication Critical patent/CN117688122B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Instructional Devices (AREA)

Abstract

The application provides a coordinate conversion method, device, equipment and medium of a slice map, relates to the technical field of data processing, and is used for solving the problem of inaccurate coordinate conversion of the slice map. The coordinate conversion method of the slice map is applied to android equipment, and the android equipment is provided with a target application program, and comprises the following steps: acquiring a slice map loaded by a target application program; obtaining a first abscissa and a first ordinate of a target position point according to the longitude and latitude of the target position point in the slice map; obtaining a target offset according to the actual slice level of the slice map and the actual altitude of the android device; and correcting the first abscissa and the first ordinate respectively according to the target offset to obtain a second abscissa and a second ordinate of the target position point. According to the method, the coordinate conversion result is corrected through the actual slice level of the slice map and the actual altitude setting offset of the android device, and the accuracy of coordinate conversion is improved.

Description

Coordinate conversion method, device, equipment and medium for slice map
Technical Field
The application relates to the technical field of data processing, and provides a coordinate conversion method, device, equipment and medium for a slice map.
Background
ArcGIS Runtime SDK for Android is a toolkit developed by the Esri corporation for creating and deploying Geographic Information System (GIS) applications on Android devices. It provides a powerful set of application programming interfaces (Application Programming Interface, APIs) that enable developers to build applications with map display, geographic query, spatial analysis, graphical editing, etc. functions using a variety of geographic data and functions.
ArcGIS Runtime SDK for Android provides an offline map function enabling an application to access map data without a network connection. The slice map is a map which divides large-scale map data into small blocks, and is convenient to rapidly load and display in mobile application. The existing method for converting longitude and latitude coordinates into plane coordinates is not suitable for the slice map of ArcGIS Runtime SDK for Android, and the problems of larger point location drift, inaccurate drawing and the like can occur.
Disclosure of Invention
The embodiment of the application provides a coordinate conversion method, device, equipment and medium for a slice map, which are used for solving the problem of inaccurate coordinate conversion of the slice map.
In a first aspect, a coordinate conversion method of a slice map is provided, which is applied to an android device, wherein a target application program is installed in the android device, and the coordinate conversion method of the slice map includes:
acquiring a slice map loaded by the target application program;
obtaining a first abscissa and a first ordinate of a target position point according to the longitude and latitude of the target position point in the slice map;
obtaining a target offset according to the actual slice level of the slice map and the actual altitude of the android device;
and correcting the first abscissa and the first ordinate respectively according to the target offset to obtain a second abscissa and a second ordinate of the target position point.
Optionally, the obtaining the target offset according to the actual slice level of the slice map and the actual altitude of the android device includes:
determining a difference value between an actual slice level and a reference slice level of the slice map as a level difference value, and obtaining slice offset according to the level difference value and a slice level offset coefficient; the slice offset is positively correlated with the grade difference value, and the slice offset is positively correlated with the slice grade offset coefficient;
Determining a difference value between the actual altitude of the android device and a reference altitude as an altitude difference value, and obtaining altitude deviation according to the altitude difference value and an altitude deviation coefficient; the altitude offset is positively correlated with the altitude difference, and the altitude offset is negatively correlated with the altitude offset coefficient;
and obtaining a target offset according to the slice offset and the elevation offset.
Optionally, the target offset includes a horizontal offset and a vertical offset, the horizontal offset and the vertical offset being different; the correcting the first abscissa and the first ordinate according to the target offset to obtain a second abscissa and a second ordinate of the target position point includes:
correcting the first abscissa according to the horizontal offset to obtain a second abscissa of the target position point;
and correcting the first ordinate according to the vertical offset to obtain a second ordinate of the target position point.
Optionally, before correcting the first abscissa according to the horizontal offset, and obtaining the second abscissa of the target position point, the coordinate conversion method of the slice map further includes:
Determining the slice offset as the horizontal offset;
the sum of the slice offset and the elevation offset is determined as the vertical offset.
Optionally, before the target offset is obtained according to the actual slice level of the slice map and the actual altitude of the android device, the coordinate conversion method of the slice map further includes:
acquiring the atmospheric pressure of the height of the android device;
and obtaining the actual altitude of the android device according to the atmospheric pressure.
Optionally, after correcting the first abscissa and the first ordinate according to the target offset, respectively, to obtain a second abscissa and a second ordinate of the target position point, the coordinate conversion method of the slice map further includes:
converting the second abscissa into a third abscissa meeting the preset format and preset precision of the target application program;
converting the second ordinate to a third ordinate satisfying the preset format and the preset precision;
the target location point is displayed on the slice map with the third abscissa and the third ordinate.
Optionally, the obtaining the first abscissa and the first ordinate of the target position point according to the longitude and latitude of the target position point in the slice map includes:
Obtaining a first abscissa of the target position point according to the maximum longitude and the minimum longitude of the slice map, the universal plane longitude range and the longitude of the target position point;
and obtaining a first ordinate of the target position point according to the maximum latitude and the minimum latitude of the slice map, the latitude range of the general plane and the latitude of the target position point.
In a second aspect, there is provided a coordinate conversion device of a slice map, the coordinate conversion device of the slice map being provided in an android device, the android device being installed with a target application, the coordinate conversion device of the slice map comprising:
the slicing module is used for acquiring a slicing map loaded by the target application program;
the coordinate obtaining module is used for obtaining a first abscissa and a first ordinate of the target position point according to the longitude and latitude of the target position point in the slice map;
the offset obtaining module is used for obtaining a target offset according to the actual slice level of the slice map and the actual altitude of the android device;
and the coordinate correction module is used for correcting the first abscissa and the first ordinate respectively according to the target offset to obtain a second abscissa and a second ordinate of the target position point.
In a third aspect, the present application provides a computer device, where the computer device includes a memory and a processor, where the memory stores a computer program, and the processor executes the computer program to implement the coordinate conversion method of the slice map described in the embodiment.
In a fourth aspect, the present application provides a computer readable storage medium, where a computer program is stored, and a processor executes the computer program to implement the coordinate conversion method of the slice map described in the embodiment.
In the embodiment of the application, a slice map loaded by a target application program in android equipment is obtained, a first abscissa and a first ordinate of a target position point are obtained according to longitude and latitude of the target position point in the slice map, a target offset is obtained according to an actual slice level of the slice map and an actual altitude of the android equipment, and the first abscissa and the first ordinate are corrected according to the target offset to obtain a second abscissa and a second ordinate of the target position point. According to the embodiment of the application, the converted abscissa and ordinate are corrected by utilizing the actual slice level of the slice map and the actual altitude of the android device, and the corrected abscissa and ordinate are more accurate, so that the accuracy of coordinate conversion of the slice map is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described below, and it is apparent that the drawings in the following description are only embodiments of the present application, and other drawings may be obtained according to the provided drawings without inventive effort for a person having ordinary skill in the art.
Fig. 1 is a schematic diagram of an android device structure of a hardware running environment according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a coordinate conversion method of a slice map according to an embodiment of the present application;
FIG. 3 is a flow chart of data preparation provided in an embodiment of the present application;
fig. 4 is another flow chart of a coordinate conversion method of a slice map according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a coordinate conversion device of a slice map according to an embodiment of the present application.
The marks in the figure: 101-processor, 102-communication bus, 103-user interface, 104-network interface, 105-memory, 501-slicing module, 502-coordinate acquisition module, 503-offset acquisition module, 504-coordinate correction module, 505-altitude acquisition module, 506-display module.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure. Embodiments and features of embodiments in this application may be combined with each other arbitrarily without conflict. Also, while a logical order is depicted in the flowchart, in some cases, the steps depicted or described may be performed in a different order than presented herein.
In the prior art, some general methods for converting longitude and latitude coordinates into plane coordinates do not consider the influence of slice level and altitude on coordinate conversion, and are not suitable for slice maps, so that the accuracy of the coordinate conversion of the slice map in the prior art is lower.
In view of this, the present application provides a coordinate conversion method of a slice map, which can be performed by an android device, which installs a target application. Before describing a specific technical scheme of the application, a hardware running environment related to the scheme of the embodiment of the application is described.
Referring to fig. 1, fig. 1 is a schematic diagram of an android device structure of a hardware running environment according to an embodiment of the present application.
As shown in fig. 1, the android device may include: a processor 101, such as a central processing unit (Central Processing Unit, CPU), a communication bus 102, a user interface 103, a network interface 104, a memory 105. Wherein the communication bus 102 is used to enable connected communication between these components. The user interface 103 may comprise a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 103 may further comprise a standard wired interface, a wireless interface. The network interface 104 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 105 may be a high-speed random access Memory (Random Access Memory, RAM) Memory or a stable Non-Volatile Memory (NVM), such as a disk Memory. The memory 105 may alternatively also be a storage device separate from the aforementioned processor 101.
Those skilled in the art will appreciate that the structure shown in fig. 1 is not limiting of the android device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in fig. 1, the memory 105, which is a storage medium, may include an operating system, a data configuration module, a network communication module, a user interface module, and an electronic program.
In the android device shown in fig. 1, the network interface 104 is mainly used for data communication with a network server; the user interface 103 is mainly used for data interaction with a user; the processor 101 and the memory 105 in the android device can be arranged in the android device, and the android device calls the coordinate conversion device of the slice map stored in the memory 105 through the processor 101 and executes the coordinate conversion method of the slice map provided by the embodiment of the application.
Based on the android device of the foregoing embodiment, referring to fig. 2, an embodiment of the present application provides a coordinate conversion method of a slice map, including the following steps:
s201, acquiring a slice map loaded by a target application program.
Among them, the target application is, for example, various applications developed based on ArcGIS Runtime SDK for Android, specifically, various applications of maps. Slice levels refer to zoom levels of a slice map, each slice level representing a different level of map display, from global to detail rich local areas. At a lower slicing level, the map shows a larger area, but less detail, and at a higher slicing level, the map shows a smaller area, but more detail. A common slice level range is 0 to 18, where level 0 represents a global map and level 18 represents a very detailed local area, the user can select the slice level according to actual needs.
In the implementation process, the android device responds to the selection operation of a user on a target application program, determines an actual slicing level, slices an offline map of the target application program according to the actual slicing level, and takes the sliced offline map as a slice map.
S202, according to the longitude and latitude of the target position point in the slice map, a first abscissa and a first ordinate of the target position point are obtained.
In the implementation process, the target position point refers to any position point of coordinates to be converted in the slice map, a first abscissa of the target position point in the plane coordinate system is obtained by converting the longitude of the target position point in the geographic coordinate system, and a first ordinate of the target position point in the plane coordinate system is obtained by converting the latitude of the target position point in the geographic coordinate system.
S203, obtaining a target offset according to the actual slice level of the slice map and the actual altitude of the android device.
In the implementation process, if the selection operation of the user on the target application program is received, the slice level selected by the user is taken as the actual slice level of the slice map, and if the selection operation of the user on the target application program is not received, the default slice level is taken as the actual slice level of the slice map, for example, the default slice level is 15. The android device can acquire the actual altitude of the android device through a built-in sensor, and then set a target offset according to the actual slice level and the actual altitude.
S204, correcting the first abscissa and the first ordinate respectively according to the target offset to obtain a second abscissa and a second ordinate of the target position point.
In the specific implementation process, the first abscissa of the target position point is corrected according to the target offset, the second abscissa of the target position point is obtained, and the first ordinate of the target position point is corrected according to the target offset, so that the second ordinate of the target position point is obtained.
In the embodiment of the application, the converted plane coordinates are corrected by using the actual slice level of the slice map and the actual altitude of the android device, so that the corrected plane coordinates are more in line with the actual situation and are more accurate.
In one possible embodiment, the specific step of obtaining the first abscissa and the first ordinate of the target location point according to the longitude and latitude of the target location point in the slice map includes:
s1.1, obtaining a first abscissa of the target position point according to the maximum longitude and the minimum longitude of the slice map, the universal plane longitude range and the longitude of the target position point.
The general plane longitude range of the slice map is a difference value between a maximum general plane longitude and a minimum general plane longitude, the maximum general plane longitude of the slice map corresponds to an east boundary of the slice map, and the minimum general plane longitude corresponds to a west boundary of the slice map.
In the specific implementation process, firstly, the abscissa ratio of the plane corresponding to the slice map is obtained according to the maximum longitude, the minimum longitude and the universal plane longitude range of the slice map, then the abscissa length of the target position point is determined according to the abscissa ratio of the plane corresponding to the slice map, the minimum longitude and the longitude of the target position point, and finally the first abscissa of the target position point is determined according to the minimum universal plane longitude and the abscissa length of the target position point.
For example, the calculation formula of the abscissa scale of the corresponding plane of the slice map is as follows:
scaleX = ((rr-ll)*3600)/(r-l)
where scaleX is the abscissa scale of the plane corresponding to the slice map, rr is the maximum longitude, ll is the minimum longitude, r is the maximum universal plane longitude, l is the minimum universal plane longitude, and multiplying 3600 represents converting the units of degrees of the geographic coordinates into units of seconds.
The calculation formula of the abscissa length of the target position point is as follows:
lengX = (lon - ll)*3600/scaleX
where lengX is the abscissa length of the target position point, scaleX is the abscissa ratio of the plane corresponding to the slice map, lon is the longitude of the target position point, ll is the minimum longitude, and multiplying 3600 represents converting the units of degrees of the geographic coordinates into units of seconds.
The formula for determining the first abscissa of the target location point is as follows:
X=l+lengX
where X is the first abscissa of the target location point, lengX is the abscissa length of the target location point, and l is the minimum universal plane longitude.
S1.2, obtaining a first ordinate of the target position point according to the maximum latitude and the minimum latitude of the slice map, the latitude of the general plane latitude range and the latitude of the target position point.
The general plane latitude range is the difference value between the maximum general plane latitude and the minimum general plane latitude, the maximum general plane latitude corresponds to the north boundary of the slice map, and the minimum general plane latitude corresponds to the south boundary of the slice map.
In the specific implementation process, firstly, the ordinate proportion of the plane corresponding to the slice map is obtained according to the maximum latitude, the minimum latitude and the general plane latitude range of the slice map, then the abscissa length of the target position point is determined according to the ordinate proportion of the plane corresponding to the slice map, the minimum latitude and the latitude of the target position point, and finally the first ordinate of the target position point is determined according to the maximum general plane latitude and the ordinate length of the target position point.
For example: the calculation formula of the ordinate ratio of the corresponding plane of the slice map is as follows:
scaleY = ((uu-dd)*3600)/(u-d)
Wherein, scaleY is the ordinate proportion of the corresponding plane of the slice map, uu is the maximum latitude, dd is the minimum latitude, u is the maximum general plane latitude, d is the minimum general plane latitude, and multiplying 3600 represents converting the units of degrees of the geographic coordinates into units of seconds.
The calculation formula of the ordinate length of the target position point is as follows:
lengY = (uu - lat)*3600/scaleY
where lengY is the ordinate length of the target position point, scaleY is the ordinate ratio of the plane corresponding to the slice map, lat is the latitude of the target position point, uu is the maximum latitude, and multiplying 3600 represents converting the units of degrees of the geographic coordinates into units of seconds.
The first ordinate of the target position point is calculated as follows:
Y=u-lengY
wherein Y is the first ordinate of the target position point, lengY is the ordinate length of the target position point, and u is the maximum general plane latitude.
In the embodiment of the application, the longitude and latitude coordinates of the target position point are converted into plane coordinates, so that a basis is provided for subsequent coordinate correction.
In one possible embodiment, the specific step of obtaining the target offset according to the actual slice level of the slice map and the actual altitude of the android device comprises:
s2.1, determining a difference value between an actual slice level and a reference slice level of the slice map as a level difference value, and obtaining slice offset according to the level difference value and a slice level offset coefficient.
In the implementation, the reference slice level refers to a specific zoom level in the map slice, which is used as a reference for map display, and at the reference slice level, map data generally has a higher level of detail, which is sufficient to meet the needs of most users, and the reference slice level is generally 15. The slice level shift coefficient is a constant, and can be obtained through multiple experiments, and is generally 1.08. The slice offset and the level difference are positively correlated, and the slice offset and the slice level offset coefficient are positively correlated.
For example, the slice offset is calculated as follows:
OffsetS=(level-L)*c
the OffsetS is a slice offset, level is an actual slice level of the slice map, L is a reference slice level, l=15 is generally taken, c is a slice level offset coefficient, and c=1.08 is generally taken.
S2.2, determining a difference value between the actual altitude of the android device and the reference altitude as a height difference value, and obtaining altitude deviation according to the height difference value and the altitude deviation coefficient.
In the specific implementation, the reference altitude refers to a specific geographic area, and all altitude measurements are made by taking the altitude of a specific point in the area as a reference point. The reference altitude is determined so that altitude measurements in different regions are comparable, typically 3000. The altitude deviation coefficient is constant and can be obtained through multiple experiments, and is generally 2800. The altitude offset is positively correlated with the altitude difference and the altitude offset is negatively correlated with the altitude offset coefficient.
For example, the altitude offset is calculated as follows:
OffsetA=(high-H)/k
where OffsetA is the altitude offset, high is the actual altitude of the android device, H is the reference altitude, h=3000 is typically taken, k is the altitude offset coefficient, and k=2800 is typically taken.
S2.3, obtaining a target offset according to the slice offset and the elevation offset.
In the specific implementation, the target offset includes a horizontal offset and a vertical offset, which may be the same or different, and may be set in various manners according to slice offset and elevation offset, which will be described below.
In the first case, the horizontal offset amount and the vertical offset amount are the same.
The sum of the slice offset and the elevation offset is determined as a horizontal offset and the sum of the slice offset and the elevation offset is determined as a vertical offset.
In the second case, the horizontal offset amount and the vertical offset amount are different.
In the first embodiment, the slice offset is determined as a horizontal offset, and the elevation offset is determined as a vertical offset.
In a second mode, the slice offset is determined as a horizontal offset, and the sum of the slice offset and the altitude offset is determined as a vertical offset.
For example:
offsetX=OffsetS
offsetY=OffsetS+OffsetA
wherein offsetX is the horizontal offset, offsetS is the slice offset, offsetY is the vertical offset, and OffsetA is the altitude offset.
In the embodiment of the application, considering that the slice level affects both the abscissa in the horizontal direction and the ordinate in the vertical direction, the altitude mainly affects the ordinate in the vertical direction, so that the horizontal offset and the vertical offset are respectively determined in different modes, the accuracy of the offset is improved, and the accuracy of the subsequent coordinate conversion is further improved.
In one possible embodiment, the horizontal offset and the vertical offset are different, and the specific steps of correcting the first abscissa and the first ordinate according to the target offset to obtain the second abscissa and the second ordinate of the target position point include:
correcting the first abscissa according to the horizontal offset to obtain a second abscissa of the target position point; and correcting the first ordinate according to the vertical offset to obtain a second ordinate of the target position point.
For example:
sceenX=X+offsetX=l+lengX+offsetX
sceenY=Y+offsetY=u-lengY+offsetY
wherein sceenX is the second abscissa of the target position point, X is the first abscissa of the target position point, offsetX is the horizontal offset, l is the minimum universal plane longitude, and lengX is the abscissa length of the target position point. sceen Y is the second ordinate of the target location point, Y is the first ordinate of the target location point, offsetY is the horizontal offset, u is the maximum universal planar latitude, and lengY is the ordinate length of the target location point.
In the embodiment of the application, considering that the offsets of the abscissa and the ordinate are different, the first abscissa and the first ordinate are respectively corrected by adopting different horizontal offsets and different vertical offsets, so that the second abscissa and the second ordinate are obtained, and the accuracy of the corrected plane coordinate can be improved.
In a possible embodiment, after obtaining the plane coordinates, the android device may further load and display the plane coordinates according to a preset format and a preset precision of the target application program, where the specific steps include:
converting the second abscissa into a third abscissa meeting the preset format and the preset precision of the target application program; converting the second ordinate into a third ordinate meeting a preset format and preset precision; the target location point is displayed on the slice map in a third abscissa and a third ordinate.
In the implementation process, the preset format is the Point format, and the preset precision is generally 6 bits after the decimal Point.
For example:
xx = Double.valueOf(String.format("%.6f",sceenX))
yy = Double.valueOf(String.format("%.6f",sceenY))
where sceenX is the second abscissa, xx is the third abscissa, sceenY is the second ordinate, yy is the third ordinate. Double.valueof () represents a value converted into Double type, string.format () represents a value converted into character string,%. 6f represents 6 bits after reserved to decimal point.
In the embodiment of the application, format conversion and precision conversion are performed on the second abscissa and the second ordinate of the target position point, and the third abscissa and the third ordinate of the target position point are obtained.
In one possible embodiment, before obtaining the target offset from the actual slice level of the slice map and the actual altitude of the android device, the specific step of calculating the altitude comprises:
acquiring the atmospheric pressure of the height of the android device; and obtaining the actual altitude of the android device according to the atmospheric pressure.
In a specific implementation process, the android device is internally provided with a sensor, so that the atmospheric pressure can be obtained, and two methods for calculating the altitude according to the atmospheric pressure are mainly adopted: the calculation method of the barometric pressure altitude and the calculation method of the barometric pressure change rate are all in the prior art, and are not described herein.
In the embodiment of the application, the atmospheric pressure is acquired first and converted into the altitude in consideration of the fact that a certain relation exists between the atmospheric pressure and the altitude, so that the actual altitude of the android device can be accurately obtained, and further the accuracy of subsequent offset calculation and coordinate conversion is improved.
In order to more clearly describe the coordinate conversion method of the slice map according to the present application, the data preparation flow according to the embodiment of the present application is described below with reference to fig. 3.
S301, preparing a slice data packet.
The slice data packet of the offline map loaded in ArcGIS Runtime SDK for Android, i.e., the slice map, is acquired, the slice level is selected and recorded as a level at the time of slicing, and the format is a WGS84 coordinate system (also referred to as a longitude and latitude coordinate system).
S302, recording data.
The maximum latitude uu, the minimum latitude dd, the maximum general plane latitude u, the minimum general plane latitude d, the maximum longitude rr, the minimum longitude ll, the maximum general plane longitude r, and the minimum general plane longitude l of the slice map are recorded.
S303, converting the format.
The Tpk format and the mmpk format are map data formats of Esri company and are used for packaging map data into a file, so that the map data is convenient for offline use on android equipment, and a slice data packet can be converted into the Tpk format or the mmpk format.
S304, loading the slice data packet.
Map view (MapView) is a UI control or interface element for displaying maps, which is commonly used to create geo-location based applications such as map navigation, location search, geographic information presentation, etc., so that offline slicing packages can be loaded through MapView.
S305, acquiring the altitude.
The android device can acquire the atmospheric pressure of the altitude through a sensor manager (sensor manager), and convert the atmospheric pressure into the actual altitude of the android device.
Through S301-S305, offline data packets are loaded by MapView and a total of 10 data are acquired uu, dd, ll, rr, u, d, l, r, level, high.
Based on the 10 data prepared in fig. 3, a method for converting coordinates of a slice map according to an embodiment of the present application will be further described with reference to fig. 4.
S401, defining data.
By the flow of fig. 3, 8 data, i.e., the maximum latitude uu, the minimum latitude dd, the maximum universal plane latitude u, the minimum universal plane latitude d, the maximum longitude rr, the minimum longitude ll, the maximum universal plane longitude r, and the minimum universal plane longitude l, are all defined as double formats, i.e., double uu, double dd, double ll, double rr, double u, double d, double l, double r. The longitude lon and latitude lat of the target location point are defined as double lon and double lat, respectively. double represents the precision, which can reach 15 bits after decimal point.
S402, calculating the proportion.
And calculating the abscissa scale and the ordinate scale of the corresponding plane of the slice map according to the following formula:
scaleX = ((rr-ll)*3600)/(r-l)
scaleY = ((uu-dd)*3600)/(u-d)
Where scaleX is the abscissa scale of the corresponding plane of the slice map, scaleY is the ordinate scale of the corresponding plane of the slice map, and multiplying 3600 represents converting the units of degrees of the geographic coordinates into units of seconds. rr, ll, r, l, uu, dd, u, d please refer to the discussion of S401.
S403, calculating the length.
The abscissa and ordinate lengths of the target position point are calculated according to the following formula:
lengX = (lon - ll)*3600/scaleX
lengY = (uu - lat)*3600/scaleY
where lengX is the abscissa length of the target position point, lengY is the ordinate length of the target position point, multiplication with 3600 means conversion of the units of degrees of the geographic coordinates into units of seconds, the meanings of scaleX and scaleY refer to the contents discussed in S402, and the meanings of ll, uu, lon and lat refer to the contents discussed in S401.
S404, setting an offset.
The offset is calculated according to the following formula:
offsetX=(level-15)*1.08
offsetY=(level-15)*1.08+(high-3000)/2800
wherein offsetX is a horizontal offset, offsetY is a vertical offset, and the meanings of level and high are discussed with reference to S401.
S405, obtaining a final result.
The final result is obtained according to the following formula:
sceenX=l+lengX+offsetX
sceenY=u-lengY+offsetY
wherein, sceen x is the second abscissa of the target position point, sceen y is the second ordinate of the target position point, the meaning of lengX and lengY is referred to the content discussed in S403, the meaning of offsetX and offsetY is referred to the content discussed in S404, and the meaning of l and u is referred to the content discussed in S401.
S406, format conversion.
The final result needs to be converted into Point format as follows:
xx = Double.valueOf(String.format("%.6f",sceenX))
yy = Double.valueOf(String.format("%.6f",sceenY))
wherein xx is the third abscissa of the target position point, yy is the third ordinate of the target position point, double. The meanings of scenx and sceny are discussed with reference to S406.
Through S401-S406, the embodiment of the present application converts the latitude and longitude coordinates into a Point format that can be read by MapView, i.e., (xx, yy).
Referring to table 1, by the coordinate conversion method of the slice map provided in the embodiment of the present application, the position of the longitude and latitude point of the real-time map platform is compared with the point corresponding to the converted plane coordinate, and the distance error is controlled within 3 m. The coordinate conversion method of the slice map provided by the embodiment of the application is not influenced by the size of the slice map, the slice grade and the altitude of the android device, and has higher accuracy.
TABLE 1
In summary, the embodiment of the present application provides a coordinate conversion method for a slice map, which obtains a slice map loaded by a target application program in an android device, obtains a first abscissa and a first ordinate of a target location point according to a longitude and latitude of the target location point in the slice map, obtains a target offset according to an actual slice level of the slice map and an actual altitude of the android device, and corrects the first abscissa and the first ordinate according to the target offset to obtain a second abscissa and a second ordinate of the target location point. According to the embodiment of the application, the converted abscissa and ordinate are corrected by utilizing the actual slice level of the slice map and the actual altitude of the android device, so that the corrected abscissa and ordinate are more accurate, and the accuracy of coordinate conversion of the slice map is improved. The android device can accurately mark corresponding coordinate points, routes, ranges and the like by using the offline map under the condition of no network through the coordinate conversion method of the slice map.
Based on the same inventive concept, as shown in fig. 5, the embodiment of the present application further provides a coordinate conversion device of a slice map, where the coordinate conversion device of the slice map is set in an android device, and the android device installs a target application program, and the coordinate conversion device of the slice map includes:
the slicing module 501 is configured to obtain a slice map loaded by a target application program;
the coordinate obtaining module 502 is configured to obtain a first abscissa and a first ordinate of the target position point according to the longitude and latitude of the target position point in the slice map;
an offset obtaining module 503, configured to obtain a target offset according to an actual slice level of the slice map and an actual altitude of the android device;
the coordinate correcting module 504 is configured to correct the first abscissa and the first ordinate according to the target offset, and obtain a second abscissa and a second ordinate of the target position point.
Optionally, the offset obtaining module 503 is specifically configured to:
determining a difference value between an actual slice level and a reference slice level of the slice map as a level difference value, and obtaining slice offset according to the level difference value and a slice level offset coefficient; the slice offset and the grade difference value are positively correlated, and the slice offset and the slice grade offset coefficient are positively correlated;
Determining a difference value between the actual altitude of the android device and the reference altitude as an altitude difference value, and obtaining altitude deviation according to the altitude difference value and an altitude deviation coefficient; the altitude deviation is positively correlated with the altitude difference, and the altitude deviation is negatively correlated with the altitude deviation coefficient;
the target offset is obtained from the slice offset and the altitude offset.
Optionally, the target offset includes a horizontal offset and a vertical offset, the horizontal offset and the vertical offset being different; the coordinate correction module 504 is specifically configured to:
correcting the first abscissa according to the horizontal offset to obtain a second abscissa of the target position point;
and correcting the first ordinate according to the vertical offset to obtain a second ordinate of the target position point.
Optionally, the offset obtaining module 503 is specifically configured to:
before correcting the first abscissa according to the horizontal offset to obtain a second abscissa of the target position point, determining the slice offset as the horizontal offset;
the sum of the slice offset and the elevation offset is determined as the vertical offset.
Optionally, the coordinate conversion device of the slice map further includes an altitude obtaining module 505, where the altitude obtaining module 505 is configured to:
Acquiring the atmospheric pressure of the height of the android device before acquiring the target offset according to the actual slice level of the slice map and the actual altitude of the android device;
and obtaining the actual altitude of the android device according to the atmospheric pressure.
Optionally, the coordinate conversion device of the slice map further includes a display module 506, where the display module 506 is configured to:
after the first abscissa and the first ordinate are corrected according to the target offset respectively to obtain a second abscissa and a second ordinate of the target position point, converting the second abscissa into a third abscissa meeting the preset format and the preset precision of the target application program;
converting the second ordinate into a third ordinate meeting a preset format and preset precision;
the target location point is displayed on the slice map in a third abscissa and a third ordinate.
Optionally, the coordinate obtaining module 502 is specifically configured to:
obtaining a first abscissa of a target position point according to the maximum longitude and the minimum longitude of the slice map, the universal plane longitude range and the longitude of the target position point;
and obtaining a first ordinate of the target position point according to the maximum latitude and the minimum latitude of the slice map, the latitude of the general plane latitude range and the latitude of the target position point.
It should be noted that, each module in the coordinate conversion device of the slice map in this embodiment corresponds to each step in the coordinate conversion method of the slice map in the foregoing embodiment, so the specific implementation of this embodiment may refer to the implementation of the coordinate conversion method of the slice map and will not be described herein.
In addition, in one embodiment, the application further provides a computer device, which comprises a processor, a memory and a computer program stored in the memory, wherein the computer program is executed by the processor to realize the coordinate conversion method of the slice map.
In addition, in one embodiment, the present application further provides a computer storage medium, where a computer program is stored, and the computer program is executed by a processor to implement the coordinate conversion method of the slice map.
In some embodiments, the computer readable storage medium may be FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; but may be a variety of devices including one or any combination of the above memories. The computer may be a variety of computing devices including smart terminals and servers.
In some embodiments, the executable instructions may be in the form of programs, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and they may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
As an example, the executable instructions may, but need not, correspond to files in a file system, may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a hypertext markup language (HTML, hyper Text Markup Language) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code).
As an example, executable instructions may be deployed to be executed on one computing device or on multiple computing devices located at one site or, alternatively, distributed across multiple sites and interconnected by a communication network.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. read-only memory/random-access memory, magnetic disk, optical disk), comprising several instructions for causing a multimedia terminal device (which may be a mobile phone, a computer, a television receiver, or a network device, etc.) to perform the method described in the embodiments of the present application.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the claims, and all equivalent structures or equivalent processes using the descriptions and drawings of the present application, or direct or indirect application in other related technical fields are included in the scope of the claims of the present application.

Claims (10)

1. The coordinate conversion method of the slice map is characterized by being applied to android equipment, wherein the android equipment is provided with a target application program, and the coordinate conversion method of the slice map comprises the following steps:
acquiring a slice map loaded by the target application program;
obtaining a first abscissa and a first ordinate of a target position point according to the longitude and latitude of the target position point in the slice map;
obtaining a target offset according to the actual slice level of the slice map and the actual altitude of the android device;
and correcting the first abscissa and the first ordinate respectively according to the target offset to obtain a second abscissa and a second ordinate of the target position point.
2. The coordinate conversion method of a slice map according to claim 1, wherein the obtaining a target offset from an actual slice level of the slice map and an actual altitude of the android device comprises:
Determining a difference value between an actual slice level and a reference slice level of the slice map as a level difference value, and obtaining slice offset according to the level difference value and a slice level offset coefficient; the slice offset is positively correlated with the grade difference value, and the slice offset is positively correlated with the slice grade offset coefficient;
determining a difference value between the actual altitude of the android device and a reference altitude as an altitude difference value, and obtaining altitude deviation according to the altitude difference value and an altitude deviation coefficient; the altitude offset is positively correlated with the altitude difference, and the altitude offset is negatively correlated with the altitude offset coefficient;
and obtaining a target offset according to the slice offset and the elevation offset.
3. The coordinate conversion method of a slice map according to claim 2, wherein the target offset amount includes a horizontal offset amount and a vertical offset amount, the horizontal offset amount and the vertical offset amount being different; the correcting the first abscissa and the first ordinate according to the target offset to obtain a second abscissa and a second ordinate of the target position point includes:
Correcting the first abscissa according to the horizontal offset to obtain a second abscissa of the target position point;
and correcting the first ordinate according to the vertical offset to obtain a second ordinate of the target position point.
4. The coordinate conversion method of the slice map as claimed in claim 3, wherein before correcting the first abscissa according to the horizontal offset amount, the coordinate conversion method of the slice map further comprises:
determining the slice offset as the horizontal offset;
the sum of the slice offset and the elevation offset is determined as the vertical offset.
5. The coordinate conversion method of a slice map according to claim 1, wherein before obtaining a target offset amount based on an actual slice level of the slice map and an actual altitude of the android device, the coordinate conversion method of the slice map further comprises:
acquiring the atmospheric pressure of the height of the android device;
and obtaining the actual altitude of the android device according to the atmospheric pressure.
6. The coordinate conversion method of a slice map according to claim 1, wherein after correcting the first abscissa and the first ordinate, respectively, according to the target offset, to obtain a second abscissa and a second ordinate of the target position point, the coordinate conversion method of a slice map further comprises:
Converting the second abscissa into a third abscissa meeting the preset format and preset precision of the target application program;
converting the second ordinate to a third ordinate satisfying the preset format and the preset precision;
the target location point is displayed on the slice map with the third abscissa and the third ordinate.
7. The method for converting coordinates of a slice map according to claim 1, wherein the obtaining a first abscissa and a first ordinate of a target position point according to a longitude and latitude of the target position point in the slice map comprises:
obtaining a first abscissa of the target position point according to the maximum longitude and the minimum longitude of the slice map, the universal plane longitude range and the longitude of the target position point;
and obtaining a first ordinate of the target position point according to the maximum latitude and the minimum latitude of the slice map, the latitude range of the general plane and the latitude of the target position point.
8. The utility model provides a coordinate conversion device of slice map, its characterized in that, the coordinate conversion device of slice map sets up in the android device, target application is installed to the android device, the coordinate conversion device of slice map includes:
The slicing module is used for acquiring a slicing map loaded by the target application program;
the coordinate obtaining module is used for obtaining a first abscissa and a first ordinate of the target position point according to the longitude and latitude of the target position point in the slice map;
the offset obtaining module is used for obtaining a target offset according to the actual slice level of the slice map and the actual altitude of the android device;
and the coordinate correction module is used for correcting the first abscissa and the first ordinate respectively according to the target offset to obtain a second abscissa and a second ordinate of the target position point.
9. A computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor executing the computer program to implement the coordinate conversion method of the slice map as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, wherein the computer-readable storage medium has a computer program stored thereon, and a processor executes the computer program to implement the coordinate conversion method of the slice map as claimed in any one of claims 1 to 7.
CN202410158234.2A 2024-02-04 2024-02-04 Coordinate conversion method, device, equipment and medium for slice map Active CN117688122B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410158234.2A CN117688122B (en) 2024-02-04 2024-02-04 Coordinate conversion method, device, equipment and medium for slice map

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410158234.2A CN117688122B (en) 2024-02-04 2024-02-04 Coordinate conversion method, device, equipment and medium for slice map

Publications (2)

Publication Number Publication Date
CN117688122A true CN117688122A (en) 2024-03-12
CN117688122B CN117688122B (en) 2024-04-30

Family

ID=90130554

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410158234.2A Active CN117688122B (en) 2024-02-04 2024-02-04 Coordinate conversion method, device, equipment and medium for slice map

Country Status (1)

Country Link
CN (1) CN117688122B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101561494A (en) * 2008-04-18 2009-10-21 中华电信股份有限公司 Intelligent positioning correcting system and method
US20140362082A1 (en) * 2011-05-03 2014-12-11 Google Inc. Automated Overpass Extraction from Aerial Imagery
CN110188496A (en) * 2019-06-04 2019-08-30 湖南特能博世科技有限公司 Graphical survey data generation method, device and terminal
CN112132952A (en) * 2020-08-18 2020-12-25 北京旋极伏羲科技有限公司 Construction method of three-dimensional grid map based on subdivision frame
CN112269849A (en) * 2020-10-31 2021-01-26 武汉中海庭数据技术有限公司 Three-dimensional map display method, system, electronic equipment and storage medium
CN113811920A (en) * 2019-05-16 2021-12-17 高通股份有限公司 Distributed pose estimation
CN115760821A (en) * 2022-11-28 2023-03-07 以萨技术股份有限公司 Method for generating map slice based on orthophoto map of unmanned aerial vehicle
CN115858973A (en) * 2023-02-23 2023-03-28 北京德风新征程科技股份有限公司 Grid map analysis method, device, equipment and medium
CN116977585A (en) * 2023-08-02 2023-10-31 重庆第五维科技有限公司 Holographic projection method
CN117095098A (en) * 2022-05-13 2023-11-21 中国移动通信集团四川有限公司 Image rendering method, device, electronic equipment and computer readable storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101561494A (en) * 2008-04-18 2009-10-21 中华电信股份有限公司 Intelligent positioning correcting system and method
US20140362082A1 (en) * 2011-05-03 2014-12-11 Google Inc. Automated Overpass Extraction from Aerial Imagery
CN113811920A (en) * 2019-05-16 2021-12-17 高通股份有限公司 Distributed pose estimation
CN110188496A (en) * 2019-06-04 2019-08-30 湖南特能博世科技有限公司 Graphical survey data generation method, device and terminal
CN112132952A (en) * 2020-08-18 2020-12-25 北京旋极伏羲科技有限公司 Construction method of three-dimensional grid map based on subdivision frame
CN112269849A (en) * 2020-10-31 2021-01-26 武汉中海庭数据技术有限公司 Three-dimensional map display method, system, electronic equipment and storage medium
CN117095098A (en) * 2022-05-13 2023-11-21 中国移动通信集团四川有限公司 Image rendering method, device, electronic equipment and computer readable storage medium
CN115760821A (en) * 2022-11-28 2023-03-07 以萨技术股份有限公司 Method for generating map slice based on orthophoto map of unmanned aerial vehicle
CN115858973A (en) * 2023-02-23 2023-03-28 北京德风新征程科技股份有限公司 Grid map analysis method, device, equipment and medium
CN116977585A (en) * 2023-08-02 2023-10-31 重庆第五维科技有限公司 Holographic projection method

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
HALIL UTKU UNLU 等: "UAV- Navigation Using Map Slicing and Safe Path Computation", 《INTERNATIONAL CONFERENCE ON AUTOMATION, ROBOTICS AND APPLICATIONS》, 23 May 2023 (2023-05-23), pages 208 - 212 *
周月 等: "基于先验信息约束的重磁电联合三维交互反演技术实践——以彭山穹隆构造为例", 《物探与化探 》, 7 April 2021 (2021-04-07), pages 308 - 315 *
唐嘉宁 等: "未知环境下改进DDQN的无人机探索航迹规划研究", 《电光与控制》, 23 February 2023 (2023-02-23), pages 23 - 27 *
梅鸿辉 等: "一种全球尺度三维大气数据可视化系统", 《软件学报》, 15 May 2016 (2016-05-15), pages 1140 - 1150 *

Also Published As

Publication number Publication date
CN117688122B (en) 2024-04-30

Similar Documents

Publication Publication Date Title
US9983002B2 (en) Enhancing geolocation using barometric data to determine floors at a location
US8898034B2 (en) Automatically identifying geographic direction
CN111707233B (en) Positioning method and device of terminal equipment, terminal equipment and storage medium
US9389136B2 (en) Calibration method of air pressure for a mobile device, calibration device, and mobile device
US20150153182A1 (en) System and method for calibrating a navigation heading
Felipe-García et al. Analysis of the ground sample distance on large photogrammetric surveys
CN111352129A (en) Method and device for monitoring differential quality and computer medium
CN117688122B (en) Coordinate conversion method, device, equipment and medium for slice map
Pérez et al. On the positional accuracy and maximum allowable scale of UAV-derived photogrammetric products for archaeological site documentation
Igondová et al. Precipitable Water Vapour and Zenith Total Delay time series and models over Slovakia and vicinity
US20120185206A1 (en) Method for setting the geolocation of a non-gps enabled device
US20150264524A1 (en) Method and system for aggregating messages based on a point of interest and storage medium
CN112800163B (en) Map interface display method and device, computer equipment and storage medium
JP2019020260A (en) Parameter distribution system
KR20210024860A (en) Apparatus and method for selecting airborne position reference node
CN103902633A (en) Method, device and system for generating POI hotspot data
Altunel et al. Capturing the level of progress in vertical accuracy achieved by ASTER GDEM since the beginning: Turkish and Nigerian examples
CN106443732B (en) Path diagram drawing method and system based on GPS
WO2020130787A1 (en) A global positioning system data format conversion method and system thereof
CN111598532A (en) Automatic generation method and system of disaster assessment report
JP4592779B2 (en) Virtual position display system, virtual position display method, and display terminal device
CN112650822B (en) Map access method, map access device, electronic equipment and machine-readable storage medium
JP2014038356A (en) Information output device and information output method
Yilmaz et al. Modelling the orthoimage accuracy using DEM accuracy and off-nadir angle
US20240211452A1 (en) System and method for improving building data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant