18.04.2015 Views

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

BUILDING A COMMAND-LINE JAVA APPLICATION<br />

Rather than walk through this scenario, you can<br />

get the completed application from the samples<br />

installation location. The sample is installed as<br />

part of the <strong>ArcGIS</strong> developer samples.<br />

The <strong>ArcGIS</strong> developer samples are not included<br />

in the typical installation of the <strong>ArcGIS</strong> <strong>Engine</strong><br />

<strong>Developer</strong> Kit. If you do not have them installed,<br />

rerun the <strong>Developer</strong> Kit Install wizard, click<br />

Custom or Modify, and click the samples feature<br />

under Software <strong>Developer</strong> Kit.<br />

This walkthrough is intended for programmers who want to learn more about the<br />

Java API in <strong>ArcGIS</strong> <strong>Engine</strong>. To get the most out of this scenario you should<br />

understand basic Java programming concepts such as classes, inheritance, and<br />

using packages. Some familiarity with ArcObjects will also be helpful, although<br />

not required. Although this scenario does require conceptual knowledge of the<br />

Java language, it does not require a lot of programming experience. The code<br />

used in this example provides an easy entry point to learn about the Java API in<br />

<strong>ArcGIS</strong> <strong>Engine</strong> on a small and simple scale.<br />

You can find this sample in:<br />

\developerkit\samples\<strong>Developer</strong>_<strong>Guide</strong>_Scenarios\<br />

Converting_A_Tin_To_Point_ShapefileJava.zip<br />

PROJECT DESCRIPTION<br />

This scenario will cover several aspects of the <strong>ArcGIS</strong> <strong>Engine</strong> API. The goal of<br />

this exercise is to create a standalone command-line application with the <strong>ArcGIS</strong><br />

<strong>Engine</strong> Java API. The application will take as input a TIN representation of a<br />

surface and create a three-dimensional shapefile representing the interpolated TIN<br />

nodes. Once you have completed this scenario, you will understand the techniques<br />

required to work with the <strong>ArcGIS</strong> <strong>Engine</strong> Java API.<br />

CONCEPTS<br />

Terrain data is collected mostly as a sequence of discrete (x, y, z) data points.<br />

Digital terrain models (DTM) are generally organized such that mass points lie in<br />

a grid pattern or they represent nodes of triangles in an array referred to as a<br />

triangulated irregular network, or TIN. The nodes will be converted to points and<br />

used to create a new feature class. This exercise will use the TIN object and the<br />

ITinAdvanced interface it implements. ITinAdvanced provides access to basic properties<br />

and is a starting point to the underlying data structure. In addition, the<br />

scenario utilizes the GeometryDef and FieldsEdit classes to populate the newly<br />

created feature class.<br />

The Java API is not included in the typical<br />

installation of the <strong>ArcGIS</strong> <strong>Engine</strong> <strong>Developer</strong> Kit. If<br />

you do not have it installed, rerun the <strong>Developer</strong><br />

Kit Install wizard, click Custom or Modify, and<br />

select the Java feature under <strong>ArcGIS</strong> <strong>Engine</strong>. In<br />

addition, for access to the Javadoc and other Javaspecific<br />

documentation, select the Java feature<br />

under Software <strong>Developer</strong> Kit.<br />

DESIGN<br />

The application will be written entirely in the Java language. This allows you to<br />

write code once on any platform and deploy the application on any supported<br />

<strong>ArcGIS</strong> <strong>Engine</strong> platform. This scenario will use Microsoft Windows XP as the<br />

developer platform but can easily be followed on any UNIX-based developer<br />

platforms.<br />

Ant, a cross-platform Java-based build tool, will be used to build and deploy the<br />

scenario. Ant executes tasks implemented as Java classes, which allow it to inherit<br />

the platform independence of Java. <strong>ArcGIS</strong> <strong>Engine</strong> <strong>Developer</strong> Kit includes an<br />

extended version of Ant called arcgisant. This scenario will use arcgisant, but you<br />

are free to use any version of Ant 1.5.x or greater.<br />

REQUIREMENTS<br />

To successfully follow this scenario you need the following (the requirements for<br />

deployment are covered later in the ‘Deployment’ section):<br />

• An installation of the <strong>ArcGIS</strong> <strong>Engine</strong> <strong>Developer</strong> Kit (including Java) with an<br />

authorization file enabling it for development use.<br />

Chapter 6 • <strong>Developer</strong> scenarios • 409

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!