CN113032506B - Storage and transmission method of vector position data - Google Patents

Storage and transmission method of vector position data Download PDF

Info

Publication number
CN113032506B
CN113032506B CN202110305243.6A CN202110305243A CN113032506B CN 113032506 B CN113032506 B CN 113032506B CN 202110305243 A CN202110305243 A CN 202110305243A CN 113032506 B CN113032506 B CN 113032506B
Authority
CN
China
Prior art keywords
value
bit
int
data
base
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.)
Active
Application number
CN202110305243.6A
Other languages
Chinese (zh)
Other versions
CN113032506A (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.)
Ludong University
Original Assignee
Ludong University
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 Ludong University filed Critical Ludong University
Priority to CN202110305243.6A priority Critical patent/CN113032506B/en
Publication of CN113032506A publication Critical patent/CN113032506A/en
Application granted granted Critical
Publication of CN113032506B publication Critical patent/CN113032506B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/56Information retrieval; Database structures therefor; File system structures therefor of still image data having vectorial format
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0006Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0078Avoidance of errors by organising the transmitted data in a format specifically designed to deal with errors, e.g. location
    • H04L1/0079Formats for control data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/24Testing correct operation
    • H04L1/245Testing correct operation by using the properties of transmission codes
    • H04L1/246Testing correct operation by using the properties of transmission codes two-level transmission codes, e.g. binary

Abstract

The invention discloses a method for storing and transmitting vector position data, which customizes a data format by the change range of the position data to be stored, sets an estimated bit or a data distribution identification bit at the last bit of the data according to the requirement of data precision, and achieves millimeter-level positioning precision in a storage space of 4 bytes. Therefore, the storage and transmission method of the vector position data reduces the space required by the storage of the vector position data and reduces the data transmission amount in the transmission process.

Description

