Visualize DB2 Spatial Data

Source: Internet
Author: User
Tags db2 installation windows support

The following articles mainly describe how to learn how to visualize DB2 spatial data and set and use ArcExplorer on different platforms in actual operations. The space to be displayed can be stored in a geospatial DB2 database on Linux, UNIX, or Windows.

In addition, we also learned how to use the spatial support feature provided by Version 9 to access the spatial data stored on DB2 for z/OS.

Introduction

Almost every database contains space information. The address information is the most prominent representative. Other examples also include the street. in the database, the street can be expressed not only by its name, but also by its exact location on the earth. Linestring is a way to model those objects. The location of the branch and customer's place of residence can be described by points.

Similarly, the State and State boundary can be represented by a polygon. Non-geographic applications can also benefit from spatial data in relational databases. The positions of products on warehouses and shelves can be explicitly modeled for geographic information. The Calculation of spatial distance can help you best arrange the product location in the warehouse according to different standards.

DB2 for Linux, UNIX, and Windows support (starting from Version 7) using the DB2 Spatial Extender product to store, manage, and retrieve DB2 Spatial data in the database. This extender can be used like any other relational data (such as numbers and strings, use a dedicated data type to create models for geometric maps such as points, lines, and polygon and their original sets.

DB2 Spatial Extender not only provides data types, but also comes with many Spatial functions and methods used to perform Spatial operations. For example, you can determine the distance between two images and perform a space set operation, such as merging or crossover graphs, to obtain the length of a linestring.

The spatial support of DB2 for z/OS provides almost the same functions as the extensioner. Although there are some differences in internal implementation, the use of spatial types and functions is similar. The main difference is that spatial functions in DB2 for Linux, UNIX, and Windows can be called through method annotations (such as geometry .. ST_Buffer (10, 'meter ').. ST_AsText ()). DB2 for z/OS does not support structured types and methods (used to implement extenders), so the space on that platform supports only the function call syntax (for example, ST_AsText (ST_Buffer (geometry, 10, 'METER '))).

Although space computing and comparison are sufficient for many applications, it is helpful to visualize the data in the database. Table notation (used for traditional relational data) is not the most suitable method for making spatial information accessible. On the contrary, spatial data must be displayed as a map. There are many ways to extract ry and generate such a map.

Some commercial tools-Geographic Information Systems (GIS)-are used to display and modify spatial and non-spatial data. Other systems generate static images (such as JPEG or TIFF) based on a set of images to provide a simple interface. These images can be displayed in a Web browser.

ESRI ArcExplorer can be downloaded from the DB2 Spatial Extender Web site, which uses Java™. Therefore, it can be used on any platform containing the appropriate Java Virtual Machine (JVM. However, ArcExplorer comes with a Windows-specific installation routine. This hinders other platforms, such as Linux and AIX.®To deploy and use ArcExplorer.

The following section describes how to overcome this problem. This article sets up an ArcExplorer on a Linux system and accesses the spatial data stored in the DB2 database on the same system and in another database maintained on DB2 for z/OS.

This article first explains how to install, start, and set up ArcExplorer. Next, the requirements that need to be met before accessing the data stored in the database. Finally, this article provides some guidance on how to effectively use ArcExplorer. All content is explained based on the screen snapshots captured on the Linux system. However, the same steps apply to other systems.

Deploy ArcExplorer

ArcExplorer is a lightweight tool used to visualize DB2 spatial data. It consists of five. jar files. You can find these five files in the archive file in the download section. You may notice that installation on Windows is more complex than local installation on Windows. On Windows, you need to install a fully runable product, including Java Runtime Environment (JRE ).

Now, it can be concluded that Java has been installed on almost every system. Therefore, it can depend on the existing JRE and JVM. This helps reduce the size of the installed image to only 2.5 MB-the initial Windows installation size is about 100 MB. At the same time, ArcExplorer automatically benefited from updates to existing Java packages.

Similar to JVM, the installation directory of ArcExplorer does not require a copy of the db2java.zip file. This file is actually used for communication between ArcExplorer and DB2. Although README instructs you to copy the file from the DB2 installation directory, the simpler and better way is to directly copy the file from its original location (for example ~ /Sqllib/java/db2java.zip. You can use the file by referencing the location in the CLASSPATH environment variable.

In short, only aejava_help.jar, arcims_aej.jar, arcims_sdk.jar, sde_sql3.jar, and xml. jar files are required to run ESRI ArcExplorer. In addition, the downloading section also provides the shell script arcexplorer for setting classpath and simultaneously starting JVM and ArcExplorer.

The downloading section contains other files. The file aejava. ico is an image. If you want to start ArcExplorer through the menu, you can use it as an icon in the menu. The file LICENSE contains a LICENSE attached to ArcExplorer. You must follow this LICENSE. The Script host. SQL contains some SQL statements that establish a connection to a remote DB2 for z/OS sub-system using the Federation and access three remote tables that contain DB2 spatial data using nicknames. Finally, the file import. jcl is a JCL script that can be used to import spatial data from the shapefile to the DB2 for z/OS subsystem. Shell script import. sh does the same thing in DB2 for Linux, UNIX, and Windows.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.