Home Database Mysql Tutorial 当ArcGIS10.2遇到Teradata

当ArcGIS10.2遇到Teradata

Jun 07, 2016 pm 03:48 PM
computer meet along with

随着计算机技术的不断发展,GIS技术也紧跟IT技术的热潮,从三维技术、到移动技术,从大数据技术到云计算技术,只要IT有的新技术,Esri都会一直紧跟最新的技术潮流。 那么Teradata作为数据仓库的主要实践者,被广大用户所应用而且有很好的口碑。 Teradata数据

                                                   当ArcGIS10.2遇到Teradata                               当ArcGIS10.2遇到Teradata

随着计算机技术的不断发展,GIS技术也紧跟IT技术的热潮,从三维技术、到移动技术,从大数据技术到云计算技术,只要IT有的新技术,Esri都会一直紧跟最新的技术潮流。

那么Teradata作为数据仓库的主要实践者,被广大用户所应用而且有很好的口碑。

Teradata数据仓库介绍

Teradata数据仓库拥有全球领先的技术,其主要软件和硬件产品包括:Teradata数据库、Teradata数据仓库软件、企业数据仓库、动态企业数据仓库、数据仓库专用平台。
Teradata数据仓库配备性能最高、最可靠的大规模并行处理 (MPP) 平台,能够高速处理海量数据。它使得企业可以专注于业务,无需花费大量精力管理技术,因而可以更加快速地做出明智的决策,实现 ROI 最大化。Teradata在整体上是按Shared Nothing 架构体系进行组织的,他的定位就是大型数据仓库系统,定位比较高,他的软硬件都是NCR自己的,其他的都不识别;所以一般的企业用不起,价格很贵。由于Teradata通常被用于OLAP应用,因此单机的Teradata系统很少见,即使是单机系统,Teradata也建议使用SMP结构以尽可能地提供更好的数据库性能.

典型案例:上海证券交易所的数据仓库就是teradata,每秒的io能达到2G,有1000多块磁盘,硬件昂贵。全表扫描一个几千万条的记录在几秒就完成了

Teradata对空间数据的支持

Teradata 在 Release 13.0 的版本中增加了空间扩展包,为TD数据库提供了管理和操作空间数据的能力[1]。

从总体上看,Teradata GeoSpatial 扩展包括 

1)一系列的空间数据类型:Point, Line, Polygon等空间数据类型;

2)数据类型使用UDT加以实现,存储在 Teradata 的 SYSUDLIB 中;

3)数据类型操作函数使用了开源空间库 Geos, Proj, GDdal/Ogr;

4)SYSSPATIAL 存储所有的元数据表和空间函数;

5)TDGEOINPORT 工具支持从常见空间数据格式数据(Shape, TAB…)到 TD 数据库的数据加载。

此外,目前的 TD 空间数据支持部分的 GIS 数据可视化工具的直接可视化操作。

当ArcGIS10.2遇到Teradata


1)数据加载:空间数据可以使用现有TD的ETL加载工具(如 MultiLoad)进行加载,其支持WKB和WKT格式的空间数据。除此之外,TD还可以通过TDGEOIMPORT加载常见空间数据格式的文件,比如ESRI的Shape文件。
2)函数:用户SYSSPATIAL包含了一系列的函数集,存储过程和数据表,用于空间数据的处理。
3)数据类型:数据库SYSUDTLIB包含了所有的空间数据类型的定义。数据类型定义包含了空间数据类型的结构以及可以对其进行操作的运算函数。
4)查询语言:用户可以使用SQL以及Teradata客户端API和查询工具,通过标准的SQL接口访问空间数据类型。


2. 数据类型与操作

数据类型方面,Teradata Spatial 兼容 SQL/MM 标准。

当ArcGIS10.2遇到Teradata

SQL/MM Geometry Hierarchy

3. 空间元数据

SYSSPATIAL 数据库实际存在两种类型的空间元数据。SYSSPATIAL.GEOMETRY_COLUMNS 表存储了所有包含空间列的数 据表的信息。该表使用 AddGeometryColumn 和 DropGeometryColumn 存储过程进行维护。 SYSSPATIAL.SPATIAL_REF_SYS 存储空间参考相关的信息。该表在安装时进行初始化,存储在该表中的SRS信息将会被 ST_TRANSFORM 使用。

4. 数据构造与上载

空间数据可以使用任何数据上载工具或者客户端 API 加载到数据库中。空间数据构造时支持WKB和WKT形式的构造方法。TDGEOIMPORT 是一个 windows 的客户端工具,其可以将空间数据格式转换为Teradata加载工具兼容的格式。