Storage and transmission method of vector position data
Technical Field
The invention relates to the field of data storage and transmission, in particular to a method for storing and transmitting vector position data.
Background
Data of the position and shape of a map graphic or a geographic entity represented in a cartesian coordinate system is generally stored using vector data. The vector position data generally represents the spatial position information of the geographic entity to be accurate by recording coordinate values.
The most common coordinate systems used for the current vector data include a WGS-84 coordinate system, a J2000 coordinate system and the like.
The coordinate values of the recorded location point in the WGS-84 coordinate system are generally longitude lon, latitude lat and height alt, where the unit of longitude and latitude is generally degree, and the unit of height is meter.
The coordinate values of the recording position point in the J2000 coordinate system are generally x, y, and z, and are measured in meters, for example, a certain position point coordinate value x is-247517.6126426, y is 5511407.8685368, and z is 3207802.9863406. Coordinate values of the same position point in different coordinate systems can be converted and calculated mutually.
Vector position data is widely applied to the fields of navigation positioning, map service and the like, nowadays, the rapid development of the vector position data is that hundreds of millions of mobile navigation terminals work every day, so that huge amount of vector position data needs to be stored and transmitted through a network every day in the current society. Vector position data is stored in a digital storage and transmission system by using float type numerical values, the float type numerical values generally only have 7-bit effective digit accuracy in a computer at present, the float type numerical values are used for storing accurate vector position data such as longitude values lon of 123.6592465636, latitude values lat of 29.9840453269 and altitude values alt of 2764.9015569712, only longitude values 123.6592, latitude values 29.98404 and altitude values 2764.901 can be obtained, each component value can only store 7 effective digits, the latter numerical values are lost, and the stored data is not high in accuracy as far as distance error dT 1.1131949 meters caused by a deviation of 0.00001 degree longitude at 0 degree latitude.
In order to further improve the precision of data, the existing method generally adopts a double type numerical value for storage, but this results in doubling of data space and increase of storage and transmission costs.
Therefore, how to improve the storage accuracy of the vector position data without increasing the storage and transmission costs is a goal that those skilled in the art continuously pursue.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: a storage and transmission method of vector position data is provided, and higher data precision is realized by smaller space and transmission amount.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
a storage and transmission method of vector position data comprises a modulation step, a storage and transmission step and a resolution step, wherein the modulation step comprises the following steps:
s1, converting the format of the position value to be stored and transmitted, recording the converted position value in decimal form, and determining the variation range and precision requirement delta of the value X to be stored, wherein the value X comprises an integer part XintAnd a fractional part Xdec
S2, determining the decimal part X needing to be accurately stored according to the precision requirement deltadecThe number of bits N;
s3, multiplying X by 10NObtaining X ', X' is a residue of an integer part XintM numbers and a fractional part X ofdecAn integer value of N digits of (a);
s4, determining the minimum bit number M required by all possible values within the variation range of the values of X 'when converting X' into binary number according to the integer type;
s5, judging whether to use the data precision requirement deltaSetting a data distribution identification bit according to the value of the (N +1) th bit after the decimal point of X, and converting X 'into M bits or M + 1bit binary number X'int-bit
The storage and transmission steps are to X'int-bitStoring and transmitting;
in the analyzing step, if no data distribution identification bit exists, the estimated value of the (N +1) th bit after the X decimal point is set according to the data precision requirement, and the rest steps are the inverse operation of the modulating step.
Compared with the prior art, the invention has the following technical effects:
according to the change range of the numerical value required to be stored, a data format is customized, and the high-precision storage and transportation of the specific data can be realized with the minimum data volume.
The problems that the number of the exponent item and the mantissa item in the traditional general float format is fixed and invariable, the number of the exponent item and the mantissa item is insufficient, the effective digital digits of single float storage are insufficient, the data precision is insufficient, a large amount of space is occupied by double format storage, and the data space utilization rate is not high are solved.
On the basis of the technical scheme, the invention can be further improved as follows.
Further, if the precision requirement is delta<=5×10-(N+1)At this time, it is not necessary to set the data distribution flag bit, X'int-bitIs an M-bit binary number, and in the analyzing step, after the precise integer value X 'is obtained through analysis, the X' is divided by 10NObtaining an intermediate floating point number X ', setting the (N +1) th bit after the decimal point of the intermediate floating point number X' as an estimated bit, setting the numerical value of the estimated bit as 4 or 5, and obtaining an analyzed final result numerical value X ', wherein the numerical error precision of the X' and the original floating point data X can be ensured to be not more than 5 × 10-(N+1)
The advantage of adopting the above further scheme is that although the exact value of the specific (N +1) th digit can not be stored, the maximum error can be controlled to be 5 x 10-(N+1)Within the range. Since the (N +1) th bit can be only one of 0-9, and is set to 4 or 5 during the analysis process, the value obtained after the analysis and the real value can be ensuredMaximum error between numerical values not exceeding 5 × 10-(N+1)
Further, if the precision requirement is delta<=2×10-(N+1)At this time, it is necessary to set a data distribution flag bit, X'int-bitIs M + 1bit binary number, when storing and transmitting X ', the 1bit data distribution identification bit is added after the M bit binary number corresponding to the integer value X', when X is useddecWhen the value corresponding to the N +1 th bit is 0 to 4, the data distribution identification bit is set to be in a first state, and when X is in a second statedecWhen the value corresponding to the (N +1) th bit is 5 to 9, setting the data distribution identification bit to be in a second state;
in the resolving step, after resolving M-bit binary number to obtain accurate integer value X', dividing by 10NObtaining a middle floating point number X ",
if the data distribution identification bit is in a first state, setting the (N +1) th bit behind the decimal point of the intermediate floating point number X 'as 2 to obtain a final result numerical value X';
and if the data distribution identification bit is in the second state, setting the (N +1) th bit behind the decimal point of the floating point number X 'to be 7, and obtaining a final result numerical value X'.
The beneficial effect of adopting the further proposal is that although the value of the (N +1) th bit can not be accurately recorded by only 1bit, the value of the (N +1) th bit can be recorded between 0 and 4 or between 5 and 9, if the value of the (N +1) th bit is between 0 and 4, the bit 2 is set during analysis, if the value of the (N +1) th bit is between 5 and 9, the bit is set to be 7 artificially, and the maximum error between the value obtained by analysis and the real value can be ensured not to exceed 2 multiplied by 10-(N+1)
Further, in step S5, a total of T-M × w or T-M +1 × w bit storage spaces are required for a batch of w data that have the same variation range of the value X and the same precision requirement δ, and the data is stored or transmitted with 1 byte as the minimum storage unit, and is filled with 0 when the last bits of T are less than 1 byte.
The beneficial effect of adopting the further scheme is that byte type is adopted for storage and transmission, and the efficiency is higher.
Further, according to the variation of the value X required to be storedConverting speed to X'int-bitSplit into a base numerical portion X'int-baseAnd a variable numerical part X'int-varThe base numerical value part X'int-baseRemains unchanged for time T;
storing and transmitting a plurality of values X within a time TiWhen the first value X is stored and transmitted in the step S51Time-transmitted base value part X'int-base-1And a variable numerical part X'int-var-1After transmitting the remainder XiAt all, only the fluctuating value part X 'is stored and transmitted'int-var-i
In the analysis step, X is used1Of base number fraction X'int-base-1Remaining X as store transfer within time TiBase number fraction X'int-base-i
The beneficial effect of adopting the above further scheme is that when the change speed of the numerical value X to be stored is slower in a certain time, the front part of the effective number is generally kept unchanged, only a few effective numbers at the tail part are changed, a proper balance point is found, and only the changed part of the transmission can be stored in a certain time, thereby further reducing the data quantity of storage and transmission.
Further, the numerical value X is longitude data expressed in degrees in a WGS-84 coordinate system, and the precision requirement delta is<5×10-8Of said binary number X'int-bit32 bits are required, with the base number value part X'int-baseIs 12bit, and the variable value part X'int-varIs 20 bits. Base number fraction X'int-baseThe digital sign number of the numerical value X is an integer value consisting of an integer part number of 1 sign bit and 11bit bits representing the numerical value X and a first number after a decimal point; numerical value part X'int-varThe 20bit of the digital value X is an integer value formed by 6 digits from the 2 nd bit to the 7 th bit after the decimal point of the digital value X.
The advantage of adopting the above further scheme is that the longitude data 5 x 10 is realized by only adopting 32 bits (4 bytes)-8Corresponds to an error of 5.6 mm in the actual distance. Far higher than when float format is adopted1 x 10 of storage precision-5
Further, the numerical value X is latitude data expressed in degree in a WGS-84 coordinate system, and the precision requirement delta<2×10-8Of said binary number X'int-bit32 bits are required, with the base number value part X'int-baseIs 11bit, and the variable value part X'int-varIs 21 bit. Base number fraction X'int-baseThe digital sign number of the numerical value X is an integer value consisting of an integer part number of 1 sign bit and 10 bit bits representing the numerical value X and a first number after a decimal point; numerical value part X'int-varThe 20 bits of (A) are integer values consisting of 6 digits from 2 nd bit to 7 th bit after decimal point of the value X, and the value part X 'is changed'int-varIs a data distribution identification bit.
Further, the value X is altitude elevation data in a Digital Elevation Model (DEM).
The beneficial effect of adopting the above-mentioned further scheme is that, application scope is wide, can be used to the geographical position information such as storage latitude, longitude, height above sea level.
Drawings
Fig. 1 is a flow chart illustrating a method for storing and transmitting vector position data according to the present invention.
Detailed Description
The principles and features of this invention are described below in conjunction with the following drawings, which are set forth by way of illustration only and are not intended to limit the scope of the invention.
Fig. 1 is a schematic flow chart showing a method for storing and transmitting vector position data according to the present invention.
In the case of decimal representation, the latitude ranges from-90.0 to 90.0 degrees, the circumference at the equator is 40076000 meters (which can be considered as the maximum circumference of the earth), and the positioning accuracy of 1 meter can be calculated by 5 bits after the decimal point and 1 centimeter can be realized by 7 bits after the decimal point. The float type numerical value is currently stored in a computer with 7-bit effective digit accuracy, vector position data with accuracy of a longitude value 123.6592465636, a latitude value 29.9840453269 and an altitude value 2764.9015569712 are stored by using the float type, only a longitude value 123.6592, a latitude value 29.98404 and an altitude value 2764.901 can be obtained, each component value can store 7 effective digits, the following numerical values are lost, and the stored data is not high in accuracy as the distance error dT caused by a 0.00001-degree longitude deviation at 0 degree latitude is 1.1131949 meters.
In order to further improve the precision of data, the existing method generally adopts a double type numerical value for storage, but this results in doubling of data space and increase of storage and transmission costs.
The storage example is carried out by using the method provided by the invention:
A. latitude values are stored using 4 bytes:
using lat to express latitude value, it is necessary to precisely store the 7-bit value after decimal point, first taking the absolute value of lat value and amplifying by 10 times to obtain latX10A value; lat taking deviceX10The integer part of the value is marked as the base value part latX10_integerValue, latX10The fractional part of the value is amplified by 1000000 times and rounded to obtain the precise mantissa part which is marked as latX10_partX6Therefore, the first 7-bit numerical values after the lat value decimal point are accurately stored; checking the eighth digit after the decimal point of the lat value, and determining the data distribution identification bit lat according to the range of the numerical value of the eighth digit_part8The value of (c). When storing the latitude lat value, actually distributing 32 bits in the computer, and the data information content structure is as follows:
Figure BDA0002987649510000071
32bit data information content when table latitude value is stored
The sign of the lat value is stored using 1bit, and if the lat value is negative, the bit is set to 0, and if the lat value is positive, the bit is set to 1, but it is also possible to specify that the bit is 0.
For latitude data, latX10_integerThe value ranges between 0 and 900, 10bithe storage space of t bits can store the unsigned integer value 1023 at most, and the storage requirement is met;
latX10_partX6the value range is between 0 and 999999, the storage space of 20 bits can store the unsigned integer value 1048575 to the maximum, and the storage requirement is met;
the exact value of the 8 th bit after the lat decimal point should be one of 0-9, and it is obvious that the exact value of the 8 th bit after the lat decimal point cannot be accurately stored only by using 1bit, so the data distribution identification bit lat is set_part8For recording the distribution range of the 8 th bit value after lat decimal point:
exact value of bit 8 after lat decimal point<5, distribute the data with the identification bits lat_part8Set to 0, when the lat decimal point is followed by the 8 th bit exact value>When the data distribution is equal to 5, the data distribution identification bit lat_part8Is set to 1. The purpose of this is: although the eighth digit after the decimal point of the lat value cannot be accurately recorded, the approximate value range of the accurate value of the 8 th digit after the lat decimal point is recorded, and a digit can be assigned to the eighth digit according to the value range during subsequent analysis, so that the maximum error of the latitude value is ensured to be 0.00000002. For example, the eighth digit after the decimal point of the lat value is 1, since 1<5, so the data is distributed with the flag bit lat_part8Set to 0 for storage, and then later analyze the latitude data to obtain lat_part8Since 0 means that the exact value of the eighth bit after the decimal point of the original lat value is less than 5, the error between the value obtained by analyzing the value and the exact value of the original lat is 0.00000001 by setting the 8 th bit after the decimal point to 2 as it is, and it is understood that: as long as the eighth digit after the decimal point of the original lat value is less than 5, no matter which digit is 0, 1, 2, 3, or 4, the maximum error between the 8 th digit and the assigned digit 2 is 0.00000002(2-0 ═ 2, 2-1 ═ 1, 2-2 ═ 0, 3-2 ═ 1, or 4-2 ═ 2). However, if the 1-bit information is not recorded, the eighth digit after the decimal point of the lat value is unknown, if the number 5 is specified at the 8 th digit after the latitude value is resolved, the maximum error from the original lat value may be 0.00000005, and if the number 7 is specified at the 8 th digit after the latitude value is resolved, the maximum error from the original lat value may be 0.00000007! Therefore, the data distribution identification bit lat_part8The bit is the maximum error used to control the latitude value.
For the above latitude precision value lat (generally of double type), "symbol value", "lat" are sequentially assignedX10_integer”、“latX10_partX6"and" lat_part8Four parts of information are stored, so that a new 4-byte latitude value is obtained and marked as latNew
And 4, storing the four parts in the first table without making a requirement on the sequence, and keeping the sequence consistent in the analysis process.
When storing and transmitting the latitude value, only lat needs to be stored and transmittedNewIt can be seen that only 4 bytes are needed, the storage accuracy can be controlled to be less than 0.00000002, corresponding to a distance error of about 2.3mm in real space.
More specifically: for a double latitude lat-89.6634678497, the sign value is negative, the absolute value of lat is first multiplied by 10 to obtain latX10896.634678497; lat taking deviceX10The integer part of the value is labeled latX10_integer896, get latX10The fractional part of the value is enlarged by 1000000 times and rounded to obtain a value labeled as latX10_partX6634678; the eighth digit after the point where the lat value is decimal 4, since 4<5, marking data distribution identification bit lat_part8=0。
Sequentially converting the symbol value and latX10_integer”、“latX10_partX6"and" lat_part8Four parts of information storage are carried out, and a 32-bit data binary structure is obtained as follows:
Figure BDA0002987649510000081
table two value lat-89.6634678497 storing processed binary structure
The 32-bit binary data is a new latitude value latNewAnd storing and transmitting.
B. Reading/receiving 4-byte latitude value latNewAnalyze outWeft value lat2 procedure:
the latitude value lat of 32bitNewAccording to "symbol value", "latX10_integerValue "," latX10_partX6The values "and" lat_part8The value range "the order of the four-part information during writing is analyzed to obtain the numerical values of the corresponding four parts, assuming that the weft value of the double type is analyzed to be labeled as lat2, firstly solving lat 2',
lat2’=(latX10_integer/10.0)+latX10_partX6/10000000.0;
if data distribution identification bit lat_part8If the value of (1) is 0, the eighth digit after the decimal point of the original lat value is indicated<5, we set the eighth digit after the decimal point of lat 2' to 2 to obtain lat2 "to ensure that the maximum error between the weft value lat2 and the original lat value obtained by analysis does not exceed 0.00000002, i.e. lat2 ″ (lat)X10_integer/10.0)+latX10_partX6/10000000.0+0.00000002;
If data distribution identification bit lat_part8If the value of (1) is equal to 1, the eighth digit after the decimal point of the original lat value is indicated>At this time, we set the eighth digit after the decimal point of lat 2' to 7 to obtain lat2 "to ensure that the maximum error between the analyzed latitude value lat2 and the original lat value does not exceed 0.00000002, i.e., lat 2" is equal to (lat 2 ″)X10_integer/10.0)+latX10_partX6/10000000.0+0.00000007;
Finally, if the 1bit value of the "sign value" is 0, the original lat value is negative, and lat2 "is negative, i.e., lat2 is-lat 2".
If the 1bit value of the "sign value" is 1, it indicates that the original lat value is a positive value, and lat2 "does not need to be processed, i.e., lat2 is lat 2".
For example, a latitude value lat of 4 bytes is received at the mobile terminalNewThe binary data of (a) is as follows:
Figure BDA0002987649510000091
the table three network terminal receives the binary data of 4 bytes latitude after storage processing
The "sign value" bit is 0 and lat are obtained by analyzing according to the order of writingX10_integer=896,latX10_partX6634678 and lat_part80; assuming that the weft value of double type is resolved is labeled lat2,
lat2’=(latX10_integer/10.0)+latX10_partX6/10000000.0=89.6634678。
identification bit lat due to data distribution_part8Is 0, the eighth digit after the decimal point of lat 2' is set to 2, i.e., lat2 ″ -89.66346782.
Finally, if the 1bit value of the "sign value" is 0, the original lat value is negative, and the negative number of lat2 "is taken to obtain lat2 ═ lat2 ═ 89.66346782.
It can be seen that the latitude value is stored by applying the method, the maximum error between the lat2 value obtained by analysis and the original lat value is 0.00000002, that is, the maximum error of 2 exists in the eighth bit after the decimal point. In addition, on the same longitude, the actual distance error dT between two points with the latitude different by 0.00000002 degrees is 0.00221148 meters, that is, the maximum error of the latitude value is less than 2.3 millimeters.
C. Store longitude values using 4 bytes:
the vector location point longitude accuracy is marked with lon. Because the range of the lon value is between-180.0 and 180.0 degrees, the numerical value of the first 7 bits after the decimal point is confirmed to be accurately stored, the absolute value of the lon value is firstly taken and amplified by 10 times, and the lonX value is obtained; taking the integer part of the lonX value as the longitude base data part and as lonX_integerTaking the decimal part of the lonX value, amplifying by 1000000 times, and rounding to obtain the longitude accurate mantissa part labeled as lonX_partX6(ii) a When the longitude lon value is stored, 32 bits are distributed, and the data information content structure is as follows:
Figure BDA0002987649510000101
32bit data information content when table four longitude numerical value is stored
Wherein, 1bit is used to store the numerical sign of the lon value, if the lon value is negative, the bit is set to 0, and if the lon value is positive, the bit is set to 1.
lonX_integerThe value range is 0 to 1800, 11-bit storage space is allocated to store unsigned integer value 2048 at most, and the storage requirement is met;
lonX_partX6the value range is 0 to 999999, the storage space of 20 bits is allocated to store the unsigned integer value 1,048,575 to the maximum extent, and the storage requirement is met;
for the longitude exact value lon (generally of double type), the "symbol value", "lonX" are ordered in sequence_integer”、“lonX_partX6Three-part information storage, a new longitude value of 4 bytes is obtained, and the new longitude value is marked as lonNew. The sequence of the three parts in the table four is not required during storage, and the sequence is consistent with that during subsequent analysis. When storing and transmitting the longitude value, only lon is needed to be stored and transmittedNewThe value, only 4 bytes are needed.
For example, for double type lon-179.9428112235, the sign value is negative, the absolute value of lon is taken and amplified by 10 times to obtain lonX-1799.428112235; taking the integer part of the lonX value as lonX_integer1799, taking the fractional part of the lonX value and enlarging it by 1000000 times, and rounding to obtain the value marked as lonX_partX6428112. Sequentially converting the symbol value and the lonX_integerValue of "lonX_partX6The value "three parts of information are stored, and the binary structure of the data with 32 bits is obtained as follows:
Figure BDA0002987649510000111
the binary structure after the storage processing of the table five-value lon is-179.9428112235 stores the 32-bit binary data to obtain a new longitude value lonNewAnd storing and transmitting.
D. Reading/receiving 4 bytes of longitude value lonNewAnd resolving a longitude value lon2 process:
the 32-bit longitude value lonNewAccording to "sign value", "lonX_integer”、“lonX_partX6"the three-part information is analyzed according to the order of writing to obtain the corresponding three-part numerical value, and if the longitude value of the double type is analyzed to be marked as lon2, lon 2' is obtained first:
lon2’=(lonX_integer/10)+lonX_partX6/10000000.0;
to control the maximum error value between the analyzed longitude value and the original longitude value not to be greater than 0.00000005
The eighth bit after the decimal point of lon2 'is estimated to be 4 or 5, and lon 2' is obtained
lon2”=(lonX_integer/10)+lonX_partX6/10000000.0+0.00000004 or
lon2”=(lonX_integer/10)+lonX_partX6/10000000.0+0.00000005;
Finally, if the 1bit value of the "sign value" is 0, the original lon value is negative, and the lon2 "is only required to be negative, that is, lon2 is — lon 2".
If the 1bit value of the "sign value" is 1, it indicates that the original lon value is a positive value, and no processing is required for lon2, i.e., lon2 ═ lon2 ".
For example, a 4-byte longitude value lon is received at the mobile terminalNewThe binary data of (a) is as follows:
Figure BDA0002987649510000112
table six network terminal receives 4 byte longitude binary data after storage processing
The order of writing is analyzed to obtain 'symbol value' bit-0 and lonX_integer=1799、lonX_partX6428112; assuming that the longitude value of the double type is resolved with the label lon2, lon2 ═ lonX (lonX) is obtained_integer/10.0)+lonX_partX6/10000000.0+0.00000004=179.94281124.
It can be seen that by storing the longitude values using the method, the maximum error between the analyzed lon2 value and the original lon value is 0.00000005, i.e. there is a maximum error of 5 in the eighth place after the decimal point. In addition, at a latitude of 0 degree, an actual distance error dT between two points with longitude differences of 0.00000005 degrees is 0.00556697 meters, that is, a maximum error of longitude values is less than 5.6 millimeters.
The actual distance dT between two points of the location point a (longitude 0, latitude 0) and the location point B (longitude 0.00000005, latitude 0.00000002) is 0.0059892 m, that is, the maximum error of the vector location value stored in the method is less than 6 mm.
In the above embodiment, part A, the latitude value includes latX10_integerAnd latX10_partX6Two parts, part C, longitude values include lonX_integerAnd lonX_partX6Two parts, which aim to be generally in a small space range in many practical applications, such as navigation software, mostly involve only city-level and provincial spatial changes, even if riding high-speed rail, the speed is generally below 300 km/h, so in a short time, the related latitude and longitude values are only local area values, and corresponding to the latitude and longitude values, a part of the values in the former part are always the same, in such a case, the latitude values are decomposed into latitude basic values (corresponding to lat), and the latitude basic values are obtained by dividing the latitude basic values into latitude basic values (corresponding to lat) according to the latitude and longitude valuesX10_integer) And latitude exact mantissa value (corresponding to lat)X10_partX6) The longitude value is decomposed into a longitude base value (corresponding to lonX)_integer) And longitude exact mantissa value (corresponding to lonX)_partX6) When a plurality of longitude and latitude values of similar local areas are continuously stored, the sign bit and the basic value of the longitude and the sign bit and the basic value of the latitude can be obtained only during the first transmission, and only the precise mantissa value of the longitude and the precise mantissa value of the latitude are transmitted and stored in the subsequent transmission and storage processes, so that the data volume of transmission and the space required by storage are further reduced.
Particularly, for vector position data in a coordinate system expressed by non-latitude and longitude, for example, vector position data in a J2000 coordinate system, the vector position data in the coordinate system expressed by latitude and longitude (such as WGS-84 coordinate system) may be converted first, the longitude and latitude data may be stored according to the method, the position data expressed by latitude and longitude may be obtained after reading the data file or receiving the latitude and longitude data and analyzing the latitude and longitude data according to the method, and then the position data may be converted into position data in the original coordinate system.
In addition, for the height component value in the vector position data, when the value range is from-10000.0 meters to 10000.0 meters, a storage method completely similar to the latitude component value in the text can be adopted, and the accuracy higher than float can be achieved by using 4 bytes of storage space, which is not repeated herein. The method is mainly used for processing the storage and transmission method of longitude and latitude values in the most extensive vector position data of the application plane.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (6)

