com.esri.arcgis.geodatabaseextensions
Class TerrainAsciiDataImporter

java.lang.Object
  extended by com.esri.arcgis.geodatabaseextensions.TerrainAsciiDataImporter
All Implemented Interfaces:
ITerrainAsciiDataImporter, ITerrainAsciiDataImporter2, ITerrainDataImporter, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class TerrainAsciiDataImporter
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, ITerrainDataImporter, ITerrainAsciiDataImporter, ITerrainAsciiDataImporter2

Esri Terrain ASCII Data Importer object.

Description

The ITerrainAsciiDataImporter interface is inherited from ITerrainDataImporter and adds an ASCII file specific property.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also:
Serialized Form

Constructor Summary
TerrainAsciiDataImporter()
          Constructs a TerrainAsciiDataImporter using ArcGIS Engine.
TerrainAsciiDataImporter(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
TerrainAsciiDataImporter theTerrainAsciiDataImporter = (TerrainAsciiDataImporter) obj;
 
Method Summary
 void addFile(String fileName)
          Include a specific file to be loaded upon Import.
 void addFolder(String folderName, String fileExtension, boolean bRecursive)
          Include a folder, and potentially subfolders, to be loaded upon import.
 boolean equals(Object o)
          Compare this object with another
 void esri_import(IFeatureClass pOutputFeatureClass, double tileSize, double zFactor, IEnvelope pAOI, ITrackCancel pTrackCancel, int[] pcOutsidePoints)
          Loads the specified data, based on the current properties, into the target feature class.
static String getClsid()
          getClsid.
 IEnvelope getDataExtent(ISpatialReference pTargetSpatialReference)
          The XYZ extent of data contained in files/folders to be added.
 int getDecimalPointType()
          ASCII data decimal point type.
 int getFileFormat()
          The format of the data to be imported.
 int getMaxShapePointCount()
          The maximum number of points loaded into individual multipoint shapes.
 double getPointCount()
          The number of points in the files/folders to be added.
 int hashCode()
          the hashcode for this object
 void overwriteMaxShapePointCount(int newCount)
          Changes the default maximum number of points loaded into individual multipoint shapes.
 void setDecimalPointType(int pType)
          ASCII data decimal point type.
 void setEmpty()
          Clears all properties.
 void setFileFormat(int pFormat)
          The format of the data to be imported.
 void setSourceDataSpatialReference(ISpatialReference pSpatialRef)
          Set source data's spatial reference.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

TerrainAsciiDataImporter

public TerrainAsciiDataImporter()
                         throws IOException,
                                UnknownHostException
Constructs a TerrainAsciiDataImporter using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

TerrainAsciiDataImporter

public TerrainAsciiDataImporter(Object obj)
                         throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
TerrainAsciiDataImporter theTerrainAsciiDataImporter = (TerrainAsciiDataImporter) obj;

Construct a TerrainAsciiDataImporter using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to TerrainAsciiDataImporter.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

setSourceDataSpatialReference

public void setSourceDataSpatialReference(ISpatialReference pSpatialRef)
                                   throws IOException,
                                          AutomationException
Set source data's spatial reference.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setSourceDataSpatialReference in interface ITerrainDataImporter
Parameters:
pSpatialRef - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setEmpty

public void setEmpty()
              throws IOException,
                     AutomationException
Clears all properties.

Description

SetEmpty clears all the properties but keeps the object alive. Use this when needing to clear the file or folder lists of the importer while in a loop. Keep in the mind the other properties will also need to be reset. Nevertheless, this is less expensive than instantiating the object repeatedly.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setEmpty in interface ITerrainDataImporter
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMaxShapePointCount

public int getMaxShapePointCount()
                          throws IOException,
                                 AutomationException
The maximum number of points loaded into individual multipoint shapes.

Description

The importer writes out multipoint records. The MaxShapePointCount represents the largest number of points an individual multipoint record can contain. The default is 5000. Use OverwriteMaxShapePointCount to change this value.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getMaxShapePointCount in interface ITerrainDataImporter
Returns:
The pCount
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

overwriteMaxShapePointCount

public void overwriteMaxShapePointCount(int newCount)
                                 throws IOException,
                                        AutomationException
Changes the default maximum number of points loaded into individual multipoint shapes.

Description

This will reset the MaxShapePointCount in case you don't want to use the default of 5000.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
overwriteMaxShapePointCount in interface ITerrainDataImporter
Parameters:
newCount - The newCount (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addFile

public void addFile(String fileName)
             throws IOException,
                    AutomationException
Include a specific file to be loaded upon Import.

Description

The importer supports the input of one or more files at a time. Call AddFile, and repeat as necessary, to handle individual files. Provide the full path. Call SetEmpty to clear this list.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
addFile in interface ITerrainDataImporter
Parameters:
fileName - The fileName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addFolder

public void addFolder(String folderName,
                      String fileExtension,
                      boolean bRecursive)
               throws IOException,
                      AutomationException
Include a folder, and potentially subfolders, to be loaded upon import.

Description

The importer supports the input of one or more folders worth of files at a time. You can call AddFolder repeatedly. Call SetEmpty to clear this list.

fileExtension is the suffix of the file(s), excluding the dot ('.'). Only files with this suffix in the selected folder(s) will be read.

bRecursive is a boolean to indicate whether or not to recurse below the specified folders into their subfolders to look for more files.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
addFolder in interface ITerrainDataImporter
Parameters:
folderName - The folderName (in)
fileExtension - The fileExtension (in)
bRecursive - The bRecursive (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDataExtent

public IEnvelope getDataExtent(ISpatialReference pTargetSpatialReference)
                        throws IOException,
                               AutomationException
The XYZ extent of data contained in files/folders to be added.

Description

Returns the data extent of points in the files referenced by the importer. See AddFile and AddFolder.

LAS format LIDAR files contain the data extent in the header. From them, the extent can be extracted quickly. ASCII files, on the other hand, must be scanned to discover the extent. The time this will take is proportional to the amount of data to scan through.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getDataExtent in interface ITerrainDataImporter
Parameters:
pTargetSpatialReference - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPointCount

public double getPointCount()
                     throws IOException,
                            AutomationException
The number of points in the files/folders to be added.

Description

Returns the number of points in the files referenced by the importer. See AddFile and AddFolder.

For LAS data the desired return numbers and/or class codes, as set by ITerrainLasDataImporter, will be taken into consideration. You must include some returns via ITerrainLasDataImporter.AddReturnNumber. The LAS specification records the number of points by return in the header so getting counts by return will be fast. On the other hand, if class codes are specified (see ITerrainLasDataImporter.AddClassCodes) the files must be scanned to determine the count. The time this will take is proportional to the amount of data to scan through.

Introduced in LAS version 1.1 is a Witheld flag as a point property. GetPointCount does not take this flag into consideration when totaling points.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getPointCount in interface ITerrainDataImporter
Returns:
The pCount
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_import

public void esri_import(IFeatureClass pOutputFeatureClass,
                        double tileSize,
                        double zFactor,
                        IEnvelope pAOI,
                        ITrackCancel pTrackCancel,
                        int[] pcOutsidePoints)
                 throws IOException,
                        AutomationException
Loads the specified data, based on the current properties, into the target feature class.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
esri_import in interface ITerrainDataImporter
Parameters:
pOutputFeatureClass - A reference to a com.esri.arcgis.geodatabase.IFeatureClass (in)
tileSize - The tileSize (in)
zFactor - The zFactor (in)
pAOI - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
pTrackCancel - A reference to a com.esri.arcgis.system.ITrackCancel (in)
pcOutsidePoints - The pcOutsidePoints (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFileFormat

public void setFileFormat(int pFormat)
                   throws IOException,
                          AutomationException
The format of the data to be imported.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setFileFormat in interface ITerrainAsciiDataImporter
Parameters:
pFormat - A com.esri.arcgis.geodatabaseextensions.esriTerrainAsciiDataFormatType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFileFormat

public int getFileFormat()
                  throws IOException,
                         AutomationException
The format of the data to be imported.

Description

The supported file formats are esriTerrainAsciiDataFormatXYZ, esriTerrainAsciiDataFormatGenerate, and esriTerrainAsciiFormatXYZI.

If the format is XYZI the target feature class must have a BLOB type field named 'Intensity'. This will be used to hold the intensity values. The TerrainBlobReader can be used to interpret the values placed in the BLOBs. The Intensity field of the resulting feature class can also be included in a terrain dataset if the feature class were embedded. If the intensity values in the file are of no interest, and should be ignored, then specify the format as XYZ. In this case, the importer will not require the Intensity field and the intensity values in the file(s) will be skipped.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getFileFormat in interface ITerrainAsciiDataImporter
Returns:
A com.esri.arcgis.geodatabaseextensions.esriTerrainAsciiDataFormatType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDecimalPointType

public void setDecimalPointType(int pType)
                         throws IOException,
                                AutomationException
ASCII data decimal point type.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setDecimalPointType in interface ITerrainAsciiDataImporter2
Parameters:
pType - A com.esri.arcgis.geodatabaseextensions.esriTerrainDecimalSeparatorType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDecimalPointType

public int getDecimalPointType()
                        throws IOException,
                               AutomationException
ASCII data decimal point type.

Description

Specifies whether the symbol used to mark the boundary between the integer and the fractional parts of a decimal numeral is a point or a comma. The default is point.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getDecimalPointType in interface ITerrainAsciiDataImporter2
Returns:
A com.esri.arcgis.geodatabaseextensions.esriTerrainDecimalSeparatorType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.