com.esri.arcgis.geodatabaseextensions
Class TerrainLasDataImporter

java.lang.Object
  extended by com.esri.arcgis.geodatabaseextensions.TerrainLasDataImporter
All Implemented Interfaces:
ITerrainDataImporter, ITerrainLasDataImporter, ITerrainLasDataInfo, ITerrainLasDataInfo2, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class TerrainLasDataImporter
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, ITerrainDataImporter, ITerrainLasDataImporter, ITerrainLasDataInfo, ITerrainLasDataInfo2

ESRI Terrain LAS Data Importer object.

Description

The TerrainLasDataImporter is used to load LIDAR points from one or more LAS version 1.0 and 1.1 format files into a multipoint feature class.

Product Availability

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

See Also:
Serialized Form

Constructor Summary
TerrainLasDataImporter()
          Constructs a TerrainLasDataImporter using ArcGIS Engine.
TerrainLasDataImporter(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
TerrainLasDataImporter theTerrainLasDataImporter = (TerrainLasDataImporter) 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.
 void addProperty(int property, String fieldName)
          Used to indicate which, if any, LiDAR properties to retain and load into the target feature class in a BLOB field.
 void addReturnNumber(int returnNumber)
          Used to indicate which points to extract from the LAS files based on their LiDAR return number.
 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()
          The XYZ extent of points in the LAS file.
 IEnvelope getDataExtent(ISpatialReference pTargetSpatialReference)
          The XYZ extent of data contained in files/folders to be added.
 int getFileSourceID()
          The LAS file's source ID.
 int getFlightDateJulian()
          The flight date based on the Julian calendar.
 String getGeneratingSoftware()
          The software used to create the LAS file.
 int getMaxShapePointCount()
          The maximum number of points loaded into individual multipoint shapes.
 int getNumberOfPointRecords()
          The number of points in the LAS file.
 int getNumberOfPointsByReturn(int returnNumber)
          The number of points in the LAS file based on the specified LiDAR return number.
 double getPointCount()
          The number of points in the files/folders to be added.
 int getPointDataFormat()
          The record format for points in the LAS file
 void getPointInfoByClassCode(ITrackCancel pTrackCancel, ILongArray pCodes, IDoubleArray[] ppCounts, IArray[] ppExtents)
          Get the number of points corresponding to the specified class codes.
 ISpatialReference getSpatialReference()
          The spatial reference of the LAS file.
 String getSystemID()
          The hardware system used to collect the LiDAR data in the LAS file.
 void getVersion(int[] pMajor, int[] pMinor)
          The version of the LAS file.
 int getYear()
          The year the data in the LAS file was collected.
 int hashCode()
          the hashcode for this object
 void init(String lasFileName)
          Used to set the name of the LAS file for which information is to be retrieved.
 boolean isStandardGpsTime()
          Indicates if the GPS time is standard GPS Time.
 void overwriteMaxShapePointCount(int newCount)
          Changes the default maximum number of points loaded into individual multipoint shapes.
 void setClassCodes(ILongArray pCodes)
          Used to indicate which points to load based on one or more LAS classification codes.
 void setEmpty()
          Clears all properties.
 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

TerrainLasDataImporter

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

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

TerrainLasDataImporter

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

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

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.

addProperty

public void addProperty(int property,
                        String fieldName)
                 throws IOException,
                        AutomationException
Used to indicate which, if any, LiDAR properties to retain and load into the target feature class in a BLOB field.

Description

AddProperty is used to select which LIDAR attributes, if any, to import. The values will be stored in BLOBs in the output feature class. They can be retreived via the TerrainBlobReader. Call it repeatedly if more than one attribute is to be loaded.

The caller is responsible for adding the BLOB field(s) to the target feature class before calling Import. The FieldName is used to indicate which field is used to store the property.

Product Availability

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

Specified by:
addProperty in interface ITerrainLasDataImporter
Parameters:
property - A com.esri.arcgis.geodatabaseextensions.esriTerrainLasDataPropertyType constant (in)
fieldName - The fieldName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addReturnNumber

public void addReturnNumber(int returnNumber)
                     throws IOException,
                            AutomationException
Used to indicate which points to extract from the LAS files based on their LiDAR return number.

Description

At least one selection for return number must be added (which may include ALL), otherwise no points will be used.

Product Availability

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

Specified by:
addReturnNumber in interface ITerrainLasDataImporter
Parameters:
returnNumber - A com.esri.arcgis.geodatabaseextensions.esriTerrainLasReturnType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setClassCodes

public void setClassCodes(ILongArray pCodes)
                   throws IOException,
                          AutomationException
Used to indicate which points to load based on one or more LAS classification codes.

Product Availability

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

Specified by:
setClassCodes in interface ITerrainLasDataImporter
Parameters:
pCodes - A reference to a com.esri.arcgis.system.ILongArray (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

init

public void init(String lasFileName)
          throws IOException,
                 AutomationException
Used to set the name of the LAS file for which information is to be retrieved.

Product Availability

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

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

getVersion

public void getVersion(int[] pMajor,
                       int[] pMinor)
                throws IOException,
                       AutomationException
The version of the LAS file.

Product Availability

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

Specified by:
getVersion in interface ITerrainLasDataInfo
Parameters:
pMajor - The pMajor (out: use single element array)
pMinor - The pMinor (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSystemID

public String getSystemID()
                   throws IOException,
                          AutomationException
The hardware system used to collect the LiDAR data in the LAS file.

Product Availability

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

Specified by:
getSystemID in interface ITerrainLasDataInfo
Returns:
The pID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getGeneratingSoftware

public String getGeneratingSoftware()
                             throws IOException,
                                    AutomationException
The software used to create the LAS file.

Product Availability

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

Specified by:
getGeneratingSoftware in interface ITerrainLasDataInfo
Returns:
The pName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFlightDateJulian

public int getFlightDateJulian()
                        throws IOException,
                               AutomationException
The flight date based on the Julian calendar.

Product Availability

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

Specified by:
getFlightDateJulian in interface ITerrainLasDataInfo
Returns:
The pDate
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getYear

public int getYear()
            throws IOException,
                   AutomationException
The year the data in the LAS file was collected.

Product Availability

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

Specified by:
getYear in interface ITerrainLasDataInfo
Returns:
The pYear
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPointDataFormat

public int getPointDataFormat()
                       throws IOException,
                              AutomationException
The record format for points in the LAS file

Product Availability

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

Specified by:
getPointDataFormat in interface ITerrainLasDataInfo
Returns:
The pFormat
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getNumberOfPointRecords

public int getNumberOfPointRecords()
                            throws IOException,
                                   AutomationException
The number of points in the LAS file.

Product Availability

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

Specified by:
getNumberOfPointRecords in interface ITerrainLasDataInfo
Returns:
The pcRecords
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getNumberOfPointsByReturn

public int getNumberOfPointsByReturn(int returnNumber)
                              throws IOException,
                                     AutomationException
The number of points in the LAS file based on the specified LiDAR return number.

Product Availability

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

Specified by:
getNumberOfPointsByReturn in interface ITerrainLasDataInfo
Parameters:
returnNumber - The returnNumber (in)
Returns:
The pcPoints
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDataExtent

public IEnvelope getDataExtent()
                        throws IOException,
                               AutomationException
The XYZ extent of points in the LAS file.

Product Availability

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

Specified by:
getDataExtent in interface ITerrainLasDataInfo
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.

getSpatialReference

public ISpatialReference getSpatialReference()
                                      throws IOException,
                                             AutomationException
The spatial reference of the LAS file.

Product Availability

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

Specified by:
getSpatialReference in interface ITerrainLasDataInfo
Returns:
A reference to a com.esri.arcgis.geometry.ISpatialReference
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFileSourceID

public int getFileSourceID()
                    throws IOException,
                           AutomationException
The LAS file's source ID.

Description

Returns the 'File Source ID' listed in the header of the LAs file.

Here's a description for 'File Source ID' as listed in the LAS 1.2 specification:
File Source ID (Flight Line Number if this file was derived from an original flight line): This field should be set to a value between 1 and 65,535, inclusive. A value of zero (0) is interpreted to mean that an ID has not been assigned. In this case, processing software is free to assign any valid number. Note that this scheme allows a LIDAR project to contain up to 65,535 unique sources. A source can be considered an original flight line or it can be the result of merge and/or extract operations.

Product Availability

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

Specified by:
getFileSourceID in interface ITerrainLasDataInfo2
Returns:
The pID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isStandardGpsTime

public boolean isStandardGpsTime()
                          throws IOException,
                                 AutomationException
Indicates if the GPS time is standard GPS Time.

Description

This method returns TRUE if the time contained in the LAS file represents standard GPS time and FALSE if it represents GPS week time.

Product Availability

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

Specified by:
isStandardGpsTime in interface ITerrainLasDataInfo2
Returns:
The pbIsAStandard
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPointInfoByClassCode

public void getPointInfoByClassCode(ITrackCancel pTrackCancel,
                                    ILongArray pCodes,
                                    IDoubleArray[] ppCounts,
                                    IArray[] ppExtents)
                             throws IOException,
                                    AutomationException
Get the number of points corresponding to the specified class codes.

Description

Returns point count and extent information based on LAS class codes.

pTrackCancel is a reference to a CancelTracker to support progress reporting and the ability to halt the process. To bypass this feature pass a NULL pointer.

pCodes is a LongArray containing the LAS class codes. You can either provide an empty array, in which case all codes contained in the file will be discovered and written into the array for you, or you can specify specific codes of interest. If you specify the codes then the count and extent information will be reported only for those classes.

pCounts is an output DoubleArray containing the number of points per class. There is a one to one correspondence between the codes in the pCodes array and the counts in the pCounts array.

pExtents in an output array of envelopes. The envelopes capture the XYZ extents of the points based on class code. There is a one to one correspondence between the codes in the pCodes array and the envelopes placed in the pExtents array. If a code has been specified in the pCodes array that does not exist in the file the resulting envelope will be empty (IGeometry.IsEmpty=TRUE).

Product Availability

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

Specified by:
getPointInfoByClassCode in interface ITerrainLasDataInfo2
Parameters:
pTrackCancel - A reference to a com.esri.arcgis.system.ITrackCancel (in)
pCodes - A reference to a com.esri.arcgis.system.ILongArray (in)
ppCounts - A reference to a com.esri.arcgis.system.IDoubleArray (out: use single element array)
ppExtents - A reference to a com.esri.arcgis.system.IArray (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.