1. A storage and transmission method of vector position data is characterized by comprising a modulation step, a storage and transmission step and an analysis step, wherein the modulation step comprises the following steps:
s1, converting the format of the position value to be stored and transmitted, recording the converted position value in decimal form, and determining the variation range and precision requirement delta of the value X to be stored, wherein the value X comprises an integer part XintAnd a fractional part Xdec
S2, determining the decimal part X needing to be accurately stored according to the precision requirement deltadecThe number of bits N;
s3, multiplying X by 10NObtaining X ', X' is a residue of an integer part XintM numbers and a fractional part X ofdecAn integer value of N digits of (a);
s4, determining the minimum bit number M required by all possible values within the variation range of the values of X 'when converting X' into binary number according to the integer type;
s5, judging whether X decimal is needed according to the data precision requirement deltaSetting a data distribution identification bit for the value of the (N +1) th bit after the point, converting X 'into M bit or M + 1bit binary number X'int-bit
The storage and transmission steps are to X'int-bitStoring and transmitting;
in the analyzing step, if no data distribution identification bit exists, setting a pre-estimated value of the (N +1) th bit after the X decimal point according to the data precision requirement, and performing inverse operation on the modulating step in the rest steps;
in step S5, a batch of w data with the same variation range of the value X and the same precision requirement δ needs a total storage space of T ═ M × w or T ═ M +1 × w bits, and is stored or transmitted with 1 byte as the minimum storage unit, and when the last bits of T are less than 1 byte, they are filled with 0;
according to the change speed of the numerical value X which needs to be stored, the integer value X'int-bitSplit into a base numerical portion X'int-baseAnd a variable numerical part X'int-varThe base numerical value part X'int-baseRemains unchanged for time T;
storing and transmitting a plurality of values X within a time TiWhen the first value X is stored and transmitted in the step S51Time-transmitted base value part X'int-base-1And a variable numerical part X'int-var-1After transmitting the remainder XiAt all, only the fluctuating value part X 'is stored and transmitted'int-var-i
In the analysis step, X is used1Of base number fraction X'int-base-1Remaining X as store transfer within time TiBase number fraction X'int-base-i
2. The method of claim 1 wherein the vector position data is stored and transmitted if the accuracy requirement is δ<=5×10-(N+1)At this time, it is not necessary to set the data distribution flag bit, X'int-bitIs an M-bit binary number; in the analyzing step, after the precise integer value X 'is obtained through analysis, X' is divided by 10NObtaining the intermediate floating-point number XSetting the N +1 th bit after the decimal point of the intermediate floating point number X ' as an estimated bit, and setting the numerical value of the estimated bit as 4 or 5 to obtain a final result numerical value X ' ″ after analysis, wherein the numerical error precision of the X ' ″ and the original floating point data X can be ensured to be not more than 5X 10-(N+1)
3. The method of claim 1 wherein the vector position data is stored and transmitted if the accuracy requirement is δ<=2×10-(N+1)At this time, it is necessary to set a data distribution flag bit, X'int-bitIs an M + 1bit binary number; when storing and transmitting X ', adding 1bit data distribution identification bit after M bit binary number corresponding to integer value X', when X is in usedecWhen the value corresponding to the N +1 th bit is 0 to 4, the data distribution identification bit is set to be in a first state, and when X is in a second statedecWhen the value corresponding to the (N +1) th bit is 5 to 9, setting the data distribution identification bit to be in a second state;
in the resolving step, after resolving M-bit binary number to obtain accurate integer value X', dividing by 10NObtaining a middle floating point number X ",
if the data distribution identification bit is in a first state, setting the (N +1) th bit behind the decimal point of the intermediate floating point number X 'as 2 to obtain a final result numerical value X';
and if the data distribution identification bit is in the second state, setting the (N +1) th bit behind the decimal point of the floating point number X 'to be 7, and obtaining a final result numerical value X'.
4. The method of claim 3 wherein said numerical value X is longitude data in degrees in a WGS-84 coordinate system, said accuracy requirement δ being<=5×10-8Of said binary number X'int-bit32 bits are required, with the base number value part X'int-baseIs 12bit, and the variable value part X'int-varIs 20bit, base number portion X'int-baseThe integer value comprises 1 sign bit, 11bit representing integer part number of the value X and the first number after decimal point(ii) a Numerical value part X'int-varThe 20bit of the digital value X is an integer value formed by 6 digits from the 2 nd bit to the 7 th bit after the decimal point of the digital value X.
5. The method of claim 4 wherein said numerical value X is latitude data expressed in degrees in WGS-84, said accuracy requirement δ<=2×10-8Of said binary number X'int-bit32 bits are required, with the base number value part X'int-baseIs 11bit, and the variable value part X'int-varIs 21bit, base number portion X'int-baseThe digital sign number of the numerical value X is an integer value consisting of an integer part number of 1 sign bit and 10 bit bits representing the numerical value X and a first number after a decimal point; numerical value part X'int-varThe 20 bits of (A) are integer values consisting of 6 digits from 2 nd bit to 7 th bit after decimal point of the value X, and the value part X 'is changed'int-varIs a data distribution identification bit.
6. The method for storing and transmitting vector position data according to claim 1, wherein the value X is altitude elevation data in a Digital Elevation Model (DEM).
CN202110305243.6A 2021-03-23 2021-03-23 Storage and transmission method of vector position data Active CN113032506B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110305243.6A CN113032506B (en) 2021-03-23 2021-03-23 Storage and transmission method of vector position data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110305243.6A CN113032506B (en) 2021-03-23 2021-03-23 Storage and transmission method of vector position data

