forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
901 lines
74 KiB
HTML
901 lines
74 KiB
HTML
<a name="mrs_01_1451"></a><a name="mrs_01_1451"></a>
|
|
|
|
<h1 class="topictitle1">Spatial Indexes</h1>
|
|
<div id="body1595920215201"><div class="section" id="mrs_01_1451__section3114411429"><h4 class="sectiontitle">Quick Example</h4><pre class="screen" id="mrs_01_1451__screen165647541525">create table IF NOT EXISTS carbonTable
|
|
(
|
|
COLUMN1 BIGINT,
|
|
LONGITUDE BIGINT,
|
|
LATITUDE BIGINT,
|
|
COLUMN2 BIGINT,
|
|
COLUMN3 BIGINT
|
|
)
|
|
STORED AS carbondata
|
|
TBLPROPERTIES ('SPATIAL_INDEX.mygeohash.type'='geohash','SPATIAL_INDEX.mygeohash.sourcecolumns'='longitude, latitude','SPATIAL_INDEX.mygeohash.originLatitude'='39.850713','SPATIAL_INDEX.mygeohash.gridSize'='50','SPATIAL_INDEX.mygeohash.minLongitude'='115.828503','SPATIAL_INDEX.mygeohash.maxLongitude'='720.000000','SPATIAL_INDEX.mygeohash.minLatitude'='39.850713','SPATIAL_INDEX.mygeohash.maxLatitude'='720.000000','SPATIAL_INDEX'='mygeohash','SPATIAL_INDEX.mygeohash.conversionRatio'='1000000','SORT_COLUMNS'='column1,column2,column3,latitude,longitude');</pre>
|
|
</div>
|
|
<div class="section" id="mrs_01_1451__section63842141312"><h4 class="sectiontitle">Introduction to Spatial Indexes</h4><p id="mrs_01_1451__p58049619219">Spatial data includes multidimensional points, lines, rectangles, cubes, polygons, and other geometric objects. A spatial data object occupies a certain region of space, called spatial scope, characterized by its location and boundary. The spatial data can be either point data or region data.</p>
|
|
<ul id="mrs_01_1451__ul5770844205613"><li id="mrs_01_1451__li147701144145612">Point data: A point has a spatial extent characterized completely by its location. It does not occupy space and has no associated boundary. Point data consists of a collection of points in a two-dimensional space. Points can be stored as a pair of longitude and latitude.</li><li id="mrs_01_1451__li1777014441564">Region data: A region has a spatial extent with a location, and boundary. The location can be considered as the position of a fixed point in the region, such as its centroid. In two dimensions, the boundary can be visualized as a line (for finite regions, a closed loop). Region data contains a collection of regions.</li></ul>
|
|
<p id="mrs_01_1451__p12804196427">Currently, only point data is supported, and it can be stored.</p>
|
|
<p id="mrs_01_1451__p680596728">Longitude and latitude can be encoded as a unique GeoID. Geohash is a public-domain geocoding system invented by Gustavo Niemeyer. It encodes geographical locations into a short string of letters and digits. It is a hierarchical spatial data structure which subdivides the space into buckets of grid shape, which is one of the many applications of what is known as the Z-order curve, and generally the space-filling curve.</p>
|
|
<p id="mrs_01_1451__p280566923">The Z value of a point in multiple dimensions is calculated by interleaving the binary representation of its coordinate value, as shown in the following figure. When Geohash is used to create a GeoID, data is sorted by GeoID instead of longitude and latitude. Data is stored by spatial proximity.</p>
|
|
<p id="mrs_01_1451__p1087105691819"><span><img id="mrs_01_1451__image487155616180" src="en-us_image_0000001296090372.png"></span></p>
|
|
</div>
|
|
<div class="section" id="mrs_01_1451__section186317481631"><h4 class="sectiontitle">Creating a Table</h4><p id="mrs_01_1451__p8772102814522"><strong id="mrs_01_1451__b8667113453912">GeoHash encoding</strong>:</p>
|
|
<pre class="screen" id="mrs_01_1451__screen1811741544">create table IF NOT EXISTS carbonTable
|
|
(
|
|
...
|
|
`LONGITUDE` BIGINT,
|
|
`LATITUDE` BIGINT,
|
|
...
|
|
)
|
|
STORED AS carbondata
|
|
TBLPROPERTIES ('SPATIAL_INDEX.mygeohash.type'='geohash','SPATIAL_INDEX.mygeohash.sourcecolumns'='longitude, latitude','SPATIAL_INDEX.mygeohash.originLatitude'='xx.xxxxxx','SPATIAL_INDEX.mygeohash.gridSize'='xx','SPATIAL_INDEX.mygeohash.minLongitude'='xxx.xxxxxx','SPATIAL_INDEX.mygeohash.maxLongitude'='xxx.xxxxxx','SPATIAL_INDEX.mygeohash.minLatitude'='xx.xxxxxx','SPATIAL_INDEX.mygeohash.maxLatitude'='xxx.xxxxxx','SPATIAL_INDEX'='mygeohash','SPATIAL_INDEX.mygeohash.conversionRatio'='1000000','SORT_COLUMNS'='column1,column2,column3,latitude,longitude');</pre>
|
|
<p id="mrs_01_1451__p3500131341616"><strong id="mrs_01_1451__b183252328">SPATIAL_INDEX</strong> is a user-defined index handler. This handler allows users to create new columns from the table-structure column set. The new column name is the same as that of the handler name. The <strong id="mrs_01_1451__b11655122731611">type</strong> and <strong id="mrs_01_1451__b96601227101620">sourcecolumns</strong> properties of the handler are mandatory. Currently, the value of <strong id="mrs_01_1451__b2643132851619">type</strong> supports only <strong id="mrs_01_1451__b1864332815166">geohash</strong>. Carbon provides a default implementation class that can be easily used. You can extend the default implementation class to mount the customized implementation class of <strong id="mrs_01_1451__b44893113165">geohash</strong>. The default handler also needs to provide the following table properties:</p>
|
|
<ul id="mrs_01_1451__ul15265735181014"><li id="mrs_01_1451__li12605182492710"><strong id="mrs_01_1451__b184800172173">SPATIAL_INDEX.</strong><em id="mrs_01_1451__i2067013143178">xxx</em><strong id="mrs_01_1451__b1936820141711">.originLatitude</strong>: specifies the origin latitude. (<strong id="mrs_01_1451__b10930461718">Double</strong> type.)</li><li id="mrs_01_1451__li73941248162718"><strong id="mrs_01_1451__b340882415172">SPATIAL_INDEX.</strong><em id="mrs_01_1451__i1840972451720">xxx</em><strong id="mrs_01_1451__b0410172412170">.gridSize</strong>: specifies the grid length in meters. (<strong id="mrs_01_1451__b1441192461710">Int</strong> type.)</li><li id="mrs_01_1451__li182669356102"><strong id="mrs_01_1451__b129166403175">SPATIAL_INDEX.</strong><em id="mrs_01_1451__i1992213407175">xxx</em><strong id="mrs_01_1451__b39239400173">.minLongitude</strong>: specifies the minimum longitude. (<strong id="mrs_01_1451__b17924740121717">Double</strong> type.)</li><li id="mrs_01_1451__li1326693519109"><strong id="mrs_01_1451__b617165301720">SPATIAL_INDEX.</strong><em id="mrs_01_1451__i52225381711">xxx</em><strong id="mrs_01_1451__b322165317174">.maxLongitude</strong>: specifies the maximum longitude. (<strong id="mrs_01_1451__b22317530178">Double</strong> type.)</li><li id="mrs_01_1451__li8266133501013"><strong id="mrs_01_1451__b53917581818">SPATIAL_INDEX.</strong><em id="mrs_01_1451__i164414518188">xxx</em><strong id="mrs_01_1451__b3454518185">.minLatitude</strong>: specifies the minimum latitude. (<strong id="mrs_01_1451__b124617581815">Double</strong> type.)</li><li id="mrs_01_1451__li1726623521019"><strong id="mrs_01_1451__b191379136187">SPATIAL_INDEX.</strong><em id="mrs_01_1451__i11138513171818">xxx</em><strong id="mrs_01_1451__b10139713181810">.maxLatitude</strong>: specifies the maximum latitude. (<strong id="mrs_01_1451__b1213971316181">Double</strong> type.)</li><li id="mrs_01_1451__li1685232110299"><strong id="mrs_01_1451__b1720152111815">SPATIAL_INDEX.</strong><em id="mrs_01_1451__i10726021201816">xxx</em><strong id="mrs_01_1451__b1972718218187">.conversionRatio</strong>: used to convert the small value of the longitude and latitude to an integer. (<strong id="mrs_01_1451__b15727021111811">Int</strong> type.)</li></ul>
|
|
<p id="mrs_01_1451__p1680506822">You can add your own table properties to the handlers in the above format and access them in your custom implementation class. <strong id="mrs_01_1451__b22751423018">originLatitude</strong>, <strong id="mrs_01_1451__b74831280309">gridSize</strong>, and <strong id="mrs_01_1451__b1263418100306">conversionRatio</strong> are mandatory. Other parameters are optional in Carbon. You can use the <strong id="mrs_01_1451__b957583441819">SPATIAL_INDEX.</strong><em id="mrs_01_1451__i1458143418186">xxx</em><strong id="mrs_01_1451__b7582934151817">.class</strong> property to specify their implementation classes.</p>
|
|
<p id="mrs_01_1451__p118051864211">The default implementation class can generate handler column values for <strong id="mrs_01_1451__b393714481810">sourcecolumns</strong> in each row and support query based on the <strong id="mrs_01_1451__b99421644181814">sourcecolumns</strong> filter criteria. The generated handler column is invisible to users. Except the <strong id="mrs_01_1451__b145874931817">SORT_COLUMNS</strong> table properties, no DDL commands or properties are allowed to contain the handler column.</p>
|
|
<div class="note" id="mrs_01_1451__note105202511118"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="mrs_01_1451__ul75885414578"><li id="mrs_01_1451__li135835475710">By default, the generated handler column is regarded as the sorting column. If <strong id="mrs_01_1451__b17379115261814">SORT_COLUMNS</strong> does not contain any <strong id="mrs_01_1451__b17379952141812">sourcecolumns</strong>, add the handler column to the end of the existing <strong id="mrs_01_1451__b33801152101819">SORT_COLUMNS</strong>. If the handler column has been specified in <strong id="mrs_01_1451__b83580548188">SORT_COLUMNS</strong>, its order in <strong id="mrs_01_1451__b3359115412180">SORT_COLUMNS</strong> remains unchanged.</li><li id="mrs_01_1451__li158175413570">If <strong id="mrs_01_1451__b547445514180">SORT_COLUMNS</strong> contains any <strong id="mrs_01_1451__b174757557183">sourcecolumns</strong> but does not contain the handler column, the handler column is automatically inserted before <strong id="mrs_01_1451__b1547511551185">sourcecolumns</strong> in <strong id="mrs_01_1451__b14476655141812">SORT_COLUMNS</strong>.</li><li id="mrs_01_1451__li3581554125712">If <strong id="mrs_01_1451__b14181115971813">SORT_COLUMNS</strong> needs to contain any <strong id="mrs_01_1451__b1318665941811">sourcecolumns</strong>, ensure that the handler column is listed before the <strong id="mrs_01_1451__b20187165916181">sourcecolumns</strong> so that the handler column can take effect during sorting.</li></ul>
|
|
</div></div>
|
|
</div>
|
|
<p id="mrs_01_1451__p3815653111"><strong id="mrs_01_1451__b5224146134111">GeoSOT encoding</strong>:</p>
|
|
<pre class="screen" id="mrs_01_1451__screen14877191318116">CREATE TABLE carbontable(
|
|
...
|
|
longitude DOUBLE,
|
|
latitude DOUBLE,
|
|
...)
|
|
STORED AS carbondata
|
|
TBLPROPERTIES ('SPATIAL_INDEX'='xxx',
|
|
'SPATIAL_INDEX.xxx.type'='geosot',
|
|
'SPATIAL_INDEX.xxx.sourcecolumns'='longitude, latitude',
|
|
'SPATIAL_INDEX.xxx.level'='21',
|
|
'SPATIAL_INDEX.xxx.class'='org.apache.carbondata.geo.GeoSOTIndex')</pre>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table14618195955712" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="mrs_01_1451__row10618105915573"><th align="left" class="cellrowborder" valign="top" width="35%" id="mcps1.3.6.2.3.1.1"><p id="mrs_01_1451__p561865910579">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="65%" id="mcps1.3.6.2.3.1.2"><p id="mrs_01_1451__p11618159125713">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row126181459165718"><td class="cellrowborder" valign="top" width="35%" headers="mcps1.3.6.2.3.1.1 "><p id="mrs_01_1451__p14618185910574">SPATIAL_INDEX</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65%" headers="mcps1.3.6.2.3.1.2 "><p id="mrs_01_1451__p66181159125714">Specifies the spatial index. Its value is the same as the column name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1451__row86741112145819"><td class="cellrowborder" valign="top" width="35%" headers="mcps1.3.6.2.3.1.1 "><p id="mrs_01_1451__p1367411215585">SPATIAL_INDEX.xxx.type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65%" headers="mcps1.3.6.2.3.1.2 "><p id="mrs_01_1451__p136741312175817">(Mandatory) The value is set to <strong id="mrs_01_1451__b1725982413539">geosot</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1451__row314910910016"><td class="cellrowborder" valign="top" width="35%" headers="mcps1.3.6.2.3.1.1 "><p id="mrs_01_1451__p914999309">SPATIAL_INDEX.xxx.sourcecolumns</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65%" headers="mcps1.3.6.2.3.1.2 "><p id="mrs_01_1451__p1214949309">(Mandatory) Specifies the source columns for calculating the spatial index. The value must be two existing columns of the double type.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1451__row028411481808"><td class="cellrowborder" valign="top" width="35%" headers="mcps1.3.6.2.3.1.1 "><p id="mrs_01_1451__p12284648108">SPATIAL_INDEX.xxx.level</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65%" headers="mcps1.3.6.2.3.1.2 "><p id="mrs_01_1451__p172855481806">(Optional) Specifies the columns for calculating the spatial index. The default value is <strong id="mrs_01_1451__b929318293011">17</strong>, through which you can obtain an accurate result and improve the computing performance.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1451__row04513202117"><td class="cellrowborder" valign="top" width="35%" headers="mcps1.3.6.2.3.1.1 "><p id="mrs_01_1451__p54512201312">SPATIAL_INDEX.xxx.class</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65%" headers="mcps1.3.6.2.3.1.2 "><p id="mrs_01_1451__p14511420618">(Optional) Specifies the implementation class of GeoSOT. The default value is <strong id="mrs_01_1451__b49841233493">org.apache.carbondata.geo.GeoSOTIndex</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p148887214414">Example:</p>
|
|
<pre class="screen" id="mrs_01_1451__screen35661727130">create table geosot(
|
|
timevalue bigint,
|
|
longitude double,
|
|
latitude double)
|
|
stored as carbondata
|
|
TBLPROPERTIES ('SPATIAL_INDEX'='mygeosot',
|
|
'SPATIAL_INDEX.mygeosot.type'='geosot',
|
|
'SPATIAL_INDEX.mygeosot.level'='21', 'SPATIAL_INDEX.mygeosot.sourcecolumns'='longitude, latitude');</pre>
|
|
<div class="section" id="mrs_01_1451__section106234720257"><a name="mrs_01_1451__section106234720257"></a><a name="section106234720257"></a><h4 class="sectiontitle">Preparing Data</h4><ul id="mrs_01_1451__ul83916351347"><li id="mrs_01_1451__li20391735546">Data file 1: <strong id="mrs_01_1451__b11175114113537">geosotdata.csv</strong><pre class="screen" id="mrs_01_1451__screen1747151713413">timevalue,longitude,latitude
|
|
1575428400000,116.285807,40.084087
|
|
1575428400000,116.372142,40.129503
|
|
1575428400000,116.187332,39.979316
|
|
1575428400000,116.337069,39.951887
|
|
1575428400000,116.359102,40.154684
|
|
1575428400000,116.736367,39.970323
|
|
1575428400000,116.720179,40.009893
|
|
1575428400000,116.346961,40.13355
|
|
1575428400000,116.302895,39.930753
|
|
1575428400000,116.288955,39.999101
|
|
1575428400000,116.17609,40.129953
|
|
1575428400000,116.725575,39.981115
|
|
1575428400000,116.266922,40.179415
|
|
1575428400000,116.353706,40.156483
|
|
1575428400000,116.362699,39.942444
|
|
1575428400000,116.325378,39.963129</pre>
|
|
</li><li id="mrs_01_1451__li159823404410">Data file 2: <strong id="mrs_01_1451__b7126754195316">geosotdata2.csv</strong><pre class="screen" id="mrs_01_1451__screen668872819411">timevalue,longitude,latitude
|
|
1575428400000,120.17708,30.326882
|
|
1575428400000,120.180685,30.326327
|
|
1575428400000,120.184976,30.327105
|
|
1575428400000,120.189311,30.327549
|
|
1575428400000,120.19446,30.329698
|
|
1575428400000,120.186965,30.329133
|
|
1575428400000,120.177481,30.328911
|
|
1575428400000,120.169713,30.325614
|
|
1575428400000,120.164563,30.322243
|
|
1575428400000,120.171558,30.319613
|
|
1575428400000,120.176365,30.320687
|
|
1575428400000,120.179669,30.323688
|
|
1575428400000,120.181001,30.320761
|
|
1575428400000,120.187094,30.32354
|
|
1575428400000,120.193574,30.323651
|
|
1575428400000,120.186192,30.320132
|
|
1575428400000,120.190055,30.317464
|
|
1575428400000,120.195376,30.318094
|
|
1575428400000,120.160786,30.317094
|
|
1575428400000,120.168211,30.318057
|
|
1575428400000,120.173618,30.316612
|
|
1575428400000,120.181001,30.317316
|
|
1575428400000,120.185162,30.315908
|
|
1575428400000,120.192415,30.315871
|
|
1575428400000,120.161902,30.325614
|
|
1575428400000,120.164306,30.328096
|
|
1575428400000,120.197093,30.325985
|
|
1575428400000,120.19602,30.321651
|
|
1575428400000,120.198638,30.32354
|
|
1575428400000,120.165421,30.314834</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="mrs_01_1451__section154085230516"><h4 class="sectiontitle">Importing Data</h4><p id="mrs_01_1451__p1805116322">The GeoHash default implementation class extends the customized index abstract class. If the handler property is not set to a customized implementation class, the default implementation class is used. You can extend the default implementation class to mount the customized implementation class of <strong id="mrs_01_1451__b143238319193">geohash</strong>. The methods of the customized index abstract class are as follows:</p>
|
|
<ul id="mrs_01_1451__ul19771651181117"><li id="mrs_01_1451__li1997795171113"><strong id="mrs_01_1451__b595818451918">Init</strong> method: Used to extract, verify, and store the handler property. If the operation fails, the system throws an exception and displays the error information.</li><li id="mrs_01_1451__li1997713513118"><strong id="mrs_01_1451__b17362676192">Generate</strong> method: Used to generate indexes. It generates an index for each row of data.</li><li id="mrs_01_1451__li2977051201119"><strong id="mrs_01_1451__b156234931917">Query</strong> method: Used to generate an index value range list for given input.</li></ul>
|
|
<p id="mrs_01_1451__p13547171236">The commands for importing data are the same as those for importing common Carbon tables.</p>
|
|
<p id="mrs_01_1451__p1607957163519"><strong id="mrs_01_1451__b73351144989">LOAD DATA inpath '/tmp/</strong><em id="mrs_01_1451__i178415479810">geosotdata.csv</em><strong id="mrs_01_1451__b1933517441789">' INTO TABLE geosot OPTIONS ('DELIMITER'= ',');</strong></p>
|
|
<p id="mrs_01_1451__p1955613253615"><strong id="mrs_01_1451__b1731512818">LOAD DATA inpath '/tmp/</strong><em id="mrs_01_1451__i14528205214816">geosotdata2.csv</em><strong id="mrs_01_1451__b5731351388">' INTO TABLE geosot OPTIONS ('DELIMITER'= ',');</strong></p>
|
|
<div class="note" id="mrs_01_1451__note3554154619187"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="mrs_01_1451__p15554746191812">For details about <strong id="mrs_01_1451__b412924716147">geosotdata.csv</strong> and <strong id="mrs_01_1451__b18255165118144">geosotdata2.csv</strong>, see <a href="#mrs_01_1451__section106234720257">Preparing Data</a>.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="mrs_01_1451__section36551435857"><h4 class="sectiontitle">Aggregate Query of Irregular Spatial Sets</h4><div class="p" id="mrs_01_1451__p97270195192"><strong id="mrs_01_1451__b11869104063115">Query statements and filter UDFs</strong><ul id="mrs_01_1451__ul656932971917"><li id="mrs_01_1451__li132771451191310">Filtering data based on polygon<p id="mrs_01_1451__p4878183961412"><a name="mrs_01_1451__li132771451191310"></a><a name="li132771451191310"></a><strong id="mrs_01_1451__b1095772801412">IN_POLYGON(pointList)</strong></p>
|
|
<p id="mrs_01_1451__p3843163331613">UDF input parameter</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table1273981212157" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row97396129151"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.2.2.1.3.1.4.1.1"><p id="mrs_01_1451__p3739212161512">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="24.97%" id="mcps1.3.11.2.2.1.3.1.4.1.2"><p id="mrs_01_1451__p1173919124150">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50.029999999999994%" id="mcps1.3.11.2.2.1.3.1.4.1.3"><p id="mrs_01_1451__p9739191281511">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row1473991210152"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.2.2.1.3.1.4.1.1 "><p id="mrs_01_1451__p11740161220156">pointList</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.97%" headers="mcps1.3.11.2.2.1.3.1.4.1.2 "><p id="mrs_01_1451__p374061211519">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.029999999999994%" headers="mcps1.3.11.2.2.1.3.1.4.1.3 "><p id="mrs_01_1451__p145251185617">Enter multiple points as a string. Each point is presented as <strong id="mrs_01_1451__b642120567910">longitude latitude</strong>. Longitude and latitude are separated by a space. Each pair of longitude and latitude is separated by a comma (,). The longitude and latitude values at the start and end of the string must be the same.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p13779243111620">UDF output parameter</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table392171341714" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row119219131170"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.2.2.1.5.1.4.1.1"><p id="mrs_01_1451__p192181381710">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.2.2.1.5.1.4.1.2"><p id="mrs_01_1451__p189210131179">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.2.2.1.5.1.4.1.3"><p id="mrs_01_1451__p19921513121711">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row17922191391714"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.2.2.1.5.1.4.1.1 "><p id="mrs_01_1451__p29222013191716">inOrNot</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.2.2.1.5.1.4.1.2 "><p id="mrs_01_1451__p492261361711">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.2.2.1.5.1.4.1.3 "><p id="mrs_01_1451__p12922313171719">Checks whether data is in the specified <strong id="mrs_01_1451__b17843175978">polygon_list</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p127499366174">Example:</p>
|
|
<pre class="screen" id="mrs_01_1451__screen73317301493">select longitude, latitude from geosot where IN_POLYGON('116.321011 40.123503, 116.137676 39.947911, 116.560993 39.935276, 116.321011 40.123503');</pre>
|
|
<p id="mrs_01_1451__p154354034820"></p>
|
|
</li><li id="mrs_01_1451__li1156919298191">Filtering data based on the polygon list<p id="mrs_01_1451__p1434343811242"><a name="mrs_01_1451__li1156919298191"></a><a name="li1156919298191"></a><strong id="mrs_01_1451__b20343143815248">IN_POLYGON_LIST(polygonList, opType)</strong></p>
|
|
<p id="mrs_01_1451__p3469142616258">UDF input parameters</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table1442210262257" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row1146992616256"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.2.2.2.3.1.4.1.1"><p id="mrs_01_1451__p946962618258">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.2.2.2.3.1.4.1.2"><p id="mrs_01_1451__p1046912692511">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.2.2.2.3.1.4.1.3"><p id="mrs_01_1451__p44691826152516">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row34692262254"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.2.2.2.3.1.4.1.1 "><p id="mrs_01_1451__p1946972602513">polygonList</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.2.2.2.3.1.4.1.2 "><p id="mrs_01_1451__p7469826182513">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.2.2.2.3.1.4.1.3 "><p id="mrs_01_1451__p1469152642512">Inputs multiple polygons as a string. Each polygon is presented as <strong id="mrs_01_1451__b63231424718">POLYGON ((longitude1 latitude1, longitude2 latitude2, …))</strong>. Note that there is a space after <strong id="mrs_01_1451__b891975516457">POLYGON</strong>. Longitudes and latitudes are separated by spaces. Each pair of longitude and latitude is separated by a comma (,). The longitudes and latitudes at the start and end of a polygon must be the same. <strong id="mrs_01_1451__b213131611589">IN_POLYGON_LIST</strong> requires at least two polygons.</p>
|
|
<p id="mrs_01_1451__p1546972662510">Example:</p>
|
|
<pre class="screen" id="mrs_01_1451__screen1537216491377">POLYGON ((116.137676 40.163503, 116.137676 39.935276, 116.560993 39.935276, 116.137676 40.163503))</pre>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1451__row1746992618259"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.2.2.2.3.1.4.1.1 "><p id="mrs_01_1451__p10469132614255">opType</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.2.2.2.3.1.4.1.2 "><p id="mrs_01_1451__p204696266259">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.2.2.2.3.1.4.1.3 "><p id="mrs_01_1451__p18469112682519">Performs union, intersection, and subtraction on multiple polygons.</p>
|
|
<p id="mrs_01_1451__p20469112617252">Currently, the following operation types are supported:</p>
|
|
<ul id="mrs_01_1451__ul14469162642517"><li id="mrs_01_1451__li16469192652514">OR: A U B U C (Assume that three polygons A, B, and C are input.)</li><li id="mrs_01_1451__li1546914266257">AND: A ∩ B ∩ C</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p8469102616251">UDF output parameter</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table11437122652513" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row1446972611257"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.2.2.2.5.1.4.1.1"><p id="mrs_01_1451__p15469026192516">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.2.2.2.5.1.4.1.2"><p id="mrs_01_1451__p17469426172516">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.2.2.2.5.1.4.1.3"><p id="mrs_01_1451__p4469192682517">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row1746916269255"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.2.2.2.5.1.4.1.1 "><p id="mrs_01_1451__p124691726142514">inOrNot</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.2.2.2.5.1.4.1.2 "><p id="mrs_01_1451__p1546919267251">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.2.2.2.5.1.4.1.3 "><p id="mrs_01_1451__p15469726132515">Checks whether data is in the specified <strong id="mrs_01_1451__b520567458">polygon_list</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p1746952652511">Example:</p>
|
|
<pre class="screen" id="mrs_01_1451__screen9104105555512">select longitude, latitude from geosot where IN_POLYGON_LIST('POLYGON ((120.176433 30.327431,120.171283 30.322245,120.181411 30.314540, 120.190509 30.321653,120.185188 30.329358,120.176433 30.327431)), POLYGON ((120.191603 30.328946,120.184179 30.327465,120.181819 30.321464, 120.190359 30.315388,120.199242 30.324464,120.191603 30.328946))', 'OR');</pre>
|
|
<p id="mrs_01_1451__p1189411383117"></p>
|
|
</li><li id="mrs_01_1451__li145691829141916">Filtering data based on the polyline list<p id="mrs_01_1451__p136716443115"><a name="mrs_01_1451__li145691829141916"></a><a name="li145691829141916"></a><strong id="mrs_01_1451__b267154143114">IN_POLYLINE_LIST(polylineList, bufferInMeter)</strong></p>
|
|
<p id="mrs_01_1451__p2067194143114">UDF input parameters</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table06104415313" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row567216483119"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.2.2.3.3.1.4.1.1"><p id="mrs_01_1451__p1567215493117">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.2.2.3.3.1.4.1.2"><p id="mrs_01_1451__p367214193110">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.2.2.3.3.1.4.1.3"><p id="mrs_01_1451__p136721748312">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row36725493119"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.2.2.3.3.1.4.1.1 "><p id="mrs_01_1451__p76721642311">polylineList</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.2.2.3.3.1.4.1.2 "><p id="mrs_01_1451__p46728419317">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.2.2.3.3.1.4.1.3 "><p id="mrs_01_1451__p146721414318">Inputs multiple polylines as a string. Each polyline is presented as <strong id="mrs_01_1451__b8749172713715">LINESTRING (longitude1 latitude1, longitude2 latitude2, …)</strong>. Note that there is a space after <strong id="mrs_01_1451__b167851458121212">LINESTRING</strong>. Longitudes and latitudes are separated by spaces. Each pair of longitude and latitude is separated by a comma (,).</p>
|
|
<p id="mrs_01_1451__p19672154123110">A union will be output based on the data in multiple polylines.</p>
|
|
<p id="mrs_01_1451__p166720420316">Example:</p>
|
|
<pre class="screen" id="mrs_01_1451__screen72093514711">LINESTRING (116.137676 40.163503, 116.137676 39.935276, 116.260993 39.935276)</pre>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1451__row467213413315"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.2.2.3.3.1.4.1.1 "><p id="mrs_01_1451__p867220411316">bufferInMeter</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.2.2.3.3.1.4.1.2 "><p id="mrs_01_1451__p1467213413117">Float</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.2.2.3.3.1.4.1.3 "><p id="mrs_01_1451__p136721946311">Polyline buffer distance, in meters. Right angles are used at the end to create a buffer.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p067213413115">UDF output parameter</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table12618542319" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row196724419312"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.2.2.3.5.1.4.1.1"><p id="mrs_01_1451__p267214413318">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.2.2.3.5.1.4.1.2"><p id="mrs_01_1451__p66721473117">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.2.2.3.5.1.4.1.3"><p id="mrs_01_1451__p66727419314">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row767217415317"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.2.2.3.5.1.4.1.1 "><p id="mrs_01_1451__p5672134123120">inOrNot</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.2.2.3.5.1.4.1.2 "><p id="mrs_01_1451__p136721347315">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.2.2.3.5.1.4.1.3 "><p id="mrs_01_1451__p20672204193115">Checks whether data is in the specified <strong id="mrs_01_1451__b4262161118312">polyline_list</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p1167213443119">Example:</p>
|
|
<pre class="screen" id="mrs_01_1451__screen968932935714">select longitude, latitude from geosot where IN_POLYLINE_LIST('LINESTRING (120.184179 30.327465, 120.191603 30.328946, 120.199242 30.324464, 120.190359 30.315388)', 65);</pre>
|
|
</li><li id="mrs_01_1451__li056912294195">Filtering data based on the GeoID range list<p id="mrs_01_1451__p156726453119"><a name="mrs_01_1451__li056912294195"></a><a name="li056912294195"></a><strong id="mrs_01_1451__b206724411317">IN_POLYGON_RANGE_LIST(polygonRangeList, opType)</strong></p>
|
|
<div class="p" id="mrs_01_1451__p196724414317">UDF input parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table2620104113117" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row156725433111"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.2.2.4.2.1.1.4.1.1"><p id="mrs_01_1451__p156721945314">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.2.2.4.2.1.1.4.1.2"><p id="mrs_01_1451__p36723411318">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.2.2.4.2.1.1.4.1.3"><p id="mrs_01_1451__p2672442317">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row26721245313"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.2.2.4.2.1.1.4.1.1 "><p id="mrs_01_1451__p1967216443110">polygonRangeList</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.2.2.4.2.1.1.4.1.2 "><p id="mrs_01_1451__p126721041315">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.2.2.4.2.1.1.4.1.3 "><p id="mrs_01_1451__p106728411311">Inputs multiple rangeLists as a string. Each rangeList is presented as <strong id="mrs_01_1451__b646425920810">RANGELIST (startGeoId1 endGeoId1, startGeoId2 endGeoId2, …)</strong>. Note that there is a space after <strong id="mrs_01_1451__b639514815376">RANGELIST</strong>. Start GeoIDs and end GeoIDs are separated by spaces. Each group of GeoID ranges is separated by a comma (,).</p>
|
|
<p id="mrs_01_1451__p367219410312">Example:</p>
|
|
<pre class="screen" id="mrs_01_1451__screen32915331892">RANGELIST (855279368848 855279368850, 855280799610 855280799612, 855282156300 855282157400)</pre>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1451__row167217413312"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.2.2.4.2.1.1.4.1.1 "><p id="mrs_01_1451__p06721746318">opType</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.2.2.4.2.1.1.4.1.2 "><p id="mrs_01_1451__p1567274183117">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.2.2.4.2.1.1.4.1.3 "><p id="mrs_01_1451__p1967211483112">Performs union, intersection, and subtraction on multiple rangeLists.</p>
|
|
<p id="mrs_01_1451__p36722410310">Currently, the following operation types are supported:</p>
|
|
<ul id="mrs_01_1451__ul1672944310"><li id="mrs_01_1451__li146729418314">OR: A U B U C (Assume that three rangeLists A, B, and C are input.)</li><li id="mrs_01_1451__li1467224133111">AND: A ∩ B ∩ C</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<p id="mrs_01_1451__p136720423111">UDF output parameter</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table136281343312" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row567214453118"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.2.2.4.4.1.4.1.1"><p id="mrs_01_1451__p15672104173117">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.2.2.4.4.1.4.1.2"><p id="mrs_01_1451__p46721047314">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.2.2.4.4.1.4.1.3"><p id="mrs_01_1451__p18672174133116">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row76727413112"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.2.2.4.4.1.4.1.1 "><p id="mrs_01_1451__p10672174113114">inOrNot</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.2.2.4.4.1.4.1.2 "><p id="mrs_01_1451__p16725417319">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.2.2.4.4.1.4.1.3 "><p id="mrs_01_1451__p196723410319">Checks whether data is in the specified <strong id="mrs_01_1451__b341623474217">polyRange_list</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p1467219415312">Example:</p>
|
|
<pre class="screen" id="mrs_01_1451__screen198313715816">select mygeosot, longitude, latitude from geosot where IN_POLYGON_RANGE_LIST('RANGELIST (526549722865860608 526549722865860618, 532555655580483584 532555655580483594)', 'OR');</pre>
|
|
</li></ul>
|
|
</div>
|
|
<ul id="mrs_01_1451__ul3777344012"><li id="mrs_01_1451__li127716341900">Performing polygon query<p id="mrs_01_1451__p9733110131513"><a name="mrs_01_1451__li127716341900"></a><a name="li127716341900"></a><strong id="mrs_01_1451__b1072833551313">IN_POLYGON_JOIN(GEO_HASH_INDEX_COLUMN, POLYGON_COLUMN)</strong></p>
|
|
<p id="mrs_01_1451__p1215320419153">Perform join query on two tables. One is a spatial data table containing the longitude, latitude, and GeoHashIndex columns, and the other is a dimension table that saves polygon data.</p>
|
|
<p id="mrs_01_1451__p9153741201511">During query, <strong id="mrs_01_1451__b240718383560">IN_POLYGON_JOIN UDF</strong>, <strong id="mrs_01_1451__b17153155316567">GEO_HASH_INDEX_COLUMN</strong>, and <strong id="mrs_01_1451__b1552011560561">POLYGON_COLUMN</strong> of the polygon table are used. <strong id="mrs_01_1451__b5609822165219">Polygon_column</strong> specifies the column containing multiple points (longitude and latitude pairs). The first and last points in each row of the Polygon table must be the same. All points in each row form a closed geometric shape.</p>
|
|
<p id="mrs_01_1451__p19255182812261">UDF input parameters</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table1954085141613" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row1454116531619"><th align="left" class="cellrowborder" valign="top" width="24.97%" id="mcps1.3.11.3.1.5.1.4.1.1"><p id="mrs_01_1451__p65411153160">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25.03%" id="mcps1.3.11.3.1.5.1.4.1.2"><p id="mrs_01_1451__p5541256169">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.3.1.5.1.4.1.3"><p id="mrs_01_1451__p1754116510169">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row1254135101617"><td class="cellrowborder" valign="top" width="24.97%" headers="mcps1.3.11.3.1.5.1.4.1.1 "><p id="mrs_01_1451__p1654119516162">GEO_HASH_INDEX_COLUMN</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25.03%" headers="mcps1.3.11.3.1.5.1.4.1.2 "><p id="mrs_01_1451__p135412541619">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.3.1.5.1.4.1.3 "><p id="mrs_01_1451__p1754117517167">GeoHashIndex column of the spatial data table.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1451__row181831565167"><td class="cellrowborder" valign="top" width="24.97%" headers="mcps1.3.11.3.1.5.1.4.1.1 "><p id="mrs_01_1451__p3184195619163">POLYGON_COLUMN</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25.03%" headers="mcps1.3.11.3.1.5.1.4.1.2 "><p id="mrs_01_1451__p161843567167">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.3.1.5.1.4.1.3 "><p id="mrs_01_1451__p51841156201619">Polygon column of the polygon table, the value of which is represented by the string of polygon, for example, <strong id="mrs_01_1451__b76641219191311">POLYGON (( longitude1 latitude1, longitude2 latitude2, ...))</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p94831531121711">Example:</p>
|
|
<pre class="screen" id="mrs_01_1451__screen1432623172515">CREATE TABLE polygonTable(
|
|
polygon string,
|
|
poiType string,
|
|
poiId String)
|
|
STORED AS carbondata;
|
|
|
|
insert into polygonTable select 'POLYGON ((120.176433 30.327431,120.171283 30.322245, 120.181411 30.314540,120.190509 30.321653,120.185188 30.329358,120.176433 30.327431))','abc','1';
|
|
|
|
insert into polygonTable select 'POLYGON ((120.191603 30.328946,120.184179 30.327465, 120.181819 30.321464,120.190359 30.315388,120.199242 30.324464,120.191603 30.328946))','abc','2';
|
|
|
|
select t1.longitude,t1.latitude from geosot t1
|
|
inner join
|
|
(select polygon,poiId from polygonTable where poitype='abc') t2
|
|
on in_polygon_join(t1.mygeosot,t2.polygon) group by t1.longitude,t1.latitude;</pre>
|
|
<p id="mrs_01_1451__p01911077499"></p>
|
|
</li><li id="mrs_01_1451__li3826275413">Performing range_list query<p id="mrs_01_1451__p478602744317"><a name="mrs_01_1451__li3826275413"></a><a name="li3826275413"></a><strong id="mrs_01_1451__b17561423104312">IN_POLYGON_JOIN_RANGE_LIST(GEO_HASH_INDEX_COLUMN, POLYGON_COLUMN)</strong></p>
|
|
<p id="mrs_01_1451__p12442843134313">Use the <strong id="mrs_01_1451__b864017755820">IN_POLYGON_JOIN_RANGE_LIST</strong> UDF to associate the spatial data table with the polygon dimension table based on <strong id="mrs_01_1451__b734665016517">Polygon_RangeList</strong>. By using a range list, you can skip the conversion between a polygon and a range list.</p>
|
|
<p id="mrs_01_1451__p410961724913">UDF input parameters</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table174241417194910" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row342431744917"><th align="left" class="cellrowborder" valign="top" width="24.97%" id="mcps1.3.11.3.2.4.1.4.1.1"><p id="mrs_01_1451__p2042411711492">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25.03%" id="mcps1.3.11.3.2.4.1.4.1.2"><p id="mrs_01_1451__p15424181774919">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.3.2.4.1.4.1.3"><p id="mrs_01_1451__p12424417114916">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row1342412177493"><td class="cellrowborder" valign="top" width="24.97%" headers="mcps1.3.11.3.2.4.1.4.1.1 "><p id="mrs_01_1451__p142417174498">GEO_HASH_INDEX_COLUMN</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25.03%" headers="mcps1.3.11.3.2.4.1.4.1.2 "><p id="mrs_01_1451__p34241117174919">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.3.2.4.1.4.1.3 "><p id="mrs_01_1451__p13424171774911">GeoHashIndex column of the spatial data table.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1451__row44255178498"><td class="cellrowborder" valign="top" width="24.97%" headers="mcps1.3.11.3.2.4.1.4.1.1 "><p id="mrs_01_1451__p1242551713497">POLYGON_COLUMN</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25.03%" headers="mcps1.3.11.3.2.4.1.4.1.2 "><p id="mrs_01_1451__p1342581719495">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.3.2.4.1.4.1.3 "><p id="mrs_01_1451__p188011116175012">Rangelist column of the Polygon table, the value of which is represented by the string of rangeList, for example, <strong id="mrs_01_1451__b19617914135">RANGELIST (startGeoId1 endGeoId1, startGeoId2 endGeoId2, ...)</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p644219263502">Example:</p>
|
|
<pre class="screen" id="mrs_01_1451__screen03311258102416">CREATE TABLE polygonTable(
|
|
polygon string,
|
|
poiType string,
|
|
poiId String)
|
|
STORED AS carbondata;
|
|
|
|
insert into polygonTable select 'RANGELIST (526546455897309184 526546455897309284, 526549831217315840 526549831217315850, 532555655580483534 532555655580483584)','xyz','2';
|
|
|
|
select t1.*
|
|
from geosot t1
|
|
inner join
|
|
(select polygon,poiId from polygonTable where poitype='xyz') t2
|
|
on in_polygon_join_range_list(t1.mygeosot,t2.polygon);</pre>
|
|
<p id="mrs_01_1451__p1572747538"></p>
|
|
</li></ul>
|
|
<div class="p" id="mrs_01_1451__p4650174141916"><strong id="mrs_01_1451__b1093816335414">UDFs of spacial index tools</strong><ul id="mrs_01_1451__ul16594791915"><li id="mrs_01_1451__li126514711193">Obtaining row number and column number of a grid converted from GeoID<p id="mrs_01_1451__p152416113333"><a name="mrs_01_1451__li126514711193"></a><a name="li126514711193"></a><strong id="mrs_01_1451__b15241511335">GeoIdToGridXy(geoId)</strong></p>
|
|
<p id="mrs_01_1451__p16524012336">UDF input parameter</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table113941114331" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row7525619336"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.1.3.1.4.1.1"><p id="mrs_01_1451__p15525191113316">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.1.3.1.4.1.2"><p id="mrs_01_1451__p135258120330">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.4.2.1.3.1.4.1.3"><p id="mrs_01_1451__p35251512333">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row1352519117335"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.1.3.1.4.1.1 "><p id="mrs_01_1451__p05253153317">geoId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.1.3.1.4.1.2 "><p id="mrs_01_1451__p95254112334">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.1.3.1.4.1.3 "><p id="mrs_01_1451__p135251012339">Calculates the row number and column number of the grid based on GeoID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p3525151153318">UDF output parameter</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table2401191123312" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row1152517193311"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.1.5.1.4.1.1"><p id="mrs_01_1451__p10525181113310">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.1.5.1.4.1.2"><p id="mrs_01_1451__p205251814333">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.4.2.1.5.1.4.1.3"><p id="mrs_01_1451__p35252163310">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row1552511103317"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.1.5.1.4.1.1 "><p id="mrs_01_1451__p352561183310">gridArray</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.1.5.1.4.1.2 "><p id="mrs_01_1451__p6525141113316">Array[Int]</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.1.5.1.4.1.3 "><p id="mrs_01_1451__p15525111153314">Returns the grid row and column numbers contained in GeoID in array. The first digit indicates the row number, and the second digit indicates the column number.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p75257118336">Example:</p>
|
|
<pre class="screen" id="mrs_01_1451__screen767104413588">select longitude, latitude, mygeohash, GeoIdToGridXy(mygeohash) as GridXY from geoTable;</pre>
|
|
</li><li id="mrs_01_1451__li126584781917">Converting longitude and latitude to GeoID<p id="mrs_01_1451__p105252193312"><a name="mrs_01_1451__li126584781917"></a><a name="li126584781917"></a><strong id="mrs_01_1451__b125254163311">LatLngToGeoId(latitude, longitude oriLatitude, gridSize)</strong></p>
|
|
<p id="mrs_01_1451__p145251812335">UDF input parameters</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table1040420118339" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row85257114331"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.2.3.1.4.1.1"><p id="mrs_01_1451__p1452581163318">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.2.3.1.4.1.2"><p id="mrs_01_1451__p7525616333">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.4.2.2.3.1.4.1.3"><p id="mrs_01_1451__p1352516119331">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row1152591193315"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.2.3.1.4.1.1 "><p id="mrs_01_1451__p195251193319">longitude</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.2.3.1.4.1.2 "><p id="mrs_01_1451__p1952501133312">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.2.3.1.4.1.3 "><p id="mrs_01_1451__p1525141153318">Longitude. Note: The value is an integer after conversion.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1451__row8525911336"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.2.3.1.4.1.1 "><p id="mrs_01_1451__p952517193318">latitude</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.2.3.1.4.1.2 "><p id="mrs_01_1451__p1352515133312">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.2.3.1.4.1.3 "><p id="mrs_01_1451__p152517153319">Latitude. Note: The value is an integer after conversion.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1451__row05251313332"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.2.3.1.4.1.1 "><p id="mrs_01_1451__p252531193318">oriLatitude</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.2.3.1.4.1.2 "><p id="mrs_01_1451__p10525181183311">Double</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.2.3.1.4.1.3 "><p id="mrs_01_1451__p15254113333">Origin latitude, required for calculating GeoID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1451__row10525121123314"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.2.3.1.4.1.1 "><p id="mrs_01_1451__p252511193314">gridSize</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.2.3.1.4.1.2 "><p id="mrs_01_1451__p19525181193319">Int</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.2.3.1.4.1.3 "><p id="mrs_01_1451__p205254114333">Grid size, required for calculating GeoID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p95252013333">UDF output parameter</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table1340812116331" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row125251813330"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.2.5.1.4.1.1"><p id="mrs_01_1451__p952517103315">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.2.5.1.4.1.2"><p id="mrs_01_1451__p7525181113317">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.4.2.2.5.1.4.1.3"><p id="mrs_01_1451__p1752551193318">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row115256193312"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.2.5.1.4.1.1 "><p id="mrs_01_1451__p752561153311">geoId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.2.5.1.4.1.2 "><p id="mrs_01_1451__p155255113318">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.2.5.1.4.1.3 "><p id="mrs_01_1451__p17525111193317">Returns a number that indicates the longitude and latitude after coding.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p152511153312">Example:</p>
|
|
<pre class="screen" id="mrs_01_1451__screen0661181714590">select longitude, latitude, mygeohash, LatLngToGeoId(latitude, longitude, 39.832277, 50) as geoId from geoTable;</pre>
|
|
</li><li id="mrs_01_1451__li1965194731911">Converting GeoID to longitude and latitude<p id="mrs_01_1451__p7525111143311"><a name="mrs_01_1451__li1965194731911"></a><a name="li1965194731911"></a><strong id="mrs_01_1451__b175258119336">GeoIdToLatLng(geoId, oriLatitude, gridSize)</strong></p>
|
|
<p id="mrs_01_1451__p352501133313">UDF input parameters</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table84101116335" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row5525181193318"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.3.3.1.4.1.1"><p id="mrs_01_1451__p175257183310">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.3.3.1.4.1.2"><p id="mrs_01_1451__p35253112332">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.4.2.3.3.1.4.1.3"><p id="mrs_01_1451__p252517123318">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row1052510119334"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.3.3.1.4.1.1 "><p id="mrs_01_1451__p13525611336">geoId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.3.3.1.4.1.2 "><p id="mrs_01_1451__p952519117337">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.3.3.1.4.1.3 "><p id="mrs_01_1451__p14525919337">Calculates the longitude and latitude based on GeoID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1451__row1052551193310"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.3.3.1.4.1.1 "><p id="mrs_01_1451__p105255112334">oriLatitude</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.3.3.1.4.1.2 "><p id="mrs_01_1451__p16525218335">Double</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.3.3.1.4.1.3 "><p id="mrs_01_1451__p1852519173314">Origin latitude, required for calculating the longitude and latitude.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1451__row1052591183317"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.3.3.1.4.1.1 "><p id="mrs_01_1451__p1952518153314">gridSize</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.3.3.1.4.1.2 "><p id="mrs_01_1451__p2525101193317">Int</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.3.3.1.4.1.3 "><p id="mrs_01_1451__p75256113317">Grid size, required for calculating the longitude and latitude.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="note" id="mrs_01_1451__note19981124119"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="mrs_01_1451__p35477281118">GeoID is generated based on the grid coordinates, which are the grid center. Therefore, the calculated longitude and latitude are the longitude and latitude of the grid center. There may be an error ranging from 0 degree to half of the grid size between the calculated longitude and latitude and the longitude and latitude of the generated GeoID.</p>
|
|
</div></div>
|
|
<p id="mrs_01_1451__p352501203316">UDF output parameter</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table14413818338" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row155253117336"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.3.6.1.4.1.1"><p id="mrs_01_1451__p1352541173310">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.3.6.1.4.1.2"><p id="mrs_01_1451__p25250193318">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.4.2.3.6.1.4.1.3"><p id="mrs_01_1451__p952512153317">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row352518163310"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.3.6.1.4.1.1 "><p id="mrs_01_1451__p15269153315">latitudeAndLongitude</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.3.6.1.4.1.2 "><p id="mrs_01_1451__p75261110331">Array[Double]</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.3.6.1.4.1.3 "><p id="mrs_01_1451__p18526141103311">Returns the longitude and latitude coordinates of the grid center that represent the GeoID in array. The first digit indicates the latitude, and the second digit indicates the longitude.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p4526191113313">Example:</p>
|
|
<pre class="screen" id="mrs_01_1451__screen08391112212">select longitude, latitude, mygeohash, GeoIdToLatLng(mygeohash, 39.832277, 50) as LatitudeAndLongitude from geoTable;</pre>
|
|
</li><li id="mrs_01_1451__li11651047191911">Calculating the upper-layer GeoID of the pyramid model<p id="mrs_01_1451__p1852681143320"><a name="mrs_01_1451__li11651047191911"></a><a name="li11651047191911"></a><strong id="mrs_01_1451__b3526114338">ToUpperLayerGeoId(geoId)</strong></p>
|
|
<p id="mrs_01_1451__p1952617163314">UDF input parameter</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table144151116333" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row7526715338"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.4.3.1.4.1.1"><p id="mrs_01_1451__p20526914334">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.4.3.1.4.1.2"><p id="mrs_01_1451__p16526518337">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.4.2.4.3.1.4.1.3"><p id="mrs_01_1451__p35267117337">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row2526101133310"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.4.3.1.4.1.1 "><p id="mrs_01_1451__p25261810331">geoId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.4.3.1.4.1.2 "><p id="mrs_01_1451__p105261410337">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.4.3.1.4.1.3 "><p id="mrs_01_1451__p652621183317">Calculates the upper-layer GeoID of the pyramid model based on the input GeoID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p15526121153312">UDF output parameter</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table1941717114331" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row1652612193315"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.4.5.1.4.1.1"><p id="mrs_01_1451__p95267123318">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.4.5.1.4.1.2"><p id="mrs_01_1451__p15526181163315">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.4.2.4.5.1.4.1.3"><p id="mrs_01_1451__p452613118336">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row452614113334"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.4.5.1.4.1.1 "><p id="mrs_01_1451__p17526131143318">geoId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.4.5.1.4.1.2 "><p id="mrs_01_1451__p4526121193310">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.4.5.1.4.1.3 "><p id="mrs_01_1451__p115261118330">Returns the upper-layer GeoID of the pyramid model.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p452618183312">Example:</p>
|
|
<pre class="screen" id="mrs_01_1451__screen1447218138317">select longitude, latitude, mygeohash, ToUpperLayerGeoId(mygeohash) as upperLayerGeoId from geoTable;</pre>
|
|
</li><li id="mrs_01_1451__li1465144701918">Obtaining the GeoID range list using the input polygon<p id="mrs_01_1451__p135261517338"><a name="mrs_01_1451__li1465144701918"></a><a name="li1465144701918"></a><strong id="mrs_01_1451__b8526515337">ToRangeList(polygon, oriLatitude, gridSize)</strong></p>
|
|
<p id="mrs_01_1451__p9526161143319">UDF input parameters</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table18420214338" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row185261019332"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.5.3.1.4.1.1"><p id="mrs_01_1451__p1752617183314">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.5.3.1.4.1.2"><p id="mrs_01_1451__p185261019337">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.4.2.5.3.1.4.1.3"><p id="mrs_01_1451__p185261616330">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row16526111183313"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.5.3.1.4.1.1 "><p id="mrs_01_1451__p11526111335">polygon</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.5.3.1.4.1.2 "><p id="mrs_01_1451__p952615183314">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.5.3.1.4.1.3 "><p id="mrs_01_1451__p19526121123313">Input polygon string, which is a pair of longitude and latitude.</p>
|
|
<p id="mrs_01_1451__p16526813335">Longitude and latitude are separated by a space. Each pair of longitude and latitude is separated by a comma (,). The longitude and latitude at the start and end must be the same.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1451__row652613112339"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.5.3.1.4.1.1 "><p id="mrs_01_1451__p135263133316">oriLatitude</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.5.3.1.4.1.2 "><p id="mrs_01_1451__p252613103316">Double</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.5.3.1.4.1.3 "><p id="mrs_01_1451__p1252611153312">Origin latitude, required for calculating GeoID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1451__row752613133315"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.5.3.1.4.1.1 "><p id="mrs_01_1451__p1452613113338">gridSize</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.5.3.1.4.1.2 "><p id="mrs_01_1451__p752610193311">Int</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.5.3.1.4.1.3 "><p id="mrs_01_1451__p7526151193318">Grid size, required for calculating GeoID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p1152691193318">UDF output parameter</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table6423817330" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row1752615143317"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.5.5.1.4.1.1"><p id="mrs_01_1451__p4526817338">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.5.5.1.4.1.2"><p id="mrs_01_1451__p1652617133311">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.4.2.5.5.1.4.1.3"><p id="mrs_01_1451__p55261517331">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row85268163318"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.5.5.1.4.1.1 "><p id="mrs_01_1451__p16526131143314">geoIdList</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.5.5.1.4.1.2 "><p id="mrs_01_1451__p9526141183315">Buffer[Array[Long]]</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.5.5.1.4.1.3 "><p id="mrs_01_1451__p35261143318">Converts polygons into GeoID range lists.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p1152616120339">Example:</p>
|
|
<pre class="screen" id="mrs_01_1451__screen179061843337">select ToRangeList('116.321011 40.123503, 116.137676 39.947911, 116.560993 39.935276, 116.321011 40.123503', 39.832277, 50) as rangeList from geoTable;</pre>
|
|
</li><li id="mrs_01_1451__li1665124781912">Calculating the upper-layer longitude of the pyramid model<p id="mrs_01_1451__p55263119331"><a name="mrs_01_1451__li1665124781912"></a><a name="li1665124781912"></a><strong id="mrs_01_1451__b852610115332">ToUpperLongitude (longitude, gridSize, oriLat)</strong></p>
|
|
<p id="mrs_01_1451__p1752661133314">UDF input parameters</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table7425614334" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row052611193312"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.6.3.1.4.1.1"><p id="mrs_01_1451__p85263123317">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.6.3.1.4.1.2"><p id="mrs_01_1451__p6526181113313">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.4.2.6.3.1.4.1.3"><p id="mrs_01_1451__p152619110332">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row105261510339"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.6.3.1.4.1.1 "><p id="mrs_01_1451__p45262116335">longitude</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.6.3.1.4.1.2 "><p id="mrs_01_1451__p9526112334">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.6.3.1.4.1.3 "><p id="mrs_01_1451__p105262143320">Input longitude, which is a long integer.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1451__row1526817330"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.6.3.1.4.1.1 "><p id="mrs_01_1451__p125268143315">gridSize</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.6.3.1.4.1.2 "><p id="mrs_01_1451__p5526171113310">Int</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.6.3.1.4.1.3 "><p id="mrs_01_1451__p452641133318">Grid size, required for calculating longitude.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1451__row1352614120331"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.6.3.1.4.1.1 "><p id="mrs_01_1451__p11526717335">oriLatitude</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.6.3.1.4.1.2 "><p id="mrs_01_1451__p352611183315">Double</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.6.3.1.4.1.3 "><p id="mrs_01_1451__p1752620110330">Origin latitude, required for calculating longitude.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p95264110339">UDF output parameter</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table24295113332" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row1652641193312"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.6.5.1.4.1.1"><p id="mrs_01_1451__p1152611163318">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.6.5.1.4.1.2"><p id="mrs_01_1451__p1752611123316">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.4.2.6.5.1.4.1.3"><p id="mrs_01_1451__p45262017336">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row12526112335"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.6.5.1.4.1.1 "><p id="mrs_01_1451__p552611115334">longitude</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.6.5.1.4.1.2 "><p id="mrs_01_1451__p16527171133315">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.6.5.1.4.1.3 "><p id="mrs_01_1451__p55271210330">Returns the upper-layer longitude.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p2527151133311">Example:</p>
|
|
<pre class="screen" id="mrs_01_1451__screen6181528643">select ToUpperLongitude (-23575161504L, 50, 39.832277) as upperLongitude from geoTable;</pre>
|
|
</li><li id="mrs_01_1451__li365164791915">Calculating the upper-layer latitude of the pyramid model<p id="mrs_01_1451__p175271915331"><a name="mrs_01_1451__li365164791915"></a><a name="li365164791915"></a><strong id="mrs_01_1451__b195273133316">ToUpperLatitude(Latitude, gridSize, oriLat)</strong></p>
|
|
<p id="mrs_01_1451__p94011632142719">UDF input parameters</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table9431151183319" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row1652714183312"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.7.3.1.4.1.1"><p id="mrs_01_1451__p185279113336">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.7.3.1.4.1.2"><p id="mrs_01_1451__p14527716334">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.4.2.7.3.1.4.1.3"><p id="mrs_01_1451__p1252731183313">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row1452719116332"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.7.3.1.4.1.1 "><p id="mrs_01_1451__p75271019334">latitude</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.7.3.1.4.1.2 "><p id="mrs_01_1451__p195278163318">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.7.3.1.4.1.3 "><p id="mrs_01_1451__p752721163319">Input latitude, which is a long integer.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1451__row125275119337"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.7.3.1.4.1.1 "><p id="mrs_01_1451__p752711173318">gridSize</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.7.3.1.4.1.2 "><p id="mrs_01_1451__p2052716117336">Int</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.7.3.1.4.1.3 "><p id="mrs_01_1451__p45279117334">Grid size, required for calculating latitude.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1451__row652711163310"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.7.3.1.4.1.1 "><p id="mrs_01_1451__p115274118336">oriLatitude</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.7.3.1.4.1.2 "><p id="mrs_01_1451__p05272133312">Double</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.7.3.1.4.1.3 "><p id="mrs_01_1451__p15527617335">Origin latitude, required for calculating latitude.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p95275193315">UDF output parameter</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table164345173315" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row1052731193319"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.7.5.1.4.1.1"><p id="mrs_01_1451__p852711183310">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.7.5.1.4.1.2"><p id="mrs_01_1451__p11527131183315">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.4.2.7.5.1.4.1.3"><p id="mrs_01_1451__p14527201203318">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row175272153317"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.7.5.1.4.1.1 "><p id="mrs_01_1451__p14527181143314">Latitude</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.7.5.1.4.1.2 "><p id="mrs_01_1451__p1527919338">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.7.5.1.4.1.3 "><p id="mrs_01_1451__p45277112332">Returns the upper-layer latitude.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p321075418242">Example:</p>
|
|
<pre class="screen" id="mrs_01_1451__screen8210135472410">select ToUpperLatitude (-23575161504L, 50, 39.832277) as upperLatitude from geoTable;</pre>
|
|
<p id="mrs_01_1451__p34011311154111"></p>
|
|
</li><li id="mrs_01_1451__li1577142255">Converting longitude and latitude to GeoSOT<p id="mrs_01_1451__p751374152510"><a name="mrs_01_1451__li1577142255"></a><a name="li1577142255"></a><strong id="mrs_01_1451__b175132419259">LatLngToGridCode(latitude, longitude, level)</strong></p>
|
|
<p id="mrs_01_1451__p05991837202715">UDF input parameters</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table11509952102510" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row6509195262517"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.8.3.1.4.1.1"><p id="mrs_01_1451__p350965219251">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="24.97%" id="mcps1.3.11.4.2.8.3.1.4.1.2"><p id="mrs_01_1451__p155092052102515">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50.029999999999994%" id="mcps1.3.11.4.2.8.3.1.4.1.3"><p id="mrs_01_1451__p55097529258">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row2510952162518"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.8.3.1.4.1.1 "><p id="mrs_01_1451__p95105525258">latitude</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.97%" headers="mcps1.3.11.4.2.8.3.1.4.1.2 "><p id="mrs_01_1451__p9510452202518">Double</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.029999999999994%" headers="mcps1.3.11.4.2.8.3.1.4.1.3 "><p id="mrs_01_1451__p1251005219258">Latitude.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1451__row65103523255"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.8.3.1.4.1.1 "><p id="mrs_01_1451__p951016523259">longitude</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.97%" headers="mcps1.3.11.4.2.8.3.1.4.1.2 "><p id="mrs_01_1451__p051025222516">Double</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.029999999999994%" headers="mcps1.3.11.4.2.8.3.1.4.1.3 "><p id="mrs_01_1451__p25108528255">Longitude.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1451__row851015292517"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.8.3.1.4.1.1 "><p id="mrs_01_1451__p8510052122512">level</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.97%" headers="mcps1.3.11.4.2.8.3.1.4.1.2 "><p id="mrs_01_1451__p4510155220255">Int</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.029999999999994%" headers="mcps1.3.11.4.2.8.3.1.4.1.3 "><p id="mrs_01_1451__p105101852122510">Level. The value range is [0, 32].</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p116151642172712">UDF output parameter</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1451__table629911502272" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1451__row1029915082713"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.8.5.1.4.1.1"><p id="mrs_01_1451__p192990504276">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.11.4.2.8.5.1.4.1.2"><p id="mrs_01_1451__p7299850192710">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.11.4.2.8.5.1.4.1.3"><p id="mrs_01_1451__p1029915018277">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1451__row152994504276"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.8.5.1.4.1.1 "><p id="mrs_01_1451__p82997503270">geoId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.11.4.2.8.5.1.4.1.2 "><p id="mrs_01_1451__p83003509274">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.11.4.2.8.5.1.4.1.3 "><p id="mrs_01_1451__p730065011275">A number that indicates the longitude and latitude after GeoSOT encoding.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1451__p7126131611283">Example:</p>
|
|
<pre class="screen" id="mrs_01_1451__screen166114217341">select LatLngToGridCode(39.930753, 116.302895, 21) as geoId;</pre>
|
|
</li></ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_1423.html">CarbonData Syntax Reference</a></div>
|
|
</div>
|
|
</div>
|
|
|