快上网专注成都网站设计 成都网站制作 成都网站建设
成都网站建设公司服务热线:028-86922220

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

你会在Hive中使用GISfunction么?-创新互联

应用场景

目前,Hive表中存在需要把经纬度转化为距离,和一些其他相关的计算函数,但是在hive中并没有集成这些函数。当然我们可以自定义UDF函数,但是现在提供一个更加简单的方法,通过源码编译的方式,集成GIS函数。

创新互联公司专注为客户提供全方位的互联网综合服务,包含不限于网站设计、成都做网站、陵城网络推广、微信小程序定制开发、陵城网络营销、陵城企业策划、陵城品牌公关、搜索引擎seo、人物专访、企业宣传片、企业代运营等,从售前售中售后,我们都将竭诚为您服务,您的肯定,是我们大的嘉奖;创新互联公司为所有大学生创业者提供陵城建站搭建服务,24小时服务热线:13518219792,官方网址:www.cdcxhl.com

环境


      hadoop-2.7
      
        2.7.3
      


 
      hive-1.2
      
        1.2.1
      
 

1.8
1.8
2.7.3
1.2.1

下载源码:

源码地址
在github上下载源码在本地idea进行编译,修改最外层的pom.xml,修改hadoop、hive、java版本为生产环境中版本

  • idea中添加项目

你会在Hive中使用GIS function么?

  • 打包
    你会在Hive中使用GIS function么?
    打包后会出现如下两个jar包:

然后下载最新的esri-geometry-java中的esri-geometry-api-2.2.1.jar,上传三个jar到linux系统(jar权限设置成最高),在hive的shell控制台输入添加jar和创建函数语句。

spatial-sdk-json-2.1.1-SNAPSHOT.jar
spatial-sdk-hive-2.1.1-SNAPSHOT.jar

然后下载最新的esri-geometry-java中的esri-geometry-api-2.2.1.jar,上传三个jar到linux系统(jar权限设置成最高),在hive的shell控制台输入添加jar和创建函数语句。

创建函数

如果jar包在本地则创建临时函数,只在当前session有效,我们可以把jar包上传到HDFS上创建永久函数。

add jar  /iDatalight/jars/esri-geometry-api-2.2.1.jar;
add jar  /iDatalight/jars/spatial-sdk-json-2.1.0.jar;
add jar  /iDatalight/jars/spatial-sdk-hive-2.1.0.jar;

自定义函数使用可以参考官方文档UDF文档,创建自定义函数可以参考spatial-framework-for-hadoop项目的hive下function-ddl.sql,但创建永久函数需要去掉temporary。

CREATE FUNCTION STPoint as 'com.esri.hadoop.hive.ST_Point' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';

create function ST_AsBinary as 'com.esri.hadoop.hive.ST_AsBinary' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_AsGeoJSON as 'com.esri.hadoop.hive.ST_AsGeoJson' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_AsJSON as 'com.esri.hadoop.hive.ST_AsJson' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_AsShape as 'com.esri.hadoop.hive.ST_AsShape' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_AsText as 'com.esri.hadoop.hive.ST_AsText' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_GeomFromJSON as 'com.esri.hadoop.hive.ST_GeomFromJson' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_GeomFromGeoJSON as 'com.esri.hadoop.hive.ST_GeomFromGeoJson' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_GeomFromShape as 'com.esri.hadoop.hive.ST_GeomFromShape' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_GeomFromText as 'com.esri.hadoop.hive.ST_GeomFromText' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_GeomFromWKB as 'com.esri.hadoop.hive.ST_GeomFromWKB' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_PointFromWKB as 'com.esri.hadoop.hive.ST_PointFromWKB' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_LineFromWKB as 'com.esri.hadoop.hive.ST_LineFromWKB' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_PolyFromWKB as 'com.esri.hadoop.hive.ST_PolyFromWKB' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_MPointFromWKB as 'com.esri.hadoop.hive.ST_MPointFromWKB' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_MLineFromWKB as 'com.esri.hadoop.hive.ST_MLineFromWKB' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_MPolyFromWKB as 'com.esri.hadoop.hive.ST_MPolyFromWKB' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_GeomCollection as 'com.esri.hadoop.hive.ST_GeomCollection' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';