Publications (2)

Publication Number Publication Date
CN113032506A CN113032506A (en) 2021-06-25
CN113032506B true CN113032506B (en) 2022-03-04

Family

ID=76472699

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110305243.6A Active CN113032506B (en) 2021-03-23 2021-03-23 Storage and transmission method of vector position data

Country Status (1)

Country Link
CN (1) CN113032506B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SG75807A1 (en) * 1996-01-11 2000-10-24 Sony Corp Signal transmitting method and apparatus
CN104899311A (en) * 2015-06-15 2015-09-09 中国地质大学(武汉) WebGIS (Web Geographic Information System) vector data high-efficiency transmission method
CN107301017B (en) * 2017-06-06 2021-03-09 云知声智能科技股份有限公司 Data storage method and device
CN109871197B (en) * 2018-12-29 2022-03-04 航天信息股份有限公司 Data storage device and data determination device
CN110222011B (en) * 2019-05-30 2021-06-15 北京理工大学 Human motion data file compression method
CN112506935B (en) * 2020-12-21 2023-08-29 北京百度网讯科技有限公司 Data processing method, device, electronic equipment, storage medium and program product

Also Published As

Publication number Publication date
CN113032506A (en) 2021-06-25

Similar Documents

Publication Publication Date Title
US6703947B1 (en) Method for organizing and compressing spatial data
US7701366B2 (en) Data compression by multi-order differencing
CN106844781B (en) Data processing method and device
US9719790B2 (en) Mapping uncertain geometries to graticules
CN105634499B (en) Data conversion method based on new short floating point type data
CA2653268A1 (en) Sort plan optimization
CN111625520A (en) Universal mapping method and system for field types of heterogeneous database
CN114236643B (en) Weather forecast method, device, equipment and medium based on weather forecast system
CN113032506B (en) Storage and transmission method of vector position data
CN110765280A (en) Address recognition method and device
CN110941587A (en) Space vector data storage method based on additional file and coordinate system conversion system
US9762285B1 (en) Compression using mu-law approximation
CN113495845B (en) Data testing method and device, electronic equipment and storage medium
CN112561500B (en) Salary data generation method, device, equipment and medium based on user data
CN112116284A (en) False waybill identification method, false waybill identification system, electronic equipment and storage medium
CN101594480B (en) Method for processing caption data
CN116049456A (en) Tile map generation method and device and terminal equipment
CN113010617A (en) Lightweight storage method of three-dimensional space coordinates based on bit compression
CN115792983A (en) Grid coding and code conversion method of GNSS differential enhanced service
US20140188909A1 (en) Radix sort with read-only key
US7526379B2 (en) Determining elevation values in a geocoding system
CN103986467A (en) Multi-level parallel type ADC and DAC based on voltage following switch
CN117579456A (en) Service message sending method and device, electronic equipment and storage medium
CN112632992B (en) Test method, test device, computer equipment and medium
CN117194596A (en) Data processing method, device, equipment and storage medium

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