CN102567439A - SRG (sphere rhombus grid) subdivision code and geographic coordinate converting algorithm - Google Patents
SRG (sphere rhombus grid) subdivision code and geographic coordinate converting algorithm Download PDFInfo
- Publication number
- CN102567439A CN102567439A CN2011103028240A CN201110302824A CN102567439A CN 102567439 A CN102567439 A CN 102567439A CN 2011103028240 A CN2011103028240 A CN 2011103028240A CN 201110302824 A CN201110302824 A CN 201110302824A CN 102567439 A CN102567439 A CN 102567439A
- Authority
- CN
- China
- Prior art keywords
- level
- subdivision
- srg
- latitude
- longitude
- 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
Links
- 238000006243 chemical reaction Methods 0.000 claims abstract description 42
- 238000000034 method Methods 0.000 claims abstract description 38
- 230000008569 process Effects 0.000 claims abstract description 19
- 238000004364 calculation method Methods 0.000 claims abstract description 18
- 230000009466 transformation Effects 0.000 claims abstract description 7
- 230000014509 gene expression Effects 0.000 claims description 3
- QNRATNLHPGXHMA-XZHTYLCXSA-N (r)-(6-ethoxyquinolin-4-yl)-[(2s,4s,5r)-5-ethyl-1-azabicyclo[2.2.2]octan-2-yl]methanol;hydrochloride Chemical compound Cl.C([C@H]([C@H](C1)CC)C2)CN1[C@@H]2[C@H](O)C1=CC=NC2=CC=C(OCC)C=C21 QNRATNLHPGXHMA-XZHTYLCXSA-N 0.000 claims 1
- 230000009286 beneficial effect Effects 0.000 abstract description 2
- 230000008859 change Effects 0.000 description 2
- 101100493897 Arabidopsis thaliana BGLU30 gene Proteins 0.000 description 1
- 101000687718 Homo sapiens SWI/SNF complex subunit SMARCC1 Proteins 0.000 description 1
- 101100310686 Mus musculus Spata4 gene Proteins 0.000 description 1
- 102100024793 SWI/SNF complex subunit SMARCC1 Human genes 0.000 description 1
- 229910003460 diamond Inorganic materials 0.000 description 1
- 239000010432 diamond Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000001939 inductive effect Effects 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
Images
Landscapes
- Instructional Devices (AREA)
Abstract
本发明涉及一种基于SRG剖分方法的剖分编码与经纬度坐标之间的转换算法。本算法继承了SRG剖分方法所具有的优势,SRG地址码本身就具有固定的方向性,利于邻近搜索,SRG剖分方法不涉及任何投影变换,转换过程中也不涉及投影,计算过程只应用加、减、乘和除简单算术运算,计算速度快。并采用坐标系来辅助区分一些难以区分的菱形块,进而提高了转换的精度。
The invention relates to a conversion algorithm between subdivision coding and latitude and longitude coordinates based on the SRG subdivision method. This algorithm inherits the advantages of the SRG subdivision method. The SRG address code itself has a fixed directionality, which is beneficial to the proximity search. The SRG subdivision method does not involve any projection transformation, and the conversion process does not involve projection. The calculation process only uses Add, subtract, multiply and divide simple arithmetic operations with fast calculation speed. And the coordinate system is used to assist in distinguishing some difficult-to-distinguish rhombus blocks, thereby improving the conversion accuracy.
Description
技术领域 technical field
本发明涉及一种基于SRG剖分方法的剖分编码与经纬度坐标之间的转换算法。The invention relates to a conversion algorithm between subdivision coding and latitude and longitude coordinates based on the SRG subdivision method.
背景技术 Background technique
目前绝大多数球面地理数据是以经纬度坐标为基础,而在SRG结构中,格网的坐标是用地址码隐性表达的,要想把现有地理数据有效应用到SRG结构中,或把SRG中的数据信息映射到传统的经纬度坐标,以符合人们的思维习惯,必须实现这两种地址码之间的相互转换。At present, the vast majority of spherical geographic data is based on latitude and longitude coordinates. In the SRG structure, the grid coordinates are implicitly expressed by address codes. The data information in is mapped to the traditional latitude and longitude coordinates, in order to conform to people's thinking habits, the mutual conversion between these two address codes must be realized.
球面菱形网格(Sphere Rhombus Grid,SRG)是一种基于地理坐标结合经纬线并且用正多面体逐级递归的思想在球面直接剖分的剖分方法。Sphere Rhombus Grid (SRG) is a subdivision method based on geographic coordinates combined with latitude and longitude lines and using the idea of regular polyhedron recursion step by step to directly subdivide the spherical surface.
目前绝大多数球面地理数据是以经纬度坐标为基础,而在SRG结构中,格网的坐标是用地址码隐性表达的,要想把现有地理数据有效应用到SRG结构中,或把SRG中的数据信息映射到传统的经纬度坐标,以符合人们的思维习惯,必须实现这两种地址码之间的相互转换。At present, the vast majority of spherical geographic data is based on latitude and longitude coordinates. In the SRG structure, the grid coordinates are implicitly expressed by address codes. The data information in is mapped to the traditional latitude and longitude coordinates, in order to conform to people's thinking habits, the mutual conversion between these two address codes must be realized.
球面菱形网格(Sphere Rhombus Grid,SRG)是一种基于地理坐标结合经纬线并且用正多面体逐级递归的思想在球面直接剖分的剖分方法。“行列逼近法”在具体计算中只应用加、减、乘和除简单的算术运算,相应转换速度较快,但是转换精度不够高。Sphere Rhombus Grid (SRG) is a subdivision method based on geographic coordinates combined with latitude and longitude lines and using the idea of regular polyhedron recursion step by step to directly subdivide the spherical surface. "Row-column approximation method" only uses simple arithmetic operations of addition, subtraction, multiplication and division in specific calculations, and the corresponding conversion speed is fast, but the conversion accuracy is not high enough.
发明内容 Contents of the invention
针对上述问题,本发明提出一种基于SRG剖分方法的剖分编码与经纬度坐标之间的转换算法。In view of the above problems, the present invention proposes a conversion algorithm between subdivision coding and latitude and longitude coordinates based on the SRG subdivision method.
SRG剖分方法SRG segmentation method
SRG结合基于地理坐标系的球面网格和基于正多面体的球面网格剖分两种剖分方法,充分利用了经纬线,无需内接正多面体,无需投影,直接在球面用弧线连接进行递归菱形剖分。SRG combines the spherical grid based on the geographic coordinate system and the spherical grid based on the regular polyhedron. It makes full use of the longitude and latitude lines, does not need to inscribe the regular polyhedron, and does not need projection. It can be recursively connected directly on the spherical surface with arcs. Diamond split.
1、SRG编码方案1. SRG coding scheme
经过n级剖分,全球可分为4×4n个菱形球面。n级剖分产生的菱形球面的编码长度为n+1,编码都是由0、1、2、3中的几位数字组合而成,各个剖分层次菱形球面编码按照从低级剖分到高级剖分顺序组织,不同级别之间有层次性。每个菱形球面都可分成四个小的菱形球面,四个小四边形按照上下左右的顺序分别对应0、1、2、3。编码的首位是几就代表该面片在几号球面上,以后的每一位都是在上一级菱形球面编码的基础上多编一位。假设第k层某个剖分面片的编码为a0a1a2L anL ak,其中a1~ak是k层四分码,取值为0,1,2,3;a0由0级剖分产生,取值也是0,1,2,3。每个剖分面片都有唯一的编码与之对应,编码的长短反映了剖分的层次,剖分单元编码具有空间位置相关性。例如0号球面经过2级剖分后产生的编码如图2所示。整个编码的过程与DUTTON的QTM编码相似。After n-level subdivision, the whole world can be divided into 4×4 n rhombus spheres. The code length of the diamond-shaped sphere produced by n-level subdivision is n+1, and the code is composed of several digits in 0, 1, 2, and 3. The subdivision is organized sequentially, and there is hierarchy between different levels. Each rhombus sphere can be divided into four small rhombus spheres, and the four small quadrilaterals correspond to 0, 1, 2, and 3 respectively in the order of up, down, left, and right. The number of the first digit of the code represents the number of the spherical surface on which the patch is located, and each subsequent digit is coded one more on the basis of the rhombus spherical surface coding of the previous level. Assume that the code of a subdivided patch on the kth layer is a 0 a 1 a 2 L a n L a k , where a 1 ~ a k is the quarter code of the k layer, and the values are 0, 1, 2, 3; a 0 is generated by
2、经纬度坐标与SRG剖分地址码之间的转换算法2. Conversion algorithm between latitude and longitude coordinates and SRG subdivision address code
为计算方便,其他1~3单元的位置坐标(经纬度或地址码)首先转换为0单元,然后再进行转换。下面以0号球面的上半部分为例详细分析算法的步骤和精度,设菱形剖分层次为k和地址码为a0a1a2L anL ak。并且剖分到一定层次,球面就可近似当做平面来处理,本转换过程中将球面近似看做平面来操作。For the convenience of calculation, the position coordinates (latitude and longitude or address code) of the other 1 to 3 units are first converted to
2.1经纬度坐标向SRG编码的转变2.1 Transformation of latitude and longitude coordinates to SRG code
“坐标递归法”原理:根据SRG剖分方法首先定义球面SRG格网的行和列(行与纬线对应,定义赤道的行数为0,n级剖分赤道以北共有2n行;列是从经度0开始沿同一纬度即同一行的菱形的个数,特别地,在极点上列数为1)。The principle of "coordinate recursion method": according to the SRG subdivision method, first define the rows and columns of the spherical SRG grid (rows correspond to latitude lines, the number of rows defining the equator is 0, and there are 2 n rows north of the equator in n-level subdivision; the columns are Starting from
算法的基本原理是:The basic principle of the algorithm is:
(1)对于任意点P若要进行经纬度向地址码转换,就把经纬度坐标(φ,λ)先转换为该点在SRG格网中的行数和列数(i,j),最后根据(i,j)进行逐级递归,逐层次地得出SRG编码。(1) For any point P, if you want to convert the latitude and longitude to the address code, first convert the latitude and longitude coordinates (φ, λ) into the number of rows and columns (i, j) of the point in the SRG grid, and finally according to ( i, j) perform recursion level by level to obtain SRG code level by level.
(2)对于点P的n级SRG的确定,如图3所示,空白区域容易确定,按照上下左右的顺序分别为0、1、2、3。中间的阴影部分难以区分,如点P和Q行数和列数相同,但处于不同的菱形中,编码不同。本方法中采用分级坐标系辅助区分中间的阴影部分的点的归属,如图4所示,采用点P在n-1级菱形中的中心点为原点,横向对角线为x轴,纵向对角线为y轴,n级剖分产生的分界线在该坐标系中的表达式分别为y+ax=0(左),y-ax=0(右)。将点p相对于该坐标系的坐标(α,β)根据α和β取值的不同,代入y+ax或y-ax,得出的值与0比较,进而确定点P属于哪个n级菱形,并确定n级剖分编码。(2) For the determination of the n-level SRG of point P, as shown in Figure 3, the blank area is easy to determine, and the order of up, down, left, and right is 0, 1, 2, 3 respectively. The shaded part in the middle is difficult to distinguish, such as points P and Q with the same number of rows and columns, but in different rhombuses, and coded differently. In this method, a hierarchical coordinate system is used to assist in distinguishing the attribution of the points in the middle shadow part. As shown in Figure 4, the center point of point P in the n-1 rhombus is used as the origin, the horizontal diagonal is the x axis, and the vertical diagonal is the x axis. The angular line is the y-axis, and the expressions of the dividing line generated by the n-level subdivision in this coordinate system are y+ax=0 (left), y-ax=0 (right). Substituting the coordinates (α, β) of point p relative to the coordinate system into y+ax or y-ax according to the different values of α and β, and comparing the obtained value with 0, and then determining which n-level rhombus the point P belongs to , and determine n-level subdivision coding.
(3)系数a值的确定(3) Determination of the coefficient a value
0级剖分后,产生的菱形纵向对角线是一条经线,横向对角线是赤道长度的1/4(假设地球是正圆体),因此纵向对角线是横向对角线长度的2倍,得出a=2,以后各级剖分的菱形都近似相似,所以各级剖分都有a=2。After 0-level subdivision, the longitudinal diagonal of the generated rhombus is a meridian, and the horizontal diagonal is 1/4 of the length of the equator (assuming the earth is a perfect circle), so the longitudinal diagonal is twice the length of the horizontal diagonal , it is obtained that a=2, and the rhombuses of each level of subdivision are approximately similar, so each level of subdivision has a=2.
(4)每一级的剖分码都是在上级的基础上确定,是一个递归的过程,因此只要已知初值,并知道递推公式就可求出整个SRG编码。(4) The subdivision code of each level is determined on the basis of the upper level, which is a recursive process, so as long as the initial value is known and the recursive formula is known, the entire SRG code can be obtained.
经纬度坐标向SRG编码的转变,具体转换过程:The conversion of latitude and longitude coordinates to SRG codes, the specific conversion process:
(1)根据格网的剖分层次k,求出最大的行列数(I,J):I=2k,J=2k (1) Calculate the maximum number of rows and columns (I, J) according to the subdivision level k of the grid: I=2 k , J=2 k
(2)确定经纬度坐标P(φ,λ)在格网中的行列数(i,j)(2) Determine the number of rows and columns (i, j) of the latitude and longitude coordinates P (φ, λ) in the grid
(3)第n+1级SRG码的确定方法(3) Determination method of n+1 level SRG code
在点P所在的n级菱形中,以中心点为原点,横对角线为x轴,纵向对角线为y轴建立坐标系。In the n-level rhombus where point P is located, a coordinate system is established with the center point as the origin, the horizontal diagonal as the x-axis, and the vertical diagonal as the y-axis.
x轴上下方各有2k-n行,y轴左右最大列数都是2k-n-1,x轴所在的行数记做In,y轴所在的列数记做Jn。There are 2 kn rows above and below the x-axis, and the maximum number of columns on the left and right of the y-axis is 2 kn-1 . The number of rows on the x-axis is recorded as I n , and the number of columns on the y-axis is recorded as J n .
点P在该坐标系的坐标记做(αn+1,βn+1)The coordinates of point P in this coordinate system are marked as (α n+1 , β n+1 )
当
当α>0,β>0时,将(α,β)代入y-2x,则
当α>0,β<0时,将(α,β)代入y+2x,则
当α<0,β>0时,将(α,β)代入y+2x,则
当α<0,β<0时,将(α,β)代入y-2x,则
(4)坐标轴所在行列数的确定(4) Determination of the number of rows and columns where the coordinate axis is located
第n级坐标轴是在第n-1级坐标轴的基础上,根据an值的不同,按照一定的规则移动,总结如下:The n-level coordinate axis is based on the n-1 level coordinate axis, and moves according to certain rules according to the different values of a n , summarized as follows:
an=0时,
an=1时,
an=2时,
an=3时,
(5)SRG完整编码的确定(5) Determination of SRG complete coding
0级剖分后产生的0号菱形的对角线的行列数分别为I0=0,J0=2k-1运用第三步的递推公式可以求出a1;将a1、I0、J0代入第四步就可求出I1,J1,代入第三步的递推公式可以求出a2……,如此递归即可求出a0a1a2L anL ak。The number of rows and columns of the diagonals of the No. 0 rhombus generated after the 0-level subdivision is I 0 = 0, J 0 = 2 k-1. Using the recursive formula in the third step, a 1 can be obtained; a 1 , I 0 and J 0 can be substituted into the fourth step to obtain I 1 , J 1 , and then substituted into the recursive formula of the third step to obtain a 2 ..., so that a 0 a 1 a 2 L a n L can be obtained recursively a k .
0号球面的下半部分的转换,可以先把纬度都换成北纬,转换到上半部分来计算,求的结果后将SRG编码除a0外,其它各位上的0都换成1,1都换成0即可。将其它球面的可以转换到0号球面上来计算,将计算结果的a0换成对应球面的编码1~3。For the conversion of the lower half of the 0 sphere, you can first change the latitude to north latitude, and then convert to the upper half to calculate. After finding the result, change the SRG code except for a 0 , and replace the 0 on the other bits with 1, 1 All can be replaced with 0. Other spherical surfaces can be converted to spherical surface No. 0 for calculation, and a 0 of the calculation result is replaced with codes 1 to 3 corresponding to spherical surfaces.
2.2SRG编码向经纬度坐标的转换2.2 Conversion of SRG codes to latitude and longitude coordinates
转换算法:某级菱形的经纬度都是在上一级的基础上,根据本级编码值的不同按照一定的规则计算,是一个递归的过程,因此只要已知初值和递推公式即可将不同级别的SRG码转换成经纬度坐标。Conversion algorithm: the latitude and longitude of a rhombus at a certain level are calculated on the basis of the previous level, and according to certain rules according to the difference in the encoding value of this level. It is a recursive process, so as long as the initial value and the recursive formula are known, the Different levels of SRG codes are converted into latitude and longitude coordinates.
具体转换过程Specific conversion process
每个四边形的编码是唯一的,其对应的地理坐标取其中心点的坐标,以0号球面为例,一级剖分产生的四个四边形对应坐标分别为:00四边形(北纬45,东经45),01四边形(南纬45,东经45),02四边形(赤道,东经22.5),03四边形(赤道,东经67.5)如表1所示。The code of each quadrilateral is unique, and its corresponding geographic coordinates take the coordinates of its center point. Taking the No. 0 sphere as an example, the corresponding coordinates of the four quadrilaterals generated by the first-level subdivision are: 00 quadrilateral (45 north latitude, 45 east longitude ), 01 quadrilateral (45 south latitude, 45 east longitude), 02 quadrilateral (equator, 22.5 east longitude), and 03 quadrilateral (equator, 67.5 east longitude) are shown in Table 1.
表1 0号球面一级剖分坐标转换Table 1 Coordinate conversion of first-level subdivision of No.0 spherical surface
对00球面进行二级剖分,坐标转换如表2所示:The 00 sphere is subdivided into two levels, and the coordinate transformation is shown in Table 2:
表2 00球面二级剖分坐标转换Table 2 00 sphere two-level subdivision coordinate conversion
对00球面进行三级剖分,坐标转换如表3所示:The 00 sphere is subdivided into three levels, and the coordinate transformation is shown in Table 3:
表3 00球面三级剖分坐标转换Table 3 00 spherical three-level subdivision coordinate conversion
由剖分过程和以上表格经过总结分析得出编码与地理坐标之间的转换关系。Based on the subdivision process and the above tables, the conversion relationship between codes and geographic coordinates can be obtained through summary analysis.
(1)纬度转换(1) Latitude conversion
把某个n级四边形的纬度记为W,该四边形对应的n+1级的4个四边形的纬度计算方法如下:Denote the latitude of a quadrilateral of level n as W, and the latitude calculation method of the four quadrilaterals of level n+1 corresponding to the quadrilateral is as follows:
an+1=0,W0=W+45/2n a n+1 =0, W 0 =W+45/2 n
an+1=1,W1=W-45/2n a n+1 =1, W 1 =W-45/2 n
an+1=2,W2=Wa n+1 =2, W 2 =W
an+1=3,W3=Wa n+1 =3, W 3 =W
由表1知道1级剖分四边形的纬度,w00=45,w01=-45,(本文南纬用负号表示),w02=0,w03=0。在此基础上0号球面的每一级剖分产生的四边形的纬度利用上面的公式,经过逐级递归计算都可以得出结果。From Table 1, we know the latitude of the first-level subdivision quadrilateral, w 00 =45, w 01 =-45, (in this paper, the south latitude is represented by a negative sign), w 02 =0, w 03 =0. On this basis, the latitude of the quadrilateral generated by each level of subdivision of the No. 0 sphere can be obtained by recursive calculation level by level using the above formula.
(2)经度转换(2) Longitude conversion
对于00四边形球面,由以上表格归纳分析可得,对于n级剖分产生的某四边形,其经度为J=a×(90/x)+45/x,其对应的n+1级的四个四边形的经度为:For the 00 quadrilateral spherical surface, it can be obtained from the inductive analysis of the above table that for a certain quadrilateral produced by n-level subdivision, its longitude is J=a×(90/x)+45/x, and its corresponding n+1 level four The longitude of the quadrilateral is:
an+1=0,J0=2a×[90/(2x-1)]+45/(2x-1)a n+1 =0, J 0 =2a×[90/(2x-1)]+45/(2x-1)
an+1=1,J1=(2a+1)×[90/(2x+1)]+45/(2x+1)a n+1 =1, J 1 =(2a+1)×[90/(2x+1)]+45/(2x+1)
an+1=2,J2=2a×[90/(2x)]+45/(2x)a n+1 =2, J 2 =2a×[90/(2x)]+45/(2x)
an+1=3,J3=(2a+1)×[90/(2x)]+45/(2x)a n+1 =3, J 3 =(2a+1)×[90/(2x)]+45/(2x)
由表1可知00四边形的经度j00=0×(90/1)+45/1,按照上面的公式,可得:It can be known from Table 1 that the longitude j 00 of the 00 quadrilateral = 0×(90/1)+45/1, according to the above formula, it can be obtained:
j000=(2×0)×[90/(2×1-1)]+45/(2×1-1)j 000 = (2×0)×[90/(2×1-1)]+45/(2×1-1)
=0×(90/1)+45/1=45=0×(90/1)+45/1=45
j001=(2×0+1)×[90/(2×1+1)]+45/(2×1+1)j 001 = (2×0+1)×[90/(2×1+1)]+45/(2×1+1)
=1×(90/3)+45/3=45=1×(90/3)+45/3=45
j002=(2×0)×[90/(2×1)]+45/(2×1)j 002 = (2×0)×[90/(2×1)]+45/(2×1)
=0×(90/2)+45/2=22.5=0×(90/2)+45/2=22.5
j003=(2×0+1)×[90/(2×1)]+45/(2×1)j 003 = (2×0+1)×[90/(2×1)]+45/(2×1)
=1×(90/2)+45/2=67.5=1×(90/2)+45/2=67.5
以后的每一级都可以在00的基础上逐级计算即可得出经度坐标。01与00球面经度转换计算方法相同,由表1可知j01=0×(90/1)+45/1,以01开头的四边形球面的经度转换都可以在j01基础上,利用00球面的公式进行计算。Each subsequent level can be calculated step by step on the basis of 00 to obtain the longitude coordinates. The longitude conversion calculation method of 01 and 00 spheres is the same. It can be seen from Table 1 that j 01 = 0×(90/1)+45/1, and the longitude conversion of quadrilateral spheres starting with 01 can be based on j 01 , using the 00 sphere formula to calculate.
02和03四边形球面分别关于赤道对称,对02和03进过剖分后产生的四边形,有部分四边形关于赤道对称,关于赤道对称的四边形的编码,开头两位是02或03,最后一位是0、1、2或3,中间位都是由2和3组成的。这些四边形如果尾号为1,则与它们对应的同级尾号为0的四边形的经度计算方法相同,尾号为0、2、或3,则计算方法与上述公式相同。具体如下:The 02 and 03 quadrilateral spheres are respectively symmetrical about the equator, and the quadrilaterals generated after subdividing 02 and 03, some quadrilaterals are symmetrical about the equator, and the coding of the quadrilateral symmetrical about the equator, the first two digits are 02 or 03, and the last digit is 0, 1, 2 or 3, the middle bits are all made up of 2 and 3. If these quadrilaterals have a tail number of 1, the longitude calculation method is the same as that of their corresponding sibling quadrilaterals with a tail number of 0. If the tail number is 0, 2, or 3, the calculation method is the same as the above formula. details as follows:
某n级四边形,其经度为J=a×(90/x)+45/x,其对应的n+1级的四个四边形的经度为:A quadrilateral of level n, its longitude is J=a×(90/x)+45/x, and the longitude of the four quadrilaterals corresponding to level n+1 is:
an+1=0,J0=2a×[90/(2x-1)]+45/(2x-1)a n+1 =0, J 0 =2a×[90/(2x-1)]+45/(2x-1)
an+1=1,J1=2a×[90/(2x-1)]+45/(2x-1)a n+1 =1, J 1 =2a×[90/(2x-1)]+45/(2x-1)
an+1=2,J2=2a×[90/(2x)]+45/(2x)a n+1 =2, J 2 =2a×[90/(2x)]+45/(2x)
an+1=3,J3=(2a+1)×[90/(2x)]+45/(2x)a n+1 =3, J 3 =(2a+1)×[90/(2x)]+45/(2x)
以上是关于0号球面的编码与坐标的转换,1、2、3号球面的纬度转换与0号球面的对应四边形相同,只是编码的首位换成了由0换成了1、2或3。1号球面剖分产生的四边形经度转换在与0号球面对应四边形(只有首位不同)的经度上加90即可,同理2号球面与0号球面对应的四边形的经度加180即可,3号球面加270。The above is about the encoding and coordinate conversion of
另外对于一些特殊的四边形,坐标转换也有简便的计算方法,例如000……0x,尾号不确定,除了尾号外其余位置编码都是0,n级剖分的编码转为地理坐标公式为(纬度用W表示,经度用J表示):In addition, for some special quadrilaterals, coordinate conversion also has a simple calculation method, such as 000...0x, the tail number is uncertain, except for the tail number, the rest of the position codes are 0, and the code of the n-level subdivision is converted to geographic coordinates. The formula is (latitude Denoted by W and longitude by J):
如果最后一位是0:If the last bit is 0:
W=45×(2-0.5n-1),J=45;W=45×(2-0.5 n-1 ), J=45;
如果最后一位是1:If the last bit is 1:
W=45×(2-0.5n-2)-45/2n-1,J=45;W=45×(2-0.5 n-2 )-45/2 n-1 , J=45;
如果最后一位是2:If the last digit is 2:
W=45×(2-0.5n-2),J=22.5;W=45×(2-0.5 n-2 ), J=22.5;
如果最后一位是3:If the last digit is 3:
W=45×(2-0.5n-2),J=67.5。W=45×(2-0.5 n-2 ), J=67.5.
本算法是以SRG剖分方法和SRG剖分编码为基础,继承了SRG剖分方法所具有的优势,SRG地址码本身就具有固定的方向性,利于邻近搜索,SRG剖分方法不涉及任何投影变换,转换过程中也不涉及投影,计算过程只应用加、减、乘和除简单算术运算,计算速度快。并且在“行列逼近法”的基础上作出了很大的改进,采用坐标系来辅助区分一些难以区分的菱形块,进而提高了转换的精度。This algorithm is based on the SRG subdivision method and SRG subdivision code, and inherits the advantages of the SRG subdivision method. The SRG address code itself has a fixed directionality, which is beneficial to the proximity search. The SRG subdivision method does not involve any projection. Transformation, projection is not involved in the conversion process, and the calculation process only applies simple arithmetic operations of addition, subtraction, multiplication and division, and the calculation speed is fast. And a great improvement has been made on the basis of the "row-column approximation method", and the coordinate system is used to assist in distinguishing some difficult-to-distinguish rhombus blocks, thereby improving the conversion accuracy.
附图说明 Description of drawings
图1SRG3级剖分Figure 1 SRG3 level subdivision
图2SRG2级剖分编码Figure 2 SRG2-level subdivision coding
图3点P的n级SRG的确定Figure 3 Determination of n-level SRG at point P
图4坐标系辅助区分Figure 4 Auxiliary distinction of coordinate system
图5辅助坐标中的分界线Figure 5 The dividing line in the auxiliary coordinates
具体实施方式 Detailed ways
经纬度坐标与SRG剖分地址码之间的转换举例Examples of conversion between latitude and longitude coordinates and SRG subdivision address codes
SRG码向经纬度坐标的转换Conversion of SRG codes to latitude and longitude coordinates
例如编号为0012301的四边形,是6级剖分产生,其纬度记为w0112301,经度记为j0012301,计算过程如下:For example, the quadrilateral numbered 0012301 is generated by 6-level subdivision, its latitude is recorded as w 0112301 , longitude is recorded as j 0012301 , and the calculation process is as follows:
w0012301=w001230-45/55 w 0012301 = w 001230 -45/5 5
=w00123+45/24-45/25 =w 00123 +45/2 4 -45/2 5
=w0012+45/24-45/25 =w 0012 +45/2 4 -45/2 5
=w001+45/24-45/25 =w 001 +45/2 4 -45/2 5
=w00-45/2+45/24-45/25 =w 00 -45/2+45/2 4 -45/2 5
=45-45/2+45/24-45/25 =45-45/2+45/2 4 -45/2 5
=24.25=24.25
j001=1×(90/3)+45/3j 001 =1×(90/3)+45/3
j0012=2×(90/6)+45/6j 0012 =2×(90/6)+45/6
j00123=5×(90/12)+45/12j 00123 = 5×(90/12)+45/12
j001230=10×(90/23)+45/23j 001230 = 10×(90/23)+45/23
j0012301=21×(90/47)+45/47=41.17j 0012301 = 21 × (90/47) + 45/47 = 41.17
经纬度坐标向SRG码的转换Conversion of latitude and longitude coordinates to SRG code
已知点P经纬度坐标(24.25,41.17),求其6级剖分SRG编码。Given the latitude and longitude coordinates (24.25, 41.17) of point P, find its 6-level subdivision SRG code.
首先根据经纬度坐标确定点P在0号球面,所以a0=0;Firstly, according to the latitude and longitude coordinates, it is determined that the point P is on the 0th sphere, so a 0 =0;
K=6,所以I=26,J=26 K=6, so I=2 6 , J=2 6
I0=0,J0=2k-1 I 0 =0, J 0 =2 k-1
由a1可以求出I1,J1,然后求出β2,α2,进而求出a2等,如此递归,最终可求得a0a1a2a3a4a5a6=0012301。I 1 , J 1 can be obtained from a 1 , then β 2 , α 2 , and then a 2 can be obtained, and so on, recursively, and finally a 0 a 1 a 2 a 3 a 4 a 5 a 6 = 0012301.
SRG码向经纬度坐标的转换过程只有简单的算术运算,是一个递归的过程,已知SRG编码0012301,经过计算可得出纬度w012301=24.25,经度j0012301=41.17。而经纬度坐标向SRG码的转换过程中,根据点所在的行列数和坐标系来辅助区分,已知点纬度w012301=24.25,经度j0012301=41.17,经过计算可得出SRG编码为0012301,而SRG编码本身就具有严格方向性,0、1、2、3分别代表上下左右。相互转换的算法不一样,得到的结论却相互验证了其正确性。从本实例中可看到,计算过程只有简单的加减乘除,过程简单,速度快。The process of converting SRG codes to latitude and longitude coordinates is only a simple arithmetic operation, which is a recursive process. The known SRG code 0012301 can be calculated as latitude w 012301 = 24.25 and longitude j 0012301 = 41.17. And in the conversion process of latitude and longitude coordinates to SRG code, according to the number of ranks and the coordinate system where the point is located to assist in distinguishing, known point latitude w 012301 =24.25, longitude j 0012301 =41.17, can draw SRG code to be 0012301 through calculation, and The SRG code itself has strict directionality, and 0, 1, 2, and 3 represent up, down, left, and right, respectively. The algorithms for mutual conversion are different, but the conclusions obtained mutually verify their correctness. It can be seen from this example that the calculation process is only simple addition, subtraction, multiplication and division, the process is simple and the speed is fast.
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110302824.0A CN102567439B (en) | 2011-10-09 | 2011-10-09 | SRG Subdivision Coding and Geographic Coordinate Conversion Algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110302824.0A CN102567439B (en) | 2011-10-09 | 2011-10-09 | SRG Subdivision Coding and Geographic Coordinate Conversion Algorithm |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102567439A true CN102567439A (en) | 2012-07-11 |
CN102567439B CN102567439B (en) | 2014-04-09 |
Family
ID=46412865
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110302824.0A Expired - Fee Related CN102567439B (en) | 2011-10-09 | 2011-10-09 | SRG Subdivision Coding and Geographic Coordinate Conversion Algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102567439B (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9230258B2 (en) | 2010-04-01 | 2016-01-05 | International Business Machines Corporation | Space and time for entity resolution |
US9270451B2 (en) | 2013-10-03 | 2016-02-23 | Globalfoundries Inc. | Privacy enhanced spatial analytics |
US9602129B2 (en) | 2013-03-15 | 2017-03-21 | International Business Machines Corporation | Compactly storing geodetic points |
US9719790B2 (en) | 2013-03-15 | 2017-08-01 | International Business Machines Corporation | Mapping uncertain geometries to graticules |
CN107229725A (en) * | 2017-06-06 | 2017-10-03 | 南京师范大学 | The fast conversion method that a kind of geographical coordinate is encoded to the discrete grid of spherical triangle |
US9886783B2 (en) | 2015-01-07 | 2018-02-06 | International Business Machines Corporation | Indexing and querying spatial graphs |
US10122805B2 (en) | 2015-06-30 | 2018-11-06 | International Business Machines Corporation | Identification of collaborating and gathering entities |
US10387780B2 (en) | 2012-08-14 | 2019-08-20 | International Business Machines Corporation | Context accumulation based on properties of entity features |
CN115115799A (en) * | 2021-03-19 | 2022-09-27 | 北京百度网讯科技有限公司 | Method, apparatus, device, storage medium and program product for drawing spatial lines |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090265407A1 (en) * | 2008-04-22 | 2009-10-22 | Honeywell International Inc. | Method and System For Determining Altitude, Longitude, and Lattitude From Earth Orthogonal Coordinate System |
CN101964157A (en) * | 2010-09-27 | 2011-02-02 | 中国人民解放军国防科学技术大学 | Sphere rhombic grid recursive subdivision method |
-
2011
- 2011-10-09 CN CN201110302824.0A patent/CN102567439B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090265407A1 (en) * | 2008-04-22 | 2009-10-22 | Honeywell International Inc. | Method and System For Determining Altitude, Longitude, and Lattitude From Earth Orthogonal Coordinate System |
CN101964157A (en) * | 2010-09-27 | 2011-02-02 | 中国人民解放军国防科学技术大学 | Sphere rhombic grid recursive subdivision method |
Non-Patent Citations (2)
Title |
---|
吕雪锋 等: "球面剖分模型的架构与编码分析", 《测绘科学》 * |
张玉梅 等: "球面菱形网格递归剖分方法研究", 《地理与地理信息科学》 * |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9230258B2 (en) | 2010-04-01 | 2016-01-05 | International Business Machines Corporation | Space and time for entity resolution |
US10387780B2 (en) | 2012-08-14 | 2019-08-20 | International Business Machines Corporation | Context accumulation based on properties of entity features |
US9602129B2 (en) | 2013-03-15 | 2017-03-21 | International Business Machines Corporation | Compactly storing geodetic points |
US9719790B2 (en) | 2013-03-15 | 2017-08-01 | International Business Machines Corporation | Mapping uncertain geometries to graticules |
US9270451B2 (en) | 2013-10-03 | 2016-02-23 | Globalfoundries Inc. | Privacy enhanced spatial analytics |
US9338001B2 (en) | 2013-10-03 | 2016-05-10 | Globalfoundries Inc. | Privacy enhanced spatial analytics |
US9886783B2 (en) | 2015-01-07 | 2018-02-06 | International Business Machines Corporation | Indexing and querying spatial graphs |
US9886785B2 (en) | 2015-01-07 | 2018-02-06 | International Business Machines Corporation | Indexing and querying spatial graphs |
US10122805B2 (en) | 2015-06-30 | 2018-11-06 | International Business Machines Corporation | Identification of collaborating and gathering entities |
CN107229725A (en) * | 2017-06-06 | 2017-10-03 | 南京师范大学 | The fast conversion method that a kind of geographical coordinate is encoded to the discrete grid of spherical triangle |
CN107229725B (en) * | 2017-06-06 | 2019-07-09 | 南京师范大学 | A Fast Conversion Method of Geographic Coordinates to Spherical Triangular Discrete Grid Encoding |
CN115115799A (en) * | 2021-03-19 | 2022-09-27 | 北京百度网讯科技有限公司 | Method, apparatus, device, storage medium and program product for drawing spatial lines |
Also Published As
Publication number | Publication date |
---|---|
CN102567439B (en) | 2014-04-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102567439A (en) | SRG (sphere rhombus grid) subdivision code and geographic coordinate converting algorithm | |
CN104199986B (en) | Vector data space index method based on hbase and geohash | |
Yue et al. | Surface modelling of human population distribution in China | |
CN103136371A (en) | Subdivision identification generation method and data search method of multi-source space data | |
CN102938018B (en) | Partitioning method of equal-area global discrete grids based on warp and weft | |
CN104182475B (en) | A kind of positional information method for quickly retrieving of encoding based on mask technology and subdivision | |
WO2016095749A1 (en) | Method and device for querying spatial object and establishing spatial index of electronic map | |
CN106021567A (en) | Mass vector data partition method and system based on Hadoop | |
CN112348960A (en) | Airspace conflict detection method suitable for global space range | |
CN103617336B (en) | A kind of method for drafting of aircraft noise isogram | |
CN102855322A (en) | Map data storage method based on space exploration technology | |
CN112634448B (en) | Universal construction method for space grid driven by global discrete point cloud system | |
CN101964157B (en) | Sphere rhombic grid recursive subdivision method | |
CN110909093A (en) | Method and device for constructing intelligent landmark control network | |
CN112486987A (en) | City inquiry method, device, equipment and storage medium based on longitude and latitude | |
CN107229725B (en) | A Fast Conversion Method of Geographic Coordinates to Spherical Triangular Discrete Grid Encoding | |
CN107491471A (en) | Extensive chronometer data day area covering generation method based on Spark | |
Zhou et al. | Efficient cell navigation methods and applications of an aperture 4 hexagonal discrete global grid system | |
CN107273466A (en) | The discrete grid of spherical triangle encodes the fast conversion method to geographical latitude and longitude coordinates | |
CN106844642B (en) | A Method of Calculating Population Density in Road Network Grid Based on GIS | |
CN106649425A (en) | Spatial-contiguity-considered vector space data coding method | |
CN105205107A (en) | Internet of Things data similarity processing method | |
CN103984748B (en) | A kind of solar wind data partition, coding and the access method of large scale solar-terrestrial physics | |
CN112116709A (en) | Terrain feature line processing method for improving terrain expression precision | |
CN109583626B (en) | Road network topology reconstruction method, medium and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20140409 Termination date: 20151009 |
|
EXPY | Termination of patent right or utility model |