5. 空间索引

支持 Tessellate Index,本质上是多级网格索引,需要用户输入和调整网格划分的参数,不支持R-tree Index。

1.5 版本的 Teradata GeoSpatial Release的空间扩展从功能和实现的角度相对于PostGIS和Oracle Spatial之类的空间扩展来说,从功能上还相对有限。内核中的针对空间数据优化器路径选择的改进,MPP环境下空间连接的处理,空间算子的执行等内容还没有在该版本中涉及,也希望今后的TD Spatial Release版本能有更多的改进与增强。在使用上,SYSSPATIAL数据库实际存在两种类型的空间元数据。SYSSPATIAL.GEOMETRY_COLUMNS表存储了所有包含空间列的数据表的信息。该表使用AddGeometryColumn和DropGeometryColumn存储过程进行维护。SYSSPATIAL.SPATIAL_REF_SYS存储空间参考相关的信息。该表在安装时进行初始化,存储在该表中的SRS信息将会被ST_TRANSFORM使用。


==================================================================================================

TeraData与ArcGIS10.2


关于数据仓库,最主要的三个产品包括Oracle的exdata,IBM的netezza,以及teradata,前两者都是以一体机的形式展现给客户,也就是硬件软件一块给用户,而后者根据我查看到的资料还有自己的实践好像可以不需要绑定硬件(因为我在官网下载了相关的虚拟机,这个只是猜测),而且ArcGIS从10版本就支持了IBM的netezza,那么本文主要是来看看Esri的ArcGIS是怎么与Teradata进行结合的。

首先了解一下,ArcGIS10.2对teradata的系统需求:http://resources.arcgis.com/en/help/system-requirements/10.2/index.html#//015100000090000000

从系统需求我们可以看到,ArcGIS10.2只支持Teradata14.0以上的版本,而且和其他数据库产品一样包括NoSQL、SQLite等只支持原生的存储以及ST_geometry存储,暂不支持Geodatabase,而且也不支持要素服务。


系统环境

  • ArcGIS10.2
  • Teradata服务器端
  • Teradata ICU library
  • Teradata GSS client package
  • Teradata ODBC driver

关于Teradata的相关下载地址:

  • Teradata服务器:http://downloads.teradata.com/download/database/teradata-express/vmware
  • For Windows, see http://downloads.teradata.com/download/connectivity/odbc-driver/windows 
  • For Linux, see http://downloads.teradata.com/download/connectivity/odbc-driver/linux 

说明:

关于ICU、GSS、ODBC,需要根据客户端的位数来进行相关下载,如果使用ArcGIS for Desktop10.2(32Bit)应该下载32Bit的程序包,如果使用ArcGIS for Server 10.2(64Bit )应该下载64Bit的程序包。


Teradata服务器可以下载VM虚拟机(Suse操作系统,Teradata已经安装好了,默认用户root/root),关于更多详细可以参考如下文档:



环境配置

因为我的测试环境是Windows+ArcGIS for Desktop10.2+Teradata,所以我下载的是Windows的Teradata包

下载完毕后,的安装顺序:

1:在ArcGIS客户端机器安装 Teradata ICU library 和 GSS client 
2:然后安装 Teradata ODBC driver 
配置ODBC 驱动(注意:下载32Bit包需要配置32Bit的ODBC)

  • On Windows operating systems, change the following settings in the set the Teradata ODBC Driver Options dialog box:
  • Set the session mode to Teradata.
  • Select the option to Use Native Large Object Support.
  • On Linux operating systems, set the following parameters in the odbc.ini file:
  • SessionMode=Teradata
  • UseNativeLOBSupport=Yes

关于ArcGIS Server的配置参考:http://resources.arcgis.com/en/help/main/10.2/index.html#/Set_up_a_connection_to_Teradata/019v0000001s000000/

当ArcGIS10.2遇到Teradata

打开32Bit的ODBC,添加teradata驱动


当ArcGIS10.2遇到Teradata

输入DataSource名称,默认:teradata,相关IP输入虚拟机的Teradata服务器的IP,Username和password,输入dbc,点击Options按钮

当ArcGIS10.2遇到Teradata

设置Session Mode和勾选Use Native Large Object Support


设置完毕上面的信息之后,我们就可以使用ArcGIS for Desktop10.2来连接teradata了,设置连接参数

当ArcGIS10.2遇到Teradata


Data Source输入上面我们默认填写的teradata,用户名密码可以输入默认的dbc/dbc(如果上面odbc输入了用户名和密码,可以使用操作系统模式,这个dbc可以类比Oracle的sys/system等)

双击连接可以看到已经连接上了