create function ST_GeometryType as 'com.esri.hadoop.hive.ST_GeometryType' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_LineString as 'com.esri.hadoop.hive.ST_LineString' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_Polygon as 'com.esri.hadoop.hive.ST_Polygon' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_MultiPoint as 'com.esri.hadoop.hive.ST_MultiPoint' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_MultiLineString as 'com.esri.hadoop.hive.ST_MultiLineString' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_MultiPolygon as 'com.esri.hadoop.hive.ST_MultiPolygon' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_SetSRID as 'com.esri.hadoop.hive.ST_SetSRID' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_SRID as 'com.esri.hadoop.hive.ST_SRID' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_IsEmpty as 'com.esri.hadoop.hive.ST_IsEmpty' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_IsSimple as 'com.esri.hadoop.hive.ST_IsSimple' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_Dimension as 'com.esri.hadoop.hive.ST_Dimension' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_X as 'com.esri.hadoop.hive.ST_X' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_Y as 'com.esri.hadoop.hive.ST_Y' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_MinX as 'com.esri.hadoop.hive.ST_MinX' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_MaxX as 'com.esri.hadoop.hive.ST_MaxX' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_MinY as 'com.esri.hadoop.hive.ST_MinY' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_MaxY as 'com.esri.hadoop.hive.ST_MaxY' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_IsClosed as 'com.esri.hadoop.hive.ST_IsClosed' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_IsRing as 'com.esri.hadoop.hive.ST_IsRing' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_Length as 'com.esri.hadoop.hive.ST_Length' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_GeodesicLengthWGS84 as 'com.esri.hadoop.hive.ST_GeodesicLengthWGS84' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_Area as 'com.esri.hadoop.hive.ST_Area' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_Is3D as 'com.esri.hadoop.hive.ST_Is3D' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_Z as 'com.esri.hadoop.hive.ST_Z' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_MinZ as 'com.esri.hadoop.hive.ST_MinZ' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_MaxZ as 'com.esri.hadoop.hive.ST_MaxZ' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_IsMeasured as 'com.esri.hadoop.hive.ST_IsMeasured' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_M as 'com.esri.hadoop.hive.ST_M' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_MinM as 'com.esri.hadoop.hive.ST_MinM' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_MaxM as 'com.esri.hadoop.hive.ST_MaxM' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_CoordDim as 'com.esri.hadoop.hive.ST_CoordDim' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_NumPoints as 'com.esri.hadoop.hive.ST_NumPoints' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_PointN as 'com.esri.hadoop.hive.ST_PointN' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_StartPoint as 'com.esri.hadoop.hive.ST_StartPoint' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_EndPoint as 'com.esri.hadoop.hive.ST_EndPoint' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_ExteriorRing as 'com.esri.hadoop.hive.ST_ExteriorRing' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_NumInteriorRing as 'com.esri.hadoop.hive.ST_NumInteriorRing' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_InteriorRingN as 'com.esri.hadoop.hive.ST_InteriorRingN' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_NumGeometries as 'com.esri.hadoop.hive.ST_NumGeometries' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_GeometryN as 'com.esri.hadoop.hive.ST_GeometryN' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create function ST_Centroid as 'com.esri.hadoop.hive.ST_Centroid' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';

create  function ST_Contains as 'com.esri.hadoop.hive.ST_Contains' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create  function ST_Crosses as 'com.esri.hadoop.hive.ST_Crosses' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create  function ST_Disjoint as 'com.esri.hadoop.hive.ST_Disjoint' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create  function ST_EnvIntersects as 'com.esri.hadoop.hive.ST_EnvIntersects' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create  function ST_Envelope as 'com.esri.hadoop.hive.ST_Envelope' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create  function ST_Equals as 'com.esri.hadoop.hive.ST_Equals' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create  function ST_Overlaps as 'com.esri.hadoop.hive.ST_Overlaps' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create  function ST_Intersects as 'com.esri.hadoop.hive.ST_Intersects' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create  function ST_Relate as 'com.esri.hadoop.hive.ST_Relate' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create  function ST_Touches as 'com.esri.hadoop.hive.ST_Touches' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create  function ST_Within as 'com.esri.hadoop.hive.ST_Within' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';

create  function ST_Distance as 'com.esri.hadoop.hive.ST_Distance' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create  function ST_Boundary as 'com.esri.hadoop.hive.ST_Boundary' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create  function ST_Buffer as 'com.esri.hadoop.hive.ST_Buffer' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create  function ST_ConvexHull as 'com.esri.hadoop.hive.ST_ConvexHull' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create  function ST_Intersection as 'com.esri.hadoop.hive.ST_Intersection' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create  function ST_Union as 'com.esri.hadoop.hive.ST_Union' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create  function ST_Difference as 'com.esri.hadoop.hive.ST_Difference' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create  function ST_SymmetricDiff as 'com.esri.hadoop.hive.ST_SymmetricDiff' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create  function ST_SymDifference as 'com.esri.hadoop.hive.ST_SymmetricDiff' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';

create  function ST_Aggr_ConvexHull as 'com.esri.hadoop.hive.ST_Aggr_ConvexHull' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create  function ST_Aggr_Intersection as 'com.esri.hadoop.hive.ST_Aggr_Intersection' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';
create  function ST_Aggr_Union as 'com.esri.hadoop.hive.ST_Aggr_Union' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';

create  function ST_Bin as 'com.esri.hadoop.hive.ST_Bin' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';

create  function ST_BinEnvelope as 'com.esri.hadoop.hive.ST_BinEnvelope' using jar 'hdfs:///iDatalight/jars/esri-geometry-api-2.2.2.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-hive-2.1.1.jar',jar 'hdfs:///iDatalight/jars/spatial-sdk-json-2.1.1.jar';

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


本文题目:你会在Hive中使用GISfunction么?-创新互联
网页网址:http://6mz.cn/article/degpjg.html

其他资讯