当ArcGIS10.2遇到Teradata




================================================================

ArcGIS10.2操作Teradata


下面我们就使用ArcGIS for Desktop 10.2来创建或者导入数据到Teradata里面

1:首先,我在Teradata数据里面连接超级用户dbc,创建一个sde用户,永久表空间为200mb,spool空间不能超过100mb

Create user sde as perm=200000000,spool=100000000,password=sde;
Copy after login

关于更多Teradata的基本操作可以参考:http://oracleabc-126-com.iteye.com/blog/1195986


2:然后配置连接界面

当ArcGIS10.2遇到Teradata


3:创建要素类,可以看到使用了Native存储SYSUDTLIB.ST_Geometry存储

当ArcGIS10.2遇到Teradata


关于Teradata的用户

dbc: 安装后包含所有可用空间,跟oracle中的sys用户权限一样。所以不用于日常管理使用。
Sys_Calendar:存储系统日历表和视图。
SysAdmin:包含一些系统表以及网络连接客户端下FastLoad重启所需的表。
SystemFE:用于产生诊断报告供原厂工程师使用,默认密码为service。
Crashdumps:存储PDE dump,空间从dbc分配。推荐至少可容纳三个crashdump。
PUBLIC, EXTUSER, TDPUSER:PUBLIC, EXTUSER被系统软件使用,TDPUSER支持两阶段提交。
Default,All:系统软件使用。
SYSLIB,SYSUDTLIB:SYSLIB用于存储UDF,SYSUDTLIB用于存储UDDT。
Copy after login

4:执行过程中报错

当ArcGIS10.2遇到Teradata

提示没有相关权限。

关于ArcGIS与Teradata的权限问题,我们查看相关帮助:http://resources.arcgis.com/en/help/main/10.2/index.html#/User_privileges_for_using_ArcGIS_with_Teradata/019v0000001v000000/

当ArcGIS10.2遇到Teradata

所以说,我们需要对sde用户赋予上面的权限即可,具体操作过程如下

1:bteq(相当于Oracle的sqlplus)

2:.logon 127.0.0.1/dbc(连接本地服务器的dbc用户)

3:输入dbc密码

------------------------------------

上面的步骤就相当于在Oracle里面sqlplus sys / as sysdba

TDExpress14.0_Sles10:~ # bteq

 Teradata BTEQ 14.00.00.02 for LINUX. Enter your logon or BTEQ command:
.logon 127.0.0.1/dbc

.logon 127.0.0.1/dbc
Password:


 *** Logon successfully completed.
 *** Teradata Database Release is 14.00.00.01
 *** Teradata Database Version is 14.00.00.01
 *** Transaction Semantics are BTET.
 *** Session Character Set Name is 'ASCII'.

 *** Total elapsed time was 1 second.


 BTEQ -- Enter your SQL request or BTEQ command:
grant select on sysspatial.spatial_ref_sys to sde with grant option;

grant select on sysspatial.spatial_ref_sys to sde with grant option;

 *** Grant accepted.
 *** Total elapsed time was 1 second.


 BTEQ -- Enter your SQL request or BTEQ command:
grant select on sysspatial.geometry_columns to sde with grant option;

grant select on sysspatial.geometry_columns to sde with grant option;

 *** Grant accepted.
 *** Total elapsed time was 1 second.


 BTEQ -- Enter your SQL request or BTEQ command:
grant select on dbc.tvm to sde with grant option;

grant select on dbc.tvm to sde with grant option;

 *** Grant accepted.
 *** Total elapsed time was 1 second.


 BTEQ -- Enter your SQL request or BTEQ command:
grant udtusage on sysudtlib to sde with grant option;

grant udtusage on sysudtlib to sde with grant option;

 *** Grant accepted.
 *** Total elapsed time was 1 second.


 BTEQ -- Enter your SQL request or BTEQ command:
grant insert on sysspatial.spatial_ref_sys to sde with grant option;

grant insert on sysspatial.spatial_ref_sys to sde with grant option;

 *** Grant accepted.
 *** Total elapsed time was 1 second.


 BTEQ -- Enter your SQL request or BTEQ command:
grant update on sysspatial.geometry_columns to sde with grant option;

grant update on sysspatial.geometry_columns to sde with grant option;

 *** Grant accepted.
 *** Total elapsed time was 1 second.


 BTEQ -- Enter your SQL request or BTEQ command:
grant execute function on sysspatial to sde with grant option;

grant execute function on sysspatial to sde with grant option;

 *** Grant accepted.
 *** Total elapsed time was 1 second.


 BTEQ -- Enter your SQL request or BTEQ command:
grant execute procedure on sysspatial to sde with grant option;

grant execute procedure on sysspatial to sde with grant option;

 *** Grant accepted.
 *** Total elapsed time was 1 second.
Copy after login

5:重新导入数据即可

Executing: FeatureClassToFeatureClass "C:\Program Files\ArcGIS\Desktop10.2\ArcGlobeData\continent.shp" "Database Connections\Connection to teradata.sde" con # "CONTINENT "CONTINENT" true true false 13 Text 0 0 ,First,#,C:\Program Files\ArcGIS\Desktop10.2\ArcGlobeData\continent.shp,CONTINENT,-1,-1" #
Start Time: Mon Jul 15 15:34:48 2013
Succeeded at Mon Jul 15 15:39:49 2013 (Elapsed Time: 5 minutes 1 seconds)
Copy after login
当ArcGIS10.2遇到Teradata

当ArcGIS使用Teradata对空间数据进行存储,空间数据的空间字段必须为Shape或者在视图的别名为Shape,实际上Teradata的ST_geometry的底层存储为CLOB。

用户必须使用Teradata提供的tessellation(镶嵌)函数对Teradata的ST_geometry列进行创建和维护空间索引信息。这个tessellation空间索引主要被用于预定义的空间范围区域,而且它不能被ArcGIS的空间操作所使用(放大、缩小、漫游类似这种动态输入),但是tessellation索引可以应用于querylayer.

用户使用teradata的ST_geometry只支持二维数据,不支持保护M、Z的数据。

使用ArcGIS将要素类导入到Teradata数据库中,如果要素类的空间投影信息没有存储在teradata的系统表里面,ArcGIS会在Teradata的spatial_ref_sys表和geometry_columns表里面增加相关记录,但是如果更新Teradata的版本,会将这些表删除掉,重新创建然后恢复默认值,所以新增加的投影记录就需要重新输入。

那么在升级teradata之前,需要对这两个表进行备份
具体操作信息:

http://resources.arcgis.com/en/help/main/10.2/index.html#/Teradata_and_ArcGIS/019v0000001t000000/ 


从上面的描述,我也做了相关测试,移动一下,等了很长时间,大家可以看到上面的空白处,左下角的Drawing...和右下角小地球可以证明,这也验证了Esri帮助上说明的,因为Teradata是数据仓库,并不建议用户在ArcMap上进行视图展现。而且上面所述ArcGIS操作并不适用空间索引。


====================================================================

使用Teradata客户端

其实用户也可以下载Teradata的客户端来更直观的去了解ArcGIS在Teradata的存储,VM虚拟机也自带了一个Teradata Studio Express。

http://downloads.teradata.com/download/tools/teradata-studio

其实还有更好用的Teradata SQL Assistant但是我没有下载到


安装之后,我们连接dbc用户查看

当ArcGIS10.2遇到Teradata


当ArcGIS10.2遇到Teradata


因为这些面包含的点比较多,所以就没有完全列出所有信息

select * from con;

 *** Query completed. 8 rows found. 3 columns returned.
 *** Total elapsed time was 3 seconds.

   OBJECTID Shape
----------- ---------------------------------------------------------------
          7 MULTIPOLYGON (((151.540252689999988 -24.04583359,151.54656982 -
          5 MULTIPOLYGON (((-39.66893005 -18.32560348,-39.65861511 -18.2786
          3 MULTIPOLYGON (((10.9794426 54.3805542,10.94645691 54.38451004,1
          1 MULTIPOLYGON (((57.2022171 25.99166107,57.23068237 25.98513222,
          8 MULTIPOLYGON (((163.766113280000013 -82.0816803,163.75585937 -8
          6 MULTIPOLYGON (((171.1852417 -44.9383316,171.197189329999986 -44
          4 MULTIPOLYGON (((0.69465101 5.77336502,0.68798602 5.7538538,0.78
          2 MULTIPOLYGON (((-61.69083405 56.54804993,-61.71340179 56.569091
Copy after login



当ArcGIS10.2遇到Teradata



以上就是对ArcGIS10.2与Teradata的简单研究,由于对Teradata这个产品第一次接触,很多命令都不是非常熟悉,以上并没有进行大数据量的分析,仅仅是初次结合的一种尝试。


参考文献:

[1]:http://blog.r-tree.net/


 -------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1664
14
PHP Tutorial
1269
29
C# Tutorial
1249
24
Remote Desktop cannot authenticate the remote computer's identity Remote Desktop cannot authenticate the remote computer's identity Feb 29, 2024 pm 12:30 PM

Windows Remote Desktop Service allows users to access computers remotely, which is very convenient for people who need to work remotely. However, problems can be encountered when users cannot connect to the remote computer or when Remote Desktop cannot authenticate the computer's identity. This may be caused by network connection issues or certificate verification failure. In this case, the user may need to check the network connection, ensure that the remote computer is online, and try to reconnect. Also, ensuring that the remote computer's authentication options are configured correctly is key to resolving the issue. Such problems with Windows Remote Desktop Services can usually be resolved by carefully checking and adjusting settings. Remote Desktop cannot verify the identity of the remote computer due to a time or date difference. Please make sure your calculations

2024 CSRankings National Computer Science Rankings Released! CMU dominates the list, MIT falls out of the top 5 2024 CSRankings National Computer Science Rankings Released! CMU dominates the list, MIT falls out of the top 5 Mar 25, 2024 pm 06:01 PM

The 2024CSRankings National Computer Science Major Rankings have just been released! This year, in the ranking of the best CS universities in the United States, Carnegie Mellon University (CMU) ranks among the best in the country and in the field of CS, while the University of Illinois at Urbana-Champaign (UIUC) has been ranked second for six consecutive years. Georgia Tech ranked third. Then, Stanford University, University of California at San Diego, University of Michigan, and University of Washington tied for fourth place in the world. It is worth noting that MIT's ranking fell and fell out of the top five. CSRankings is a global university ranking project in the field of computer science initiated by Professor Emery Berger of the School of Computer and Information Sciences at the University of Massachusetts Amherst. The ranking is based on objective

What is e in computer What is e in computer Aug 31, 2023 am 09:36 AM

The "e" of computer is the scientific notation symbol. The letter "e" is used as the exponent separator in scientific notation, which means "multiplied to the power of 10". In scientific notation, a number is usually written as M × 10^E, where M is a number between 1 and 10 and E represents the exponent.

Fix: Microsoft Teams error code 80090016 Your computer's Trusted Platform module has failed Fix: Microsoft Teams error code 80090016 Your computer's Trusted Platform module has failed Apr 19, 2023 pm 09:28 PM

<p>MSTeams is the trusted platform to communicate, chat or call with teammates and colleagues. Error code 80090016 on MSTeams and the message <strong>Your computer's Trusted Platform Module has failed</strong> may cause difficulty logging in. The app will not allow you to log in until the error code is resolved. If you encounter such messages while opening MS Teams or any other Microsoft application, then this article can guide you to resolve the issue. </p><h2&

What does computer cu mean? What does computer cu mean? Aug 15, 2023 am 09:58 AM

The meaning of cu in a computer depends on the context: 1. Control Unit, in the central processor of a computer, CU is the component responsible for coordinating and controlling the entire computing process; 2. Compute Unit, in a graphics processor or other accelerated processor, CU is the basic unit for processing parallel computing tasks.

Unable to open the Group Policy object on this computer Unable to open the Group Policy object on this computer Feb 07, 2024 pm 02:00 PM

Occasionally, the operating system may malfunction when using a computer. The problem I encountered today was that when accessing gpedit.msc, the system prompted that the Group Policy object could not be opened because the correct permissions may be lacking. The Group Policy object on this computer could not be opened. Solution: 1. When accessing gpedit.msc, the system prompts that the Group Policy object on this computer cannot be opened because of lack of permissions. Details: The system cannot locate the path specified. 2. After the user clicks the close button, the following error window pops up. 3. Check the log records immediately and combine the recorded information to find that the problem lies in the C:\Windows\System32\GroupPolicy\Machine\registry.pol file

What should I do if steam cannot connect to the remote computer? What should I do if steam cannot connect to the remote computer? Mar 01, 2023 pm 02:20 PM

Solution to the problem that steam cannot connect to the remote computer: 1. In the game platform, click the "steam" option in the upper left corner; 2. Open the menu and select the "Settings" option; 3. Select the "Remote Play" option; 4. Check Activate the "Remote Play" function and click the "OK" button.

Python script to log out of computer Python script to log out of computer Sep 05, 2023 am 08:37 AM

In today's digital age, automation plays a vital role in streamlining and simplifying various tasks. One of these tasks is to log off the computer, which is usually done manually by selecting the logout option from the operating system's user interface. But what if we could automate this process using a Python script? In this blog post, we'll explore how to create a Python script that can log off your computer with just a few lines of code. In this article, we'll walk through the step-by-step process of creating a Python script for logging out of your computer. We'll cover the necessary prerequisites, discuss different ways to log out programmatically, and provide a step-by-step guide to writing the script. Additionally, we will address platform-specific considerations and highlight best practices

See